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.

Batch file hanging at 'isbuild' invocation step #1857

ikotlova ·
Hello,

I have a problem while moving a build procedure to QuickBuild.

The build procedure comes down to 'ant <target>' where <target> executes another command prompt with the batch file in it. The batch file is building setup with InstallShield 5.5: doing some file/directory manipulations, then invoking 'compile', then invoking 'isbuild'. Everything works if started in Windows command prompt in the project root directory. Everything also works by running 'ant -f <build.xml_location> <target>' from Start->Run.

I ported the build procedure to QuickBuild and it happen to hang indefinitely at the moment of 'isbuild' invocation. I tried to change the command line and specified all full names, set the silent mode with '-s'. Nothing helps. Here is the command line in general:
isbuild -mDefault -p"..\project" -b".\output"

1) It is not about finding 'isbuild' - evidently isbuild.exe is found, otherwise there would have been an error message. Besides 'compile.exe' is found and compilation ends successfully. Compile.exe and isbuild.exe are in the same InstallShield directory.
2) I can successfully execute the batch file from Start->Run by specifying build.xml location. So, it's not about not setting the current directory of the batch file execution.

Any ideas how to make 'isbuild' not to hang but to build the setup project?

Thank you!
Irina
  • replies 11
  • views 4714
  • stars 0
robinshen ADMIN ·
Hi Irina,

Can you please start QuickBuild in console mode (by running "bin/server console", or "bin/agent console" if you are running the build on a QB agent) and run the batch to see if it can pass through?

Regards
Robin
ikotlova ·
Hi Robin,

Starting the QuickBuild agent in console mode did a trick and the build passed through.
I tried 'isbuild' invocation from the batch file in different ways: specifying explicit full files/directories names and relative names - this had no reaction. All attempts on the 'regular' agents hang, all attempts on the 'console' agent succeeded.

This is a good news, indeed.
What is the difference between regular and console modes?
Is it possible to make it work in the regular mode? Would be nice to make it working.

Thank you!
Irina
robinshen ADMIN ·
Hi Irina,

Please open windows service control panel and edit the service to check the "interact with desktop" to see if it works.

Regards
Robin
ikotlova ·
Robin,

QuickBuild service is started by non-Local System account, 'Allow service to interact with desktop' checkbox is disabled. Changing the account type to Local System account would be very complicated as I have to comply with the company rules.
Is there another way?

Thank you!
Irina
robinshen ADMIN ·
Hi Irina,

There is no easy way to achieve this as NT service can only allow to interact with desktop when run with local system account. A workaround is to auto-start QB agent in console mode by placing the command "agent console" in startup menu.

Regards
Robin
ikotlova ·
We have set of contradicting constraints. As a result it is still undesirable to start the QB service in a command prompt console via Startup.
I see that there is the parameter in conf/wrapper.conf file:
wrapper.ntservice.interactive=false
I tried to set it to 'true' and start QB service normally (still without engaging local system account) but it did not work. Seems like Windows ignores the setting. Is there a way to override it?

Thanks much!
Irina
ikotlova ·
Uh... I spend incredible amount of time just to resolve this problem...

The requirement is to start the service under a specific (domain) user as digital signing is involved, and the signing should be done with certain permissions to just one user, without login permission to the system. At the same time the service can only be started in the console. I tried to update wrapper.conf with the 'wrapper.ntservice.account' and 'wrapper.ntservice.password', but they are not picked up in the console mode.
robinshen ADMIN ·
The various "wrapper.ntservice" properties only take effect when installing QB as service (running "server install"), it will no longer take effect after service has been installed (since you can then control the service properties directly from service control panel). Since the option "allow to interact with desktop" is only allowed when service is running in "local system" account, and your build script needs to interact with desktop to continue, I can not think of a workaround except to modify the script.
ikotlova ·
I am wondering how the script can be fixed?

I tried using direct Ant 'exec' task:
<exec dir="${toolkitinstall.dir}" executable="cmd"
osfamily="windows"
spawn="true"
>
<arg value='/c' />
<arg value='isbuild -mDefault -p"${toolkitinstall.dir}" -s' />
</exec>
It does not work in QB. Both cmd.exe and the child ISBuild.exe processes are hanging in the Task Manager. It is interesting that the installation media is successfully built.
It works fine in the command prompt though.

The problem is in QB-Ant-IS interaction, isn't it? Could you, please look into this?
ikotlova ·
Actually no, the media is not built. The 'output' folder is empty. Can it be the permission issue in the QB-controlled directory?
robinshen ADMIN ·
Although your script works from a command prompt, it will not work when invoking from any NT service as it seems that it tries to access user session relevant facilities. I am not be of much help here as it is not a QuickBuild issue (to convince yourself, you may write a simple service using visual studio and call your command, and I am pretty sure it also hangs). You may contact the script vendor to check the problem.