tags:

views:

153

answers:

1

Hi All,

I have a batch file that calls "MSIExec /X {MyGUID} /qn". This runs successfully when run with my admin user. When I run it as a Window Batch command from a Hudson job it fails with "T�h�e� �i�n�s�t�a�l�l�a�t�i�o�n� �s�o�u�r�c�e� �f�o�r� �t�h�i�s� �p�r�o�d�u�c�t� �i�s� �n�o�t� �a�v�a�i�l�a�b�l�e�.� � �V�e�r�i�f�y� �t�h�a�t� �t�h�e� �s�o�u�r�c�e� �e�x�i�s�t�s� �a�n�d� �t�h�a�t� �y�o�u� �c�a�n� �a�c�c�e�s�s� �i�t�.� "

I am inclined to think that the issue is that the job is started by the "anonymous" user rather than my admin user.

How in hudson do I "tie" the job to be run under the admin user?

Thanks in advance.

Regards,

Andrew

A: 

You have two options, the first one is, running Hudson under an Admin user (usually a bad idea) or use the runas command. To avoid entering a password you might need to use the /savecred option.

BTW, did you read the error message? Here is the readable version of it:

"The installation source for this product is not available. Verify that the source exists and that you can access it. "

Peter Schuetze
I tried this but unfortunately it did not work. My batch file is:@ECHO OFFECHO "Uninstalling application..."runas /savecred /user:adminUser MsiExec.exe /X{myGuid} /qn /log UninstallLog.txtECHO "Uninstallation of application completed."Exit 0I call this batch file as a Windows Batch Step from hudson like so:trunk/Uninstall.bat.The job reports success but nothing is done. The application remains installed.It I manually run the batch file with the adminUser from a cmd prompt it works perfectly.Why won't it work from Hudson?
Andrew
Have a look at the KB article from Microsoft. http://support.microsoft.com/kb/306541 --- Did you save the credentials for the account that hudson is using? The credentials that you save will only be available for the user saving the credentials. I am not aware that the localSystem, localService, or the NetworkService can store credentials.
Peter Schuetze
Is there something in the Uninstall.log?
Peter Schuetze
I have 'Run Hudson as a Windows Service' after launching it initially via JNLP.I can stop the hudson service and hudson is still up. Therefore, what user is hudson running as?I'm using Windows 2003 SP1, not Windows XP.
Andrew
That sounds weird that hudson still runs after launching it as a service. Sounds more like there is a second instance of Hudson still running. I am not sure what you see in the task manager when starting hudson via jnlp. If you start it as a service you will see an Hudson.exe. Check the Task Manager for any other Hudson instance running (may might need to check "Show processes from all user accounts"). If that doesn't help, try to shutdown the server by accessing `http://server/hudson/exit`. Don't forget to login if security is enabled.
Peter Schuetze
I am running the service as the administrator account....jobs still start as the anonymous user in Hudson. That said I have a user with the same name as the admin user in hudson participating in the continuous integration game. How do I get jobs to start as this user?
Andrew
If I set Security in hudson and log in as the user with the same name as my windows admin user the Uninstall job will run successfully.Getting closer, but the Install is not working. I get the message: "This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package."Even though the step before MsiExec.exe /i eStoreAdminWix.msi /qn /log InstallLog.txt is to change directory to where the msi is.Why can't the install command run?
Andrew
BTW, what Do you mean by the Job runs under the Admin user?? Do you mean that Hudson states: "Job started by.."? This are not the permissions that the OS sees, the job will always be with the permissions of the user that the Hudson service runs on.
Peter Schuetze

related questions