| View previous topic :: View next topic |
| Author |
Message |
SecurityAnalysis Guest
|
Posted: Fri Mar 14, 2008 7:47 pm Post subject: if not A_IsAdmin... restart script without manual entering? |
|
|
I use this code snippet on a Windows 2000 system. Is it possible to change the code a bit so that I don't have to enter the password manually? Or is there any other way for a script to give itself admin rights without manual input?
| Code: |
if not A_IsAdmin
{
DllCall("shell32\ShellExecuteA", uint, 0, str, "RunAs", str, A_AhkPath
, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1)
ExitApp
}
|
|
|
| Back to top |
|
 |
SecurityAnalysis Guest
|
Posted: Wed Mar 19, 2008 10:48 pm Post subject: |
|
|
| Is it possible to change the code a bit so that I don't have to enter the password manually upon Runas restart? |
|
| Back to top |
|
 |
SecurityAnalysis Guest
|
Posted: Fri May 16, 2008 6:54 pm Post subject: |
|
|
| Bump |
|
| Back to top |
|
 |
Conquer
Joined: 27 Jun 2006 Posts: 385 Location: Canada
|
Posted: Fri May 16, 2008 10:18 pm Post subject: |
|
|
Sounds... Sly
Um, use the command RunAs ?
lolz _________________
 |
|
| Back to top |
|
 |
Troll Guest
|
Posted: Fri May 16, 2008 11:18 pm Post subject: |
|
|
| Sry you fail at internetz lol |
|
| Back to top |
|
 |
|