Run As Administrator
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Run As Administrator
can i get an example to use the run instruction with runas in an app in administrator mode?
i don't see how call it correctly
Verb:
On Windows, this can be set to a string telling Run() what to do with the file. This can be one of the following verbs:
runas
Launches the specified file in administrator mode.
i don't see how call it correctly
Verb:
On Windows, this can be set to a string telling Run() what to do with the file. This can be one of the following verbs:
runas
Launches the specified file in administrator mode.
Re: Run As Administrator
Example: Open Services control to look for the state, stop Windows Update, Wait, start Windows Update
Code: Select all
Run("C:\\Windows\\System32\\services.msc")
Run("C:\\Windows\\System32\\net.exe","stop wuauserv",{Verb="runas"})
NPrint("Now press refresh button in Services window")
Wait(30,#SECONDS)
Run("C:\\Windows\\System32\\net.exe","start wuauserv",{Verb="runas"})
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Run As Administrator
nice, i try it, thanks mate
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Run As Administrator
here dont work our method n my project, i'm attempting to write in an EC (Embeded Controller)
write <register> <value> [options]
Write a byte to a EC register.
Register range: 0-255
Value range: 0-255
i can sed it via cmd in administrator mode without problem, but if i attempt to change the register via cmd without administrator mode or hollywood nothing change here
write <register> <value> [options]
Write a byte to a EC register.
Register range: 0-255
Value range: 0-255
i can sed it via cmd in administrator mode without problem, but if i attempt to change the register via cmd without administrator mode or hollywood nothing change here
Re: Run As Administrator
Command is correct however windows "security" is a mesh
Maybe nnex to run script in elevated rights as well ?
Maybe nnex to run script in elevated rights as well ?
Christos
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Run As Administrator
i tried to compile the script as an exe file and launch it as administrator, the same result
Weird
Weird
Re: Run As Administrator
Maybe your "write" command depends from anything in the environment (path for example) that the Hollywood script does not know?
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Run As Administrator
no, the command is in the right place, all this is correct here
Re: Run As Administrator
Did you change the current directory to the place where this write.exe is?
-
- Posts: 267
- Joined: Fri Feb 24, 2012 9:34 am
Re: Run As Administrator
yes ithe exe is in the same drawer, where i have the executable