Invoke Windows Installer in Interactive mode Through Jenkins

405 views
Skip to first unread message

Bangar Milind

unread,
Apr 6, 2017, 3:17:57 AM4/6/17
to Jenkins Users
Hi,

We are trying to automate the deployment of a windows application in which Setup.exe runs a MSI.

The MSI launches in interactive mode and has fields which will be required to updated dynamically.

We have written a Powershell script , which works fine when running on the Windows app server , but doesn't  when PS is called from Jenkins using a Windows slave.

If anyone has an experience on the same, request some help.

Please let me know, if further information is required.,

Regards
Milind

Benjamin Lau

unread,
Apr 6, 2017, 3:51:09 AM4/6/17
to Jenkins Users
Bangar,

I'd suspect the problem is similar to the one described in this thread about 10 days ago:

Is your jenkins slave running the agent as a service? Try running the agent as a non-service as slide suggested and see if that works for you.

Cheers,
Ben

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/208c57d1-462e-4102-94c6-e6833faf7f12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Glöckler

unread,
Apr 6, 2017, 4:07:53 AM4/6/17
to jenkins...@googlegroups.com

Hi,

 

we also have a windows server product which needs to be installed interactively. We have (click-)automated the installation process with AutoIt.

To get around the issue mentioned below, you might want to run your script in the context of a “real” user and load the user’s profile. CMD.exe’s “runas” does not let you specify the password on the command line, so it is no good for scripts. Maybe psexec or even a Powershell session, but I have not tried that.

As said,  an Autoit Program, run from the Jenkins slave (running as a service), does the trick for us.

 

Cheers,

Sebastian

 

From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On Behalf Of Benjamin Lau
Sent: Thursday, April 6, 2017 9:51 AM
To: Jenkins Users <jenkins...@googlegroups.com>
Subject: Re: Invoke Windows Installer in Interactive mode Through Jenkins

 

Bangar,

 

I'd suspect the problem is similar to the one described in this thread about 10 days ago:

 

Is your jenkins slave running the agent as a service? Try running the agent as a non-service as slide suggested and see if that works for you.

 

Cheers,

Ben

On Thu, Apr 6, 2017 at 12:17 AM, Bangar Milind <milindb...@gmail.com> wrote:

Hi,

 

We are trying to automate the deployment of a windows application in which Setup.exe runs a MSI.

 

The MSI launches in interactive mode and has fields which will be required to updated dynamically.

 

We have written a Powershell script , which works fine when running on the Windows app server , but doesn't  when PS is called from Jenkins using a Windows slave.

 

If anyone has an experience on the same, request some help.

 

Please let me know, if further information is required.,

 

Regards

Milind

--

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

 

--

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2BvtdQY5-8suoTWOG43Zc7UTBkHSCwug-uHFjiuPbKZcNV_YiQ%40mail.gmail.com.

Bangar Milind

unread,
Apr 6, 2017, 2:19:28 PM4/6/17
to Jenkins Users, Sebastian...@cortado.com
Thanks Sebastian for the pointer..

We are using Powershell remote session using WinRM service and then trying to run the installation interactively.

We tried with the solution provided by Benjamin in earlier post ad are able to install interactively. However, require a user session available. Meaning when I am on windows box through RDP the installation goes through , but if I minimise the window or disconnect, then it does not work. Any further configuration required for the same?

Is Autoit an open source tool?

Regards
Milind

Sebastian Glöckler

unread,
Apr 7, 2017, 3:20:59 AM4/7/17
to Bangar Milind, Jenkins Users

Hi,

 

AutoIt is a basic-like scripting environment, which exposes parts of the lower-level Windows API. It’s free to use, no strings attached, but not open source. Documentation is also quite good. Look here for running a program in a different user context:

 

https://www.autoitscript.com/autoit3/docs/functions/RunAs.htm

 

Once you started the program, you can identify Elements in the  GUI, fill in fields, click buttons etc. and interact with them via ControlClick, ControlCommand inside the user session. No need for a “visible” screen, like an RDP session.

 

Cheers, Sebastian

Reply all
Reply to author
Forward
0 new messages