Solved

Registry Change Via Logon Script

Posted on 2004-08-07
5
363 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

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's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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