Solved

Registry Change Via Logon Script

Posted on 2004-08-07
5
361 Views
Last Modified: 2010-04-14
I need to change the value of the default key in HKLM\Software\Microsoft\Windows\CurrentVersion\Run to blank via either my batch file script or my vbs script at logon for the computers in our domain. Some computer have a weird value that is causing the system32 window error at log in.  I have been trying a while and cant seem to find a command that works.  Thanks, Aaron
0
Comment
Question by:luders
  • 3
5 Comments
 
LVL 10

Expert Comment

by:dis1931
ID: 11742896
Delete values:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\MyStuff]
"MyLittleValue"=-
"MyLittleValue2"=-

But if you need to delete entire key

Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\Software\MyStuff]

Place those what you need in a .reg file and run it.  

I would suggest going with deleting the entire Run key and then recreating it empty since you will not know all the values inside them.  Just be careful as people may have legitimate things in there such as Palm software, Antivirus software, etc....
0
 

Author Comment

by:luders
ID: 11742963
Okay I tried these options and no luck. I could delete the default value via reg edit which works just as well as changing the default value because it re creates the default value blank. But I could not do either via the scripting. The first option here creates a duplicate default value and the second does nothing. Ideas?

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
"(Default)" = " "

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\(Default)]
0
 

Author Comment

by:luders
ID: 11742967
Also, deleting the Run key seems no good because as you said there are other legitimate run commands.
0
 
LVL 14

Accepted Solution

by:
dlwyatt82 earned 500 total points
ID: 11742985
The reason for this is the "(Default)" value is referenced by @ in a .reg file. You need to do this:

------------------------------------------------------------

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
@=-
0
 

Author Comment

by:luders
ID: 11743010
Thats what I am lookin for. Thanks, Aaron
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
There are many Password Managers (PM) out there to choose from. PM's can help with your password habits and routines, but they should not be a crutch you rely on too heavily. I also have an article for company/enterprise PM's.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now