Results 1 to 2 of 2
  1. #1
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    966
    Thanks
    19
    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!

  2. #2
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •