Results 1 to 2 of 2
2003-05-03, 08:41 #1
- Join Date
- Aug 2001
- Bay Area, California, USA
- Thanked 4 Times in 4 Posts
Running a .reg file automatically (WinXp SP1)
Running WinXP SP1.
I need to run two .reg files boot time and periodically thereafter. What is the best way to do this?
I want these files to run prior to anything else in the system right after login. Should I use the registry run keys or autoexec.bat?
Can I run them as a scheduled task, say every hour? How do I do this with a .reg file? What parms are needed to make the running silent so I don't have to reply to standard messages (Do you want to...) and the follow-up completed action message? Thanks!
2003-05-05, 14:21 #2
- Join Date
- Apr 2001
- New York, New York, USA
- Thanked 1 Time in 1 Post
Re: Running a .reg file automatically (WinXp SP1)
You can create one vbs file instead of two reg files. The syntax is like this:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCUMyRegKeyEntry", 2, "REG_DWORD"
WshShell.RegDelete "HKCUMyRegKeyEntry", 2, "REG_DWORD"
Set WshShell = Nothing
As you see, there is no messages. So be careful.
To run vbs at logon, you can put the entry pointing to it in both HKLMSoftwareMicrosoftWindowsCurrentVersionRun and HKCUSoftwareMicrosoftWindowsCurrentVersionRun.
To run vbs on scheduled basis, create a new task (Start | All Programs | Accessories | System Tools | Scheduled Tasks | Add Scheduled Task and follow the wizard).