Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Help needed with Windows Batch Command #2577

eric-hanzl ·
Hello,

I can run my command from the box (ny-vpc-qbs03) with no issues.

C:\build\scripts\DaisyInstall.exe {9C499992-703F-11d3-97C0-0000F6C4BA9E}


But I can not get this to run from quickbuild.

I chose Shell/Batch Command step and for command entered:

C:\build\scripts\DaisyInstall.exe {9C499992-703F-11d3-97C0-0000F6C4BA9E}

When I try to run I get a success and this in the log but nothing happens on the build agent?

15:16:12,411 [master>Install Application@ny-vpc-qbs03:8811] INFO - Checking step execute condition...
15:16:12,411 [master>Install Application@ny-vpc-qbs03:8811] INFO - Step execute condition satisfied, executing...
15:16:13,864 [master>Install Application@ny-vpc-qbs03:8811] INFO - Executing pre-execute action...
15:16:13,864 [master>Install Application@ny-vpc-qbs03:8811] INFO - Running step...
15:16:13,864 [master>Install Application@ny-vpc-qbs03:8811] DEBUG - Executing command: C:\build\scripts\DaisyInstall.exe {9C499992-703F-11d3-97C0-0000F6C4BA9E}
15:16:13,864 [master>Install Application@ny-vpc-qbs03:8811] DEBUG - Command working directory: C:\QB\buildagent\workspace\DDS Root\VB\Spectra\DS\Build\TEST National Buy Toolkit
15:16:13,958 [master>Install Application@ny-vpc-qbs03:8811] INFO - Executing post-execute action...
  • replies 6
  • views 3311
  • stars 0
robinshen ADMIN ·
In case QB agent "ny-vpc-qbs03:8811" runs as NT service, please stop it and run it from console where you successfully issued the "DaisyInstall.exe" command:
bin\agent.bat console
Then run the build again to see if it works.
eric-hanzl ·
If i run qb agent as you suggested from console the batch file runs.

But I need to run this batch file as a service as i restart these build nodes all the time. How do I get this batch file to run when QB agent is running as a service?
robinshen ADMIN ·
If console mode works but service mode does not work, there are two reasons:
1. The script itself may need to interact with desktop (showing UI, waiting for user input, etc. ), you may test if it works by checking the "interact with desktop" option of the service in windows service panel.
2. Service mode lacks some key environment while console mode has it. You may print all environment variables of the service mode (by running "cmd /c set" as a step in QB) and compare it to console mode to see if it lacks something.
drdt ·
I have also encountered a situation where a real user with a profile folder (for example, C:\Users\myname\.ssh) is needed to run some applications. Or that some elevated privileges are required.
In both of these cases, running as the local system user fails the build even with desktop interaction enabled.
robinshen ADMIN ·
Windows service also has the option to run as specific user. Have you tried that?
drdt ·
Yes, that is how I got around the problem.