سؤال

There's this annoying program I need to run, that after every execution leaves itself in the startup list, and more specifically "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"

I'm looking for a command removing this entry, so that I can make it a button or hook it up on the program, saving me the trouble of doing it manually. Thing is, I'm too cowardly to go ahead and assume what the correct command is when the registry is involved :D

So, for the above path and an entry called, say, MyProgram, what would the command be? We're talking windows 7, 64-bit.

هل كانت مفيدة؟

المحلول

First, I suggest to look on the options/settings/configuration/preferences of the application which adds itself on every run to the list of automatically started applications on Windows start. Most of those applications have a check box setting with a name like Automatically start with Windows or something similar which can be simply unchecked to avoid an automatic start of this application on Windows start. Take the time and look really on all options/settings available for the application.

Second, if this application really does not have such a configuration setting/option visible somewhere in GUI and nothing mentioned about automatic start in manual/help of the application, you should contact the company producing this application and ask if there is a non public documented command line option or a hidden setting which results in not registering the application itself to the list of applications being executed automatically on Windows start.

Third, the command to use for deletion of a value in registry is reg.exe.

You can get help on this command by entering in a command prompt window reg /? or for more detailed help on deletion of a key or value reg delete /?

By using the command

%SystemRoot%\system32\reg.exe delete HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run /v "Name of Value" /f

with Name of Value being the name of the application as registered in Windows registry which adds itself to the list of 32-bit applications started automatically on Windows start, the unwanted value can be removed from Windows registry.

But please note that using reg.exe for deleting something in HKLM requires administrator privileges.

PS: I suggest to try this command first without /f in a command prompt window to be able to verify that the right value under right registry key will be deleted before the deletion is really done. Wrong usage of reg.exe can very easily result in a registry on which Windows cannot be used anymore.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top