AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

if not A_IsAdmin... restart script without manual entering?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
SecurityAnalysis
Guest





PostPosted: Fri Mar 14, 2008 7:47 pm    Post subject: if not A_IsAdmin... restart script without manual entering? Reply with quote

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





PostPosted: Wed Mar 19, 2008 10:48 pm    Post subject: Reply with quote

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





PostPosted: Fri May 16, 2008 6:54 pm    Post subject: Reply with quote

Bump
Back to top
Conquer



Joined: 27 Jun 2006
Posts: 385
Location: Canada

PostPosted: Fri May 16, 2008 10:18 pm    Post subject: Reply with quote

Sounds... Sly

Surprised



Um, use the command RunAs ?

lolz
_________________
Back to top
View user's profile Send private message
Troll
Guest





PostPosted: Fri May 16, 2008 11:18 pm    Post subject: Reply with quote

Sry you fail at internetz lol
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group