Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6933649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:51:34+00:00 2026-05-27T11:51:34+00:00

I am writing a Qt application that calls QProcess::startDetached(wscript.exe script.vbs) to show the delete

  • 0

I am writing a Qt application that calls QProcess::startDetached(“wscript.exe script.vbs”) to show the delete confirmation dialog in Windows.

this is the script:

Set objShell = CreateObject("Shell.Application") 
Set objFolder = objShell.Namespace("-") 
Set objFolderItem = objFolder.ParseName("-") 
objFolderItem.InvokeVerb("Delete")

the arguments for Namespace and ParseName are from the arguments passed to the script.

This may be inefficient because it opens an external application first before running the script. I was wondering if i can run VBScripts in a Qt application.

If not, what alternatives can i do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:51:35+00:00Added an answer on May 27, 2026 at 11:51 am

    My VBScript is very weak, so I’m not 100% sure I understand what you are trying to do. My assumption is that you are trying to delete a folder, but want to give the user the normal confirmation box and animation while the action is occurring. If that is not correct, please let me know and I will remove this answer.

    A few ideas:

    • You could call the Windows API directory within your C++ code to do this. I believe the correct call would be to use IFileOperation (Vista and later) or SHFileOperation (pre-Vista)
    • Qt already has message box dialogs. Although you might not get the exact same functionality as the native shell, you could use this (QMessageBox::warning) and then delete the folder using QDir. This would also be cross-platform portable.
    • If you stick with the VBScript, I doubt you would see any performance issues unless this is being called many, many times in a loop or something. You know, the old “premature optimization is the root of all evil” thing.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a memory tracking application that hooks all the calls to HeapAlloc
I'm writing an application that is basically just a preferences dialog, much like the
I'm writing a C# application that calls a C++ dll. This dll is a
I'm writing a (C++) application that utilizes a single dialog box. After setting up
I'm writing an application in VB.net that creates and calls batch files. I'd like
I'm writing a .Net C# application that will make SOAP calls to a configured
If you are writing a multi-threaded application that uses system/library calls that make use
While implementing XML file reading/writing in my application I saw that when I call
im writing an application that downloads and installs addons for programs which needs to
I am writing an application that downloads large files in the background. All clients

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.