Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (http://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   Cannot get psexec to work with vbp8 (http://www.kinook.com/Forum/showthread.php?t=5017)

bwilder 06-12-2012 02:21 PM

Cannot get psexec to work with vbp8
 
Hi,
I'm trying to create a build farm using VBP8. Right now I'm specifically trying to spawn of a separate child process on a remote machine and I'm having little to no luck at all.

1. Both machines are 64 bit Windows 7 ultimate machines,
2. Both machines have VBP 8 installed,
3. Both machines have the installation path for VBP in the %PATH% env variable,
4. Both machines have psexec.exe v.1.98 installed in c:\windows\system32, which is also in %PATH%,
5. I have 2 VBP scripts with 1 step each,
a. Script1 is on machine1 and its only step is supposed to kick off the VBP script on machine2,
b. Script2 is on machine2 and its only step is a "Create Folder" to create c:\BTESTFOLDER on machine2.
6. When I run the following command from the command line on machine1, I get the successful results below: "psexec \\machine2 VisBuildCmd.exe /nooutput c:\BuildFolder\BuildScripts\Script2.bld":

Code:

RRProdBuild\BuildScripts\Test1.bld

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

VisBuildCmd (x64), Version 8.0.0.3
Copyright (C) 1999-2012 Kinook Software, Inc. All rights reserved.
Registered to: Tencent Boston, Inc. (2-computer license)

VisBuildCmd.exe exited on machine2 with error code 0.

7. When I attempt to achieve the same results with a VisBuildPro Project step in script 1, I get the following response:

Code:

6/12/2012 2:13:43 PM: -------------------- Starting Build: 'TEST.bld' --------------------
6/12/2012 2:13:43 PM: Building project step 2 - VisBuildPro Project...
C:\Windows\system32\cmd.exe /C PsExec -d >C:\Users\MACH~1.TEN\AppData\Local\Temp\PsE4E6C.tmp -u tbuild -p ********** \\MACHINE2 "C:\Program Files\VisBuildPro8\VisBuildCmd.exe" /b TEST1.bld 2>&1
'PsExec' is not recognized as an internal or external command,
operable program or batch file.

Process completed with exit code 1

I get this same response when I attempt to run the command line string from step 6 in either a "Run Program" or "Batch File" step in VBP and this is where I'm stuck. From where here it looks like VBP cannot find psexec even though it's in the %PATH% and clearly available to the command line.

Any thoughts on how I should troubleshoot further?

kinook 06-12-2012 07:53 PM

Add and build a Run Program step with a command of

%DOSCMD% PATH

to show the PATH environment of the VBP process. Maybe Visual Build was launched from a Command Prompt or other process with a different PATH, or a Set Macro action that updates environment variables was run in VBP?

bwilder 06-14-2012 11:38 AM

2 Attachment(s)
Thanks for the response.

My windows PATH env =
Code:

C:\Windows\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Perforce;C:\Program Files (x86)\PostgreSQL Frontend\bin;%ANT_HOME%/bin
Results of Run Program %DOSCMD% PATH:
Code:

C:\Program Files (x86)\VisBuildPro8;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Perforce;C:\Program Files (x86)\PostgreSQL Frontend\bin;C:\Program Files (x86)\apache-ant-1.8.2/bin;C:\Program Files (x86)\Quest Software\PuTTY\
Clearly they are different, the path being used by VBP is the PATH macro in the app itself, but both have c:\Windows\System32 so it shouldn't be an issue (attach: psexec.png).

Any other thoughts? I've included a zip with the psexec.exe I'm using as well as the 2 test scripts.

kinook 06-14-2012 11:53 AM

It looks like you're running the 32-bit version of Visual Build. The 32-bit Windows "System32" folder as seen from a 64-bit app (64-bit Explorer, Cmd, etc.) is C:\Windows\SysWOW64. Copy psexec.exe to that folder from a 64-bit app to make it available to 32-bit applications. See here for more details: http://en.wikipedia.org/wiki/WoW64

bwilder 06-14-2012 02:33 PM

You, sir, are correct. Instead of moving that psexec though, I uninstalled VBP x86 and installed the x64 version, which is what I really wanted anyways. Now it works as expected.

Thanks for your help!


All times are GMT -5. The time now is 09:27 AM.


Copyright 1999-2019 Kinook Software, Inc.