Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi
I have some registry changes in my batch file when a user login, I just want to make it automatic even if the registry key cannot be imported. I have tried putting /y and /s at the beginning and end.How do I make it so there is no pop up window telling me to click ok when the registry can't be imported or run.
Thanks
Ken

I can think of legitimate reasons for this request so will give you the benefit of the doubt. Here is an example of running a reg file named mrudel.reg from a batch file:
regedit /s mrudel.reg
Derek.W

As mentioned above I have already tried the /s switch, it still pop up a windows saying it can't import the registry and I have to click OK.
Basically we have Windows 98 and Windows 2000/XP machine, the registry file works in 2000/XP but not work in Windows 98. I just don't want the annoying popup.
Thanks
Ken

Hi Ken, Ham30, Derek, hello everyone,
Are you wanting the information to be imported to the Win98 registry when logging into Win98 or just to the WinXp registry when logging into WinXp?
If your intentions is to only have the information imported on WinXp have the .reg file load from the WinXp registry.
What registry editor version is the .reg file? It is listed in the header of the file.
Version 5.0 will not work with Win98 and will give an error message that it is not a valid .reg file. The /s switch nor any others is going to get rid of that particular error message.
Best Regards,
Mesich

Yes, you need to have the exact syntax for the particular registry version and also the batch and reg files.
The format given should most certainly work in W98. This was given because you said you had tried /s in various places (which didn't inspire confidence). There is only one right place.
What happens when you just double click the .reg file without the batch file - does it import it then?
If you are prepared to submit the scripts of both the .reg & .bat file then maybe we can see what is wrong. I think it unlikely we are looking for some obscure fault with your system, only the way the batch/reg files are written for W98.
Derek.W

Hi
Yes, it's version 5, it runs from our NT server and we have Windows XP/Windows 2000 and Windows 98 client.
What can I do?
Ken

Hi Hi Ken, Ham30, Derek, hello everyone,
Hi Ken,
Change the header to Regedit4.
Best Regards,
Mesich

Hi Derek
If I do that, that means my Windows 2000 and XP will give me an error just like the Windows 98 before.
KEn

Hi Derek
You know we have a NT server with Windows XP/2000 Pro and Windows 98 client.
They login running a login script that runs *.reg files. The *.reg is a version 5 which will import ok in XP and 2000 client machine but not Windows 98, it gives me a windows popup errors saying there is an error in importing the *.reg file. I just don't want it popping up which I need to click OK, I don't mind if it can't import into Windows 98.
What you said by changing the *.reg to regedit4, this makes it so XP and 2000 machine will give me a popup like Windows 98 as it can't import version 4 of *.reg into windows xp.
Ken

Aha, now I know why I was confused. That was from mesich not me.
Having said that I can't see an easy way forward. The problem doesn't seem related to the original query about using /s in the batch file. It's that the format of the "registry files themselves" are different with W98 and the other two systems.
What it seems you need is a batch file which tests which system it is running on (somehow) then calls up the appropriate reg file. I suppose this might be possible but it would take a bit of working out. Then you could use /s to automate it.
Sorry, I'm not familiar enough with XP/2k to take this further. Maybe someone else can.
Derek.W

WinXp and Win2K can normally run using regedit4.
Did you actually try it?
I've ran many of them on WinXp without a problem. If you have tried it already post back with the .reg file and I'll look at it.
Best Regards,
Mesich

Hi Mesich
Thanks but still not working, I have changed the heading but when I go to a windows 98 machines and edit the reg it's gives me garbage, seems like registry from windows xp can't be edited in Windows 98 regedit 4. So that's why it can't be run saying the script is invalid.
Ken

Hi Ken, ham30, Derek, hello everyone,
Ken,
I've had no problems at all using REGEDITT4 on WinXp.
Could you post the registry file or email it too me? If you email it, change the file extention to something like .old so my isp will allow it to go through.
Best Regards,
Mesich

![]() |
Tab Key & Space Bar P...
|
Deleting desktop icons
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |