Jump to content
Sign in to follow this  

comspec weird result

Recommended Posts


Hi im having a problem where im trying to run an uninstall program using @COMSPEC and rundll32. My script runs this command then i want to wait for a window of the uninstall program called "Welcome". The problem is that when i run the command and then WinWait("Welcome") is used, the uninstall program doesnt seem to run and the debug status says that it is waiting at WinWait("Welcome").

If i remove the WinWait("Welcome") then the uninstall program will run until it gets to the "Welcome" window (where it waits for user interaction) but thats the problem, if i include the WinWait the uninstall program doesnt even seem to run correctly. I figured its some technical thing with the COMSPEC macro, anyway here is my source code could anyone help:

AutoItSetOption("TrayIconDebug", 1)

AutoItSetOption("WinTitleMatchMode", 2)

Run(@COMSPEC & " /c RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\ctor.dll,LaunchSetup ""C:\Program Files\InstallShield Installation Information\{95E35475-E696-4D0D-96DB-7A7156F2AC85}\setup.exe"" ")


;Do more interactive stuff


Share this post

Link to post
Share on other sites

What happens with the WinWait command in there ?

Could it be that the "Welcome" screen already exists but is still hidden ?

You could check by looping till the windows is shown:

While Not BitAnd(WinGetState("Welcome", ""), 2)

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this