regedit.exe /s : does it return with an exit code?

Andy

Distinguished
Mar 31, 2004
1,239
0
19,280
Archived from groups: microsoft.public.windowsxp.general (More info?)

Hi,

does anyony know if regedit.exe, called to process data from an input
reg file, returns with a sensible exit code?
I'd like to know if reg file data was processed successful or not.

Example:
regedit.exe /s mydata.reg

if errorlevel 1 echo "error while processing reg file..."
....

Thanks in advance.
Regards,
Andy
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

Multipost; response in microsoft.public.scripting.wsh


Please don't multi-post.
http://www.aspfaq.com/etiquette.asp?id=5003

and

Multiposting vs Crossposting
http://www.blakjak.demon.co.uk/mul_crss.htm

and

What is the accepted way to share a message across multiple newsgroups?
http://smjg.port5.com/faqs/usenet/xpost.html



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

Then remove the /s switch.

All the /s switch does is suppress these popups...

Registry Editor
[[Are you sure you want to add the information in path of .reg file to the
registry?
If the user clicks Yes, the user receives the following message:
Registry Editor
Information in path of .reg file has been successfully entered into the
registry.]]
How To Add, Modify, or Delete Registry Subkeys and Values by Using a
Registration Entries (.reg) File
http://support.microsoft.com/default.aspx?scid=kb;en-us;310516

Sounds like you want to see them.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:1122630774.533762.44750@g49g2000cwa.googlegroups.com,
andy <andy_gk@t-online.de> hunted and pecked:
> Hi,
>
> does anyony know if regedit.exe, called to process data from an input
> reg file, returns with a sensible exit code?
> I'd like to know if reg file data was processed successful or not.
>
> Example:
> regedit.exe /s mydata.reg
>
> if errorlevel 1 echo "error while processing reg file..."
> ...
>
> Thanks in advance.
> Regards,
> Andy
 

apesoccer

Distinguished
Jun 11, 2004
1,020
0
19,310
I have been getting error code 0 back with a similar run. Using psexec.exe \\computer -u domain\admin -p password regedit.exe c:\myregfile.reg

Running it locally it runs fine, but run it from an admin machine and it fails out with:

Connecting to computer...Starting PsExec service on computer...Connecting with PsExec service on computer...Starting regedit.exe on computer...
regedit.exe exited on computer with error code 0.

qe: running psservice.exe however in the same cmd structure runs just fine...i can start, stop and restart services np.