Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1  
Old 06-23-2014, 12:19 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
PSExec remote credentials

I have a step that uses PSExec to uninstall and install an MSI, my build machine is on a non trusted domain from the box being deployed to. Under the Advance Tab I have a user name and password for a service account that has access to the remote server and I set the options to "Use Credentials for Network Only".

If I take the same command and run it outside VB it runs fine, not sure what to do?
Reply With Quote
  #2  
Old 06-23-2014, 04:45 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Unchecking Use credentials for network only should be closer what is happening when calling externally. Is the user account when calling externally the same as the user account being specified in Visual Build? Is the command-line identical?

Check the Log the command-line option on the Advanced tab and the Log PsExec output option on the Remote tab, rebuild the step, and post or send the step's build output, including the PsExec command Visual Build generates. Thanks.
Reply With Quote
  #3  
Old 06-24-2014, 08:03 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
So originally I had options set to non but I figured I would try the other option since I am logged into the build machine with a domain that's not trusted by the target.

The following commands are generated from VB and they fail within the GUI, if I copy the same command to a CMD file and run it they work. (please note I out usernames and passwords from the commands below)

C:\Windows\system32\cmd.exe /C PsExec >C:\Users\USERID\AppData\Local\Temp\2\PsE44F1.tm p -u DOMAIN\USER -p PASSWORD \\SERVERNAEM.FQDN.COM MSIEXEC.EXE /x {DAD5255B-4386-479A-8CA1-27AFFB23EC59} /qn
pause


C:\Windows\system32\cmd.exe /C PsExec >C:\Users\USERID\AppData\Local\Temp\2\PsED09C.tm p -u DOMAIN\USER -p PASSWORD \\SERVERNAEM.FQDN.COM MSIEXEC.EXE /i "D:\Staging\PostalLocation\ACE.NA.EA.PostalLocatio n.WebSetup.msi" INSTALLATIONLEVEL="TEST" TARGETSITE="/LM/W3SVC/3" TARGETVDIR="PostalLocation" TARGETAPPPOOL="TIWS-PostalLocation" /qn
pause
Reply With Quote
  #4  
Old 06-24-2014, 08:16 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Please ZIP and send or post

1) The version of Visual Build.

2) The version of PsExec.exe being called (call where psexec in a Command Prompt to locate).

3) A .bld file with the step that is failing.

4) Check the Log the command-line option on the Advanced tab and the Log PsExec output option on the Remote tab, rebuild the step, and send the step's build output.

Thanks.
Reply With Quote
  #5  
Old 06-24-2014, 08:38 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
See attached

PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
Attached Files
File Type: bld PostalLocation.bld (9.3 KB, 2039 views)
Reply With Quote
  #6  
Old 06-24-2014, 08:42 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Still need

1) The version of Visual Build.

4) Check the Log the command-line option on the Advanced tab and the Log PsExec output option on the Remote tab, rebuild the step, and send the step's build output.
Reply With Quote
  #7  
Old 06-24-2014, 08:52 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Visual Build version: 8.1.0.1

Sorry, I originally didn't see the other option for PSEXEC output. I have the PSTools copied to the Build Machines c:\windows\system32 directory is that were the GUI looks for it?


6/24/2014 9:47:46 AM: Building global subroutine step 5 - Uninstall...
C:\Windows\system32\cmd.exe /C PsExec >C:\Users\ccgord1\AppData\Local\Temp\2\PsED6A6.t mp -u DOAMIN\USER -p ************** \\SERVER.FQDN.COM MSIEXEC.EXE /x {DAD5255B-4386-479A-8CA1-27AFFB23EC59} /qn 2>&1
'PsExec' is not recognized as an internal or external command,
operable program or batch file.
Reply With Quote
  #8  
Old 06-24-2014, 09:01 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
It's failing because PsExec.exe was not found. It needs to be in the PATH environment variable of the Visual Build process. If you're using the 32-bit version of Visual Build, the System path is in a different location than for 64-bit processes. From 64-bit Explorer, it would be at C:\Windows\SysWOW64 (copy PsExec here for it to be available to 32-bit Visual Build).
http://www.kinook.com/VisBuildPro/Manual/6432bit.htm
Reply With Quote
  #9  
Old 06-24-2014, 09:23 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I am using 32 bit version on a 64 bit OS

Great thanks that worked so just to clarify:

If running 32 bit version of VB on 64 bit OS I place the PSTools in:
C:\windows\sysWOW64

If running 64 bit version of VB on 64 bit OS I place the PSTools in:
C:\windows\system32
Reply With Quote
  #10  
Old 06-24-2014, 09:28 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
That is correct (from a 64-bit process).
Reply With Quote
  #11  
Old 06-24-2014, 09:29 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Thanks again for all the help and the quick response!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:08 PM.


Copyright © 1999-2023 Kinook Software, Inc.