LonnyRJones Posted July 26, 2005 Share Posted July 26, 2005 can one of you script geniuses help me write this into an autoit script. Its rarely needed but when it is we use it against spyware/crappware Its used when the permishions get goofed up and a simple deletion will not work ShudderLTD is just an example (Echo %DATE% %TIME% if not exist %windir%\system32\reg.exe goto last If exist ShudderLTDempty del ShudderLTDempty If not Exist "originalkey.txt" Echo Backing up original ShudderLTD & regedit /a "originalkey.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTD" IF exist "originalkey.txt" Echo Backup Created Successfully Echo..... Echo Creating HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty reg add HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty echo..... Echo Saving HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty Reg Save HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty ShudderLTDempty.hiv echo..... Echo Deleting HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty reg delete HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty /f echo..... Echo Replacing ShudderLTD reg restore "HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTD" ShudderLTDempty.hiv reg delete HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTD /f )>logit.txt 2>&1 If exist ShudderLTDempty.hiv del ShudderLTDempty.hiv Start logit.txt :last echo reg.exe not present exit Link to comment Share on other sites More sharing options...
seandisanti Posted July 26, 2005 Share Posted July 26, 2005 can one of you script geniuses help me write this into an autoit script.Its rarely needed but when it is we use it against spyware/crappwareIts used when the permishions get goofed up and a simple deletion will not workShudderLTD is just an example(Echo %DATE% %TIME% if not exist %windir%\system32\reg.exe goto last If exist ShudderLTDempty del ShudderLTDempty If not Exist "originalkey.txt" Echo Backing up original ShudderLTD & regedit /a "originalkey.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTD" IF exist "originalkey.txt" Echo Backup Created Successfully Echo..... Echo Creating HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty reg add HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty echo..... Echo Saving HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty Reg Save HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty ShudderLTDempty.hiv echo..... Echo Deleting HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty reg delete HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTDempty /f echo..... Echo Replacing ShudderLTD reg restore "HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTD" ShudderLTDempty.hiv reg delete HKEY_LOCAL_MACHINE\SOFTWARE\ShudderLTD /f )>logit.txt 2>&1 If exist ShudderLTDempty.hiv del ShudderLTDempty.hiv Start logit.txt :last echo reg.exe not present exit<{POST_SNAPBACK}>you should check out the macro reference in the help file for the system macros to replace all of your %value% 's. there are also alot of registry functions, and even pre-built UDF's you could implement... because of how easy it would be for you to do the small amount of research needed to do the job yourself, i really wouldn't hold your breath waiting on someone else to do it for you... sorry, just doesn't look like you put much effort into this besides the copy and paste to ask someone else to do it for you, and i've noticed that doesn't go over real well here... Link to comment Share on other sites More sharing options...
LonnyRJones Posted July 26, 2005 Author Share Posted July 26, 2005 Easy, perhaps for you if it was for myself i wouldnt have asked for help I am not understanding autoti enough yet, perhaps with time. Link to comment Share on other sites More sharing options...
seandisanti Posted July 26, 2005 Share Posted July 26, 2005 Easy, perhaps for you if it was for myself i wouldnt have asked for helpI am not understanding autoti enough yet, perhaps with time.<{POST_SNAPBACK}>i didn't mean the task is easy (even though it is) i mean that the minimal amount of research you will have to do (which i even told you where to look and what to look for) would be easy. I'm not trying to be rude, it just doesn't look like you've put any effort into trying to do this yourself before asking someone else to do it for you. That's why i tried to help you by telling you exactly what to look for in the help file. Link to comment Share on other sites More sharing options...
Wus Posted July 26, 2005 Share Posted July 26, 2005 Just use the helpfile thats packaged with autoit... its a very very good reference Link to comment Share on other sites More sharing options...
LxP Posted July 26, 2005 Share Posted July 26, 2005 Welcome to the forums! To get you started you'll want to look at RegWrite(), RegDelete(), possibly MsgBox(), probably FileDelete() and FileExists()... and Run() and RunWait().You will want to run RunWait() on the regedit.exe calls to ensure that its operations are complete before moving on in the script, and you'd probably want Run() when you launch the .txt because the script doesn't need to wait around in memory after that.Good luck and we'll be here when you get stuck specifically! 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