lolipop Posted December 28, 2012 Share Posted December 28, 2012 (edited) Hi guys, I have this batch file that run the following code and it work fine. C:\Windows\System32\cmd.exe /C set __COMPAT_LAYER=RunAsInvoker & start "" "C:\Program Files\test 123\test 123.exe" but I'm trying to use autoit @comspec to compile it to a executable file. I'm having problem with the syntax. Can anyone be kind enough to guide me. This is the @comspec code I try. RunWait(@Comspec & ' /c set __COMPAT_LAYER=RunAsInvoker ' & 'start' & 'C:\Program Files\test 123\test 123.exe') Edited December 28, 2012 by lolipop Link to comment Share on other sites More sharing options...
santaryan Posted December 28, 2012 Share Posted December 28, 2012 (edited) RunWait(@Comspec & ' /c set __COMPAT_LAYER=RunAsInvoker ' & 'start' & 'C:Program Filestest 123test 123.exe')Should beRunWait(@Comspec & ' /C set __COMPAT_LAYER=RunAsInvoker & start "" "C:Program Filestest 123test 123.exe"') Edited December 28, 2012 by santaryan Link to comment Share on other sites More sharing options...
Developers Jos Posted December 28, 2012 Developers Share Posted December 28, 2012 Try: RunWait(@Comspec & ' /c set __COMPAT_LAYER=RunAsInvoker & start "" "C:\Program Files\test 123\test 123.exe"') Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
lolipop Posted December 28, 2012 Author Share Posted December 28, 2012 Thanks Jos & Santaryan. It works prefectly...Thanks... 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