Replace a registry key with a batch file?

Jim

Distinguished
Mar 31, 2004
2,444
0
19,780
Archived from groups: microsoft.public.windowsxp.basics (More info?)

I have the following registry key that I want to copy into the registry with
a batch file on shutdown [-HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\TypedURLs] named blankurls.reg. I have a batch file set up in the
WSH in the on Shutdown property as follows; Regedit.exe /s F:\Registry
Backup\blankurls.reg If I double click the registry entry it works fine,
but if I try to execute it with the batch file, it doesn't.

Can anyone tell me the proper syntax to use in a batch file so it works?
Thanks

Jim
 
Archived from groups: microsoft.public.windowsxp.basics (More info?)

Jim,

I'm not sure I completely follow the line: I have a batch file set up in the
WSH in the on Shutdown property as follows[...]

Where do you have the batch file set up to run this on shutdown?

Also, can you paste the contents of the batch file and the error and/or
errorlevel it returns with?

Best Regards,
G. Samuel Hays





"Jim" <jimkoh@adelphia.net> wrote in message
news:HaMod.2197$TG2.1577@trnddc01...
>I have the following registry key that I want to copy into the registry
>with
> a batch file on shutdown [-HKEY_CURRENT_USER\Software\Microsoft\Internet
> Explorer\TypedURLs] named blankurls.reg. I have a batch file set up in
> the
> WSH in the on Shutdown property as follows; Regedit.exe /s F:\Registry
> Backup\blankurls.reg If I double click the registry entry it works fine,
> but if I try to execute it with the batch file, it doesn't.
>
> Can anyone tell me the proper syntax to use in a batch file so it works?
> Thanks
>
> Jim
>
>
>
>
 
Archived from groups: microsoft.public.windowsxp.basics (More info?)

I have the batch file in my system32 directory and I'm using the Windows
Scripting Host to run it at shutdown using the MMC gpedit.msc snap in under
startup and shutdown scripts. The batch file simply says:

Regedit.exe /s F:\Registry Backup\blankurls.reg

The batch file doesn't return any errors, it simply doesn't copy the
registry key into the registry like it's supposed too. Any ideas?

Jim

"G. Samuel Hays" <sam.hays@patioenc.com> wrote in message
news:10q748vg903qjcf@corp.supernews.com...
> Jim,
>
> I'm not sure I completely follow the line: I have a batch file set up in
the
> WSH in the on Shutdown property as follows[...]
>
> Where do you have the batch file set up to run this on shutdown?
>
> Also, can you paste the contents of the batch file and the error and/or
> errorlevel it returns with?
>
> Best Regards,
> G. Samuel Hays
>
>
>
>
>
> "Jim" <jimkoh@adelphia.net> wrote in message
> news:HaMod.2197$TG2.1577@trnddc01...
> >I have the following registry key that I want to copy into the registry
> >with
> > a batch file on shutdown
[-HKEY_CURRENT_USER\Software\Microsoft\Internet
> > Explorer\TypedURLs] named blankurls.reg. I have a batch file set up in
> > the
> > WSH in the on Shutdown property as follows; Regedit.exe /s F:\Registry
> > Backup\blankurls.reg If I double click the registry entry it works
fine,
> > but if I try to execute it with the batch file, it doesn't.
> >
> > Can anyone tell me the proper syntax to use in a batch file so it works?
> > Thanks
> >
> > Jim
> >
> >
> >
> >
>
>
>
 
Archived from groups: microsoft.public.windowsxp.basics (More info?)

I guess the better question would have been:What are you trying to do? You
maybe able to enter the registry directly to change what you want. Please
post back. It's hard to tell you wether what you are doing is right or wrong
unless we can understand what your goal is. Post back.