+ Post New Thread
Results 1 to 14 of 14
Windows Thread, how to run a registry patch on shutdown/logoff in Technical; I'm trying to get windows to run a registry patch every time someone logs off or shuts down, but i've ...
  1. #1

    Join Date
    Sep 2006
    Posts
    36
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    how to run a registry patch on shutdown/logoff

    I'm trying to get windows to run a registry patch every time someone logs off or shuts down, but i've not a clue.

    i would also like it to not display the "do you want to add to registry" warning to pop up, just

    Any ideas?

  2. #2
    Quackers's Avatar
    Join Date
    Jan 2006
    Posts
    1,310
    Thank Post
    40
    Thanked 141 Times in 116 Posts
    Rep Power
    53

    Re: how to run a registry patch on shutdown/logoff

    Using Group Policy assign a batch file as a script. In the batch put for example

    regedit /s "L:\Scripts\Configs\lrc\power.reg"

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: how to run a registry patch on shutdown/logoff

    Either use the 'reg' command line util in a script. Or export the registry settings from a machine with the configuration you want to a .reg file and import them with 'regedit /s somefile.reg' (the /s option prevents the dialog being displayed).

    You can set either method up to run at logoff and/or shutdown via GPO settings.

  4. #4

    Join Date
    Sep 2006
    Posts
    36
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: how to run a registry patch on shutdown/logoff

    Thanks for that, but it's just for one pc, is there any way it can be done locally?

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: how to run a registry patch on shutdown/logoff

    1) Right click Start button
    2) Open All Users
    3) Programs -> Startup
    4) Stick a script/shortcut in there.

  6. #6

    Join Date
    Sep 2006
    Posts
    36
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: how to run a registry patch on shutdown/logoff

    i want it on shut down only

  7. #7

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: how to run a registry patch on shutdown/logoff

    ah sorry, my bad.

    On the machine in question.

    1) Start -> Run
    2) gpedit.msc
    3) Computer Configuration -> Windows Settings -> Scripts -> Shutdown
    4) Add the script/commands you want.

  8. #8

    Join Date
    Sep 2006
    Posts
    36
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: how to run a registry patch on shutdown/logoff

    Cheers man, just what i wanted.

    any ideas how to put "regedit /s somefile.reg" as a vbs, i'm a bit rusty

  9. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: how to run a registry patch on shutdown/logoff

    You don't need to. If you use the method above, you put 'regedit' as the program and '/s somefile.reg' as the parameters.

  10. #10

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,590
    Thank Post
    109
    Thanked 762 Times in 593 Posts
    Rep Power
    180

    Re: how to run a registry patch on shutdown/logoff

    Quote Originally Posted by The_Traveller
    Cheers man, just what i wanted.

    any ideas how to put "regedit /s somefile.reg" as a vbs, i'm a bit rusty
    Just use a batch file!

  11. #11

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,708
    Thank Post
    3,246
    Thanked 1,048 Times in 970 Posts
    Rep Power
    364

    Re: how to run a registry patch on shutdown/logoff

    Set WshShell = CreateObject("Wscript.Shell")

    WshShell.Run "Regedit /s C:\reg_file.reg"

    If .Run does not work then use the .Exec method ie

    WshShell.Exec

    The question is if you want to use a batch file or a vbs

  12. #12

    Join Date
    Sep 2006
    Posts
    36
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: how to run a registry patch on shutdown/logoff

    couldn't get the batch file to run

  13. #13

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,590
    Thank Post
    109
    Thanked 762 Times in 593 Posts
    Rep Power
    180

    Re: how to run a registry patch on shutdown/logoff

    Quote Originally Posted by The_Traveller
    couldn't get the batch file to run
    odd... any messages in the logs?

  14. #14

    Join Date
    Sep 2006
    Posts
    36
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: how to run a registry patch on shutdown/logoff

    Haven't checked logs, but i got the vbs to work, thanks to you lot cheers!

SHARE:
+ Post New Thread

Similar Threads

  1. Registry Cleaner for Win 2K Server
    By speckytecky in forum How do you do....it?
    Replies: 1
    Last Post: 15th August 2007, 12:26 AM
  2. Registry Cleaners
    By speckytecky in forum Windows
    Replies: 9
    Last Post: 28th July 2007, 12:47 PM
  3. Deleted a registry key - help!
    By mrcrazy04 in forum Windows
    Replies: 1
    Last Post: 19th July 2007, 07:26 AM
  4. Edit registry remotely?
    By SYSMAN_MK in forum Windows
    Replies: 5
    Last Post: 3rd April 2006, 11:28 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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