Sysinternals Homepage
Forum Home Forum Home > Sysinternals Utilities > PsTools
  New Posts New Posts RSS Feed: Regsvr32 remote command
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Regsvr32 remote command

 Post Reply Post Reply
Author
Message Reverse Sort Order
SvenBomwollen View Drop Down
Senior Member
Senior Member


Joined: 29 August 2008
Location: Germany
Online Status: Offline
Posts: 1400
Post Options Post Options   Quote SvenBomwollen Quote  Post ReplyReply Direct Link To This Post Topic: Regsvr32 remote command
    Posted: 26 November 2008 at 11:08am
Hello, Chris.

Telling from the screen output, I wonder if any error occurs at all. Rather it seems as if "change user" always returns 1 on successful completion?! Confused
C:\>CHANGE USER /INSTALL
User session is ready to install applications.

C:\>echo %errorlevel%
1

C:\>CHANGE USER /EXECUTE
User session is ready to execute applications.

C:\>echo %errorlevel%
1
So actually, the exit code 1 might be a cosmetic issue only. You might add "exit /b 0" as the last commandline of "hsrfix.bat". Yet, somehow doing so defeats the purpose of exit codes.

Regards,
Sven

Back to Top
chrisfoster1971 View Drop Down
Newbie
Newbie


Joined: 26 November 2008
Online Status: Offline
Posts: 2
Post Options Post Options   Quote chrisfoster1971 Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 9:00am
Thanks for the speedy reply.. Below is the screen output at the time of the errors
 
 
C:\PsTools>sleep 5

C:\PsTools>psexec -u <domain>\<useraccount> -p <password> @server.txt "C:\Installs\hsrfix.bat"

PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

\\server1:


C:\WINDOWS\system32>echo
ECHO is on.

C:\WINDOWS\system32>CHANGE USER /INSTALL
User session is ready to install applications.

C:\WINDOWS\system32>regsvr32 /s "<path to dll>.dll"

C:\WINDOWS\system32>regsvr32 /s "<path to dll>.dll"

C:\WINDOWS\system32>CHANGE USER /EXECUTE
User session is ready to execute applications.
C:\Installs\hsrfix.bat exited on server1 with error code 1.
 
 
 
 
The more I look at it it would appear to be something to do with the change user /install or /execute command that seems to be causing the error code 1.
 
As previously stated the account being used is a domain admin
 
The change user commands are to ensure the server is in the correct mode for the installations that are being rolled out and then taken back out afterwards as per MS's advice for TS installations
 
Thanks Chris
Back to Top
SvenBomwollen View Drop Down
Senior Member
Senior Member


Joined: 29 August 2008
Location: Germany
Online Status: Offline
Posts: 1400
Post Options Post Options   Quote SvenBomwollen Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 8:42am
Hello, Chris.

May we see the complete screen output which psexec displays, please? (Camouflage confidential names before posting, please) psexec should display 1 or 2 lines near the exit code message explaining what went wrong.

Regards,
Sven

Back to Top
chrisfoster1971 View Drop Down
Newbie
Newbie


Joined: 26 November 2008
Online Status: Offline
Posts: 2
Post Options Post Options   Quote chrisfoster1971 Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 8:05am
Could someone please help I am trying to use psexec to remotely register a couple of dll's on a machine following a implementation that would appear to have slightly wrong however the below command exits with error code 1
 
psexec -u <domain>\<userobject> -p <password> @servers.txt -i "C:\Installs\hsrfix.bat"
 
Within this bat file is the command to register two dll's
 
CHANGE USER /INSTALL
regsvr32 /s "path to.dll"
regsvr32 /s "path to.dll"
CHANGE USER /EXECUTE
 
BTW this server is a citrix server hence the change user commands.
 
I have full domain rights and I am using my own credentials to carry this out.
I have also tried without the -i option
 
Any ideas would be gratefully recieved....thanks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down