tinkythomas Posted August 7, 2008 Share Posted August 7, 2008 (edited) Hi, I am trying to create a script to install the latest version of ccleaner. No matter what I try I cannot get past the Open File - Security Warning dialogue! The code I have tried among others is as follows:Func InstallCCleaner() FileInstall("C:\Setup files\CCleaner\ccsetup210.exe", @DesktopDir & "\ccsetup210.exe") ShellExecute(@DesktopDir & "\ccsetup210.exe") While 1 If ControlCommand("Open File - Security Warning", "Run", 4423, "IsEnabled", "") Then ExitLoop EndIf WEnd Send("!r") I have used both code generators to no avail, but if I manually click Run then the rest of the script (not shown) runs fine and installs ccleaner. Has anybody else had problems with this type of dialogue, I just can't seem to interact with it!! Thanks Edit: I have noticed that the taskbar tab has the autoit logo, which is odd!! If I open the install.exe normally then nothing appears on the taskbar when the warning opens. Edited August 7, 2008 by tinkythomas Link to comment Share on other sites More sharing options...
tinkythomas Posted August 7, 2008 Author Share Posted August 7, 2008 Ok I managed to figure this out! I used the secondary command interpreter %comspec% and now the install runs without the Open File warning. $exe = @DesktopDir & "\ccsetup210.exe" Run(@ComSpec & ' /c "' & $exe & '"', '', @SW_HIDE) All is now working. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now