erbailey Posted January 24, 2007 Share Posted January 24, 2007 I am needing to build a script that does a RunAs and goes and deletes a specific registry key. I found the following script... If $CmdLine[0] = 0 then RunAsSet("Administrator", @Computername, "adminpassword") Run('"' & @SCRIPTFULLPATH & '" parameter' ) Exit EndIf My question is, will this mask the login of the admin? In other words, when my user runs this... will they be able to see the password being typed? My next question is, how do I delete a specific registry key? Thanks in advance. Link to comment Share on other sites More sharing options...
SalazarCheats Posted January 24, 2007 Share Posted January 24, 2007 I am needing to build a script that does a RunAs and goes and deletes a specific registry key. I found the following script... If $CmdLine[0] = 0 then RunAsSet("Administrator", @Computername, "adminpassword") Run('"' & @SCRIPTFULLPATH & '" parameter' ) Exit EndIf My question is, will this mask the login of the admin? In other words, when my user runs this... will they be able to see the password being typed? My next question is, how do I delete a specific registry key? Thanks in advance. try it and see if its starts out the password if it does than your fine and it will work for ever one Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
Glyph Posted January 24, 2007 Share Posted January 24, 2007 Read the help file for registry deltetion please. tolle indicium Link to comment Share on other sites More sharing options...
Developers Jos Posted January 24, 2007 Developers Share Posted January 24, 2007 This all depends what registry key you want to delete ... You have to remember you load a different HKCU hive ....... 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...
Glyph Posted January 24, 2007 Share Posted January 24, 2007 Function Reference RegDelete -------------------------------------------------------------------------------- Deletes a key or value from the registry. RegDelete ( "keyname" [, "valuename"] ) ex. RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey") would dlete the registry key "Testkey" loacated in "HKEY_LOCAL_MACHINE\SOFTWARE" tolle indicium Link to comment Share on other sites More sharing options...
Bert Posted January 24, 2007 Share Posted January 24, 2007 Whats the key? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
erbailey Posted January 24, 2007 Author Share Posted January 24, 2007 Thank you for all the prompt replies... I appreciate it. First off, I didnt realize the help files were so in depth... so Ill be reading those more often from here on out. The key I need to delete is... HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing I dont know what its for but I do know that it prevents my users from using remote desktop after a certain period of time. So I need to write a script that I can send them, and run it as an admin on their machine. 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