redfive19 Posted August 9, 2007 Share Posted August 9, 2007 Sorry for the 2nd post today.... I need to write to the registry as a non admin and also close a process. RunAsSet doesn't work with these commands as it only works with Run and RunWait commands. I can do this via cmd line Run's but just wanted to see if there's a prettier way around this. thanks ahead of time! -redfive Link to comment Share on other sites More sharing options...
Bert Posted August 9, 2007 Share Posted August 9, 2007 What about _RunDOS or ShellExecute? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
redfive19 Posted August 9, 2007 Author Share Posted August 9, 2007 I'll try a shell execute but I'm also having problems using _FileWriteToLog while writing as a non admin to an external USB Drive. I am guessing it has to do with NTFS writes/policy on this build but I'd like to get around that too.....this is the last piece of a huge puzzle and fixing it will be awesome!! thanks for your help today Volly, you rule. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 9, 2007 Developers Share Posted August 9, 2007 Restart the script by doing a RunAsSet() and the Run(@ScriptFullPath).. Several examples are posted .... 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...
redfive19 Posted August 9, 2007 Author Share Posted August 9, 2007 Wow this sounds exactly like what I need however I'm a bit confused as to how to do this or what to even search on. Thanks JdeB! - redfive Link to comment Share on other sites More sharing options...
Developers Jos Posted August 9, 2007 Developers Share Posted August 9, 2007 $username="Administrator" ; local admin account name $Password="psw" ; local admin account psw $run = 0 ; run indicator ; retrieve the cycle from commandline If $CmdLine[0] = 1 then $run = $CmdLine[1] If $run = 0 then RunAsSet ($Username, @Computername, $Password) ; start the script program (itself) again but now in Adminmode...so all done tasks will run in Adminmode Run('"' & @ScriptFullPath & '" " 1"' ) if @error = 1 then msgbox(48,"Error","cannot start ... wrong admin userid or psw") exit EndIf 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...
redfive19 Posted August 9, 2007 Author Share Posted August 9, 2007 I'm not gay at all but I would totally makeout with you right now JdeB. THANK YOU!!! -redfive 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