twizt3d Posted January 16, 2005 Share Posted January 16, 2005 How do I stop something from loading with windows, I know the reg key is[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] and to remove it you do [-HKEY_LOCAL............] but what if I want to just remove one line from under it, like only stop one program, i dont want to delete the whole key.... Link to comment Share on other sites More sharing options...
twizt3d Posted January 16, 2005 Author Share Posted January 16, 2005 I figured this out, heres the information for anyone else interesed.People have wondered how to remove keys and values from the registry simply by importing a registry file. All that needs to be done to achieve this is the insert a hyphen, -, in front of the "H" in HKEY.......[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft]would delete the entire Microsoft key from this location.In order to just delete a value the syntax is to set the value equal to Hyphen, -.[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft]"VALUE"=-Would delete "VALUE" from this area of the registry. Link to comment Share on other sites More sharing options...
Mastertech Posted February 5, 2005 Share Posted February 5, 2005 Save yourself the agravation and just use Autoruns Link to comment Share on other sites More sharing options...
maxXPsoft Posted February 13, 2005 Share Posted February 13, 2005 twizt3dYou got the right idea, especially usefull for UnattendedCan also useREG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v CloneCDTray Deletes the registry value CloneCDTray under RunAutoruns is ok but sometimes you just need to apply it another way. Link to comment Share on other sites More sharing options...
Guest ataub2qf Posted February 19, 2005 Share Posted February 19, 2005 Does this method works already if called from cmdlines.txt? Link to comment Share on other sites More sharing options...
spiritpyre Posted May 13, 2005 Share Posted May 13, 2005 Does this method works already if called from cmdlines.txt?<{POST_SNAPBACK}>No because anysoftware you have that installs autorun entries would do so AFTER cmdline.txt stage so it would be better to call regedit silently at the end of your batch or runonceex.cmd (after all your programs have been installed).here's an example of what you might put in your regtweaks.reg:Windows Registry Editor Version 5.00;=============================; Remove Autorun Entries: ;=============================[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]"ATI Launchpad"=-"Eraser"=-[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]"SunJavaUpdateSched"=- Also some programs will just put a link to themselves in one of the startup foldersso you might need additional lines at the end of your batch/runonceex.cmd (or preferably in a separate cleanup.cmd):This code is for a batch file or command script NOT a .reg file: Remove entries from startup foldersDEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Programs\Startup\SHORTCUTNAME.lnk"DEL "%systemdrive%\Documents and Settings\%username%\Start Menu\Programs\Startup\SHORTCUTNAME.lnk"where you would replace "SHORTCUTNAME" with the name of the shortcut to be deleted (or just use "*" if you want to empty it) 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