Opening an IE windows from script in package

Powershell script to open browser runs properly on ISE, but does not open when run in Octopus deployment.

Attached ps1 has two steps associated.

  1. Moving files
  2. Opening Browser.

Step 1 is executed successfully in both environment. While step 2 executes only on ISE. Please guide.

PowerShellScript.ps1 (547 Bytes)

Hi Paresh,

Thanks for reaching out. The reason why the script to open the browser works from the ISE, is because you are opening it from a Powershell interactive console that’s being executed by a logged in user (you).

Octopus doesn’t quite work that way. What it does is trigger the Powershell scripts from a windows service, which counts as a non-interactive session. For this reason you cannot open interactive things such as browsers. It is briefly explained in this StackOverflow link http://stackoverflow.com/questions/19296766/powershell-start-ie-on-remote-machine-with-specific-url .

Regards,
Dalmiro

Thanks Dalmiro,

Let me give you overview of what I am trying to achieve.
After the deployment on Octopus, I want to move build files into “Desktop Module” folder under my root directory of DNN Module. And then open my DNN site in a browser.

For a testing purpose, I tried opening google.com.
Let me know if you have any other alternative to achieve this.

Regards,

Paresh Solanki
Module Lead

[PMC Retail]http://www.pmcretail.com/

[http://www.pmcretail.com/assets/templates/pmcretail/images/email-signature/social-twitter.jpg]https://www.twitter.com/PMCRetail

pmcretail.comhttp://www.pmcretail.com/

6th & 5th Floor, Corner Heights, B/s, DPS School, Old Padra - Vadsar Ring Road, Vadodara - 390012, Gujarat, INDIA.
Tel: 0265 2290587 | Fax: 0265 - 2290587 | Mobile: +91 8905141884

[http://www.pmcretail.com/assets/templates/pmcretail/images/email-signature/pmc-banner.jpg]http://storeenabler.pmcretail.com/
Paul Mason Consulting Limited is registered in England and Wales: No.04144304. Registered Office: 30-32 Blacklands Way, Abingdon, Oxon, OX14 1DY

This e-mail transmission and any files transmitted with it are confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient, you must not copy, distribute or disseminate the information, or take any action in reliance of it. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Company. If you have received this message in error, do not open any attachment but please notify the sender (above) deleting this message from your system. Please rely on your own virus check no responsibility is taken by the sender for any damage arising out of any bug or virus infection.

image003.jpg

image001.png

image002.jpg

Hi Paresh,

The key here is that the Tentacle (which is what executes your Powershell script) runs as a Service. When you try to open IE from a the Tentacle service, you do get to open an IExplorer.exe background process (you can see it on the Task Manager), but you cannot interact with it from the UI.

Sorry for the crappy news,
Dalmiro

Thanks for the reply Dalmiro !

Regards,

Paresh Solanki
Module Lead

[PMC Retail]http://www.pmcretail.com/

[http://www.pmcretail.com/assets/templates/pmcretail/images/email-signature/social-twitter.jpg]https://www.twitter.com/PMCRetail

pmcretail.comhttp://www.pmcretail.com/

6th & 5th Floor, Corner Heights, B/s, DPS School, Old Padra - Vadsar Ring Road, Vadodara - 390012, Gujarat, INDIA.
Tel: 0265 2290587 | Fax: 0265 - 2290587 | Mobile: +91 8905141884

[http://www.pmcretail.com/assets/templates/pmcretail/images/email-signature/pmc-banner.jpg]http://storeenabler.pmcretail.com/
Paul Mason Consulting Limited is registered in England and Wales: No.04144304. Registered Office: 30-32 Blacklands Way, Abingdon, Oxon, OX14 1DY

This e-mail transmission and any files transmitted with it are confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient, you must not copy, distribute or disseminate the information, or take any action in reliance of it. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Company. If you have received this message in error, do not open any attachment but please notify the sender (above) deleting this message from your system. Please rely on your own virus check no responsibility is taken by the sender for any damage arising out of any bug or virus infection.

image003.jpg

image001.png

image002.jpg