Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   PSExec remote credentials (https://www.kinook.com/Forum/showthread.php?t=5280)

HippyCraig 06-23-2014 12:19 PM

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?

kinook 06-23-2014 04:45 PM

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.

HippyCraig 06-24-2014 08:03 AM

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.tmp -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.tmp -u DOMAIN\USER -p PASSWORD \\SERVERNAEM.FQDN.COM MSIEXEC.EXE /i "D:\Staging\PostalLocation\ACE.NA.EA.PostalLocation .WebSetup.msi" INSTALLATIONLEVEL="TEST" TARGETSITE="/LM/W3SVC/3" TARGETVDIR="PostalLocation" TARGETAPPPOOL="TIWS-PostalLocation" /qn
pause

kinook 06-24-2014 08:16 AM

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.

HippyCraig 06-24-2014 08:38 AM

1 Attachment(s)
See attached

PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com

kinook 06-24-2014 08:42 AM

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.

HippyCraig 06-24-2014 08:52 AM

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.tmp -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.

kinook 06-24-2014 09:01 AM

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

HippyCraig 06-24-2014 09:23 AM

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

kinook 06-24-2014 09:28 AM

That is correct (from a 64-bit process).

HippyCraig 06-24-2014 09:29 AM

Thanks again for all the help and the quick response!!


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


Copyright © 1999-2023 Kinook Software, Inc.