Gui application feature not working via MSI installation

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
EddiePecanha
Posts: 4
Last visit: Tue Aug 22, 2023 1:16 pm

Gui application feature not working via MSI installation

Post by EddiePecanha »

Product, version and build: PowerShell Studio 2021 5.8.188.0
Operating system: Windows 10 Enterprise
PowerShell version(s): 5.1.18362.752

The below command works fine running from the designer, however, it doesn't work after building the app and deploying via MSI, all other options are working properly.

$ie = new-object -com InternetExplorer.Application
$ie.ToolBar = 0
$ie.Navigate2("bla,bla,bla);
Attachments
Sapien IE Issue.PNG
Sapien IE Issue.PNG (161.31 KiB) Viewed 5533 times
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 1:00 pm
Answers: 39
Been upvoted: 30 times

Re: Gui application feature not working via MSI installation

Post by brittneyr »

I have found no issues packaging and deploying a script with the following code:
$ie = new-object -ComObject "InternetExplorer.Application"
$ie.Visible = $true
$ie.ToolBar = 0
$ie.navigate2('google.com')

If you are navigating to a html document, make sure the executable is able to find it.
What type of engine are trying to package with? (Command line, Winforms, etc)
Does your executable run fine outside of PowerShell Studio before deploying via MSI?
Brittney
SAPIEN Technologies, Inc.
EddiePecanha
Posts: 4
Last visit: Tue Aug 22, 2023 1:16 pm

Re: Gui application feature not working via MSI installation

Post by EddiePecanha »

Hey Brittneyr :D

The command works fine outside PowerShell Studio using only PowerShell and also via the PowerShell Studio in designer mode, whatever, it fails to display the IE page after building and installing via MSI, it looks like something is not working properly during the packaging process.

I build the package as Windows Application and Script Application with the same results.

Thanks for your help :D
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 1:00 pm
Answers: 39
Been upvoted: 30 times

Re: Gui application feature not working via MSI installation

Post by brittneyr »

What is the actual url you are attempting to navigate to? If it is an html file, please make sure it is included with the installer.
If your script is packaged to an executable and not running after deploying, is there any errors in the event log?
Does your executable run as expected without any errors in the Tools Output pane from PowerShell Studio from the ribbon
(Home->Build and Run->Package):
SPS_RibbonBuildAndRun.png
SPS_RibbonBuildAndRun.png (42.21 KiB) Viewed 5509 times
Also, please verify that the machine you are deploying to has IE installed.
Brittney
SAPIEN Technologies, Inc.
EddiePecanha
Posts: 4
Last visit: Tue Aug 22, 2023 1:16 pm

Re: Gui application feature not working via MSI installation

Post by EddiePecanha »

It's working now :D

I was creating 2 exes with different names, 1 from the packager task pane and another from the installer task pane.

Creating just 1 exe file with the same name fixed the problem.

Now I need to figured out how to create a desktop shortcut :D

Thanks for your help
Attachments
Sapien Panes.PNG
Sapien Panes.PNG (33.77 KiB) Viewed 5492 times
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 1:00 pm
Answers: 39
Been upvoted: 30 times

Re: Gui application feature not working via MSI installation

Post by brittneyr »

This can be done with two custom actions: One to create the shortcut on install and one to delete the shortcut on delete.

Though this blog is a little older, it has scripts for creating and removing a desktop shortcut:
https://www.sapien.com/blog/2019/08/15/ ... xecutable/
Brittney
SAPIEN Technologies, Inc.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.