Jump to content

Anyone can help with this @comspec syntax???


lolipop
 Share

Recommended Posts

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 by lolipop
Link to comment
Share on other sites

RunWait(@Comspec & ' /c set __COMPAT_LAYER=RunAsInvoker ' & 'start' & 'C:Program Filestest 123test 123.exe')

Should be

RunWait(@Comspec & ' /C set __COMPAT_LAYER=RunAsInvoker & start "" "C:Program Filestest 123test 123.exe"')

Edited by santaryan
Link to comment
Share on other sites

  • Developers

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

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
 Share

×
×
  • Create New...