Start-Process will not open .PDF from compiled package

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 6 years and 9 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.
User avatar
DHHSIS
Posts: 2
Last visit: Wed Mar 27, 2024 2:05 pm

Start-Process will not open .PDF from compiled package

Post by DHHSIS »

Product, version and build: PowerShell Studio 2017 5.4.141
32 or 64 bit version of product: 64 bit
Operating system: Windows 10 Version 1703
32 or 64 bit OS: 64 bit
PowerShell Version: 5.1.15063.296

I'm having trouble opening a .pdf using Start-Process, using the code shown below.

$buttonOpenForm_Click={
Start-Process ("filesystem::\\Server\_RECEIVEDFORMS\6897.pdf")
}


The code works fine when run from the Designer, but when compiled to an executable package the default .pdf viewer (Adobe Reader DC) just hangs with two Background processes in the Task Manager.
Capture.JPG
Capture.JPG (22.71 KiB) Viewed 1409 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Start-Process will not open .PDF from compiled package

Post by davidc »

I ran a quick test on my end and I was unable to reproduce this issue.

What settings are you using for the packager engine?
Are you using alternate credentials or elevation?
David
SAPIEN Technologies, Inc.
User avatar
DHHSIS
Posts: 2
Last visit: Wed Mar 27, 2024 2:05 pm

Re: Start-Process will not open .PDF from compiled package

Post by DHHSIS »

I am running the .exe as an Administrator. When I run it as a non-admin, it works (I just realized that).

As for the Packager settings, it may just be easier to show you-
Packager Engine.JPG
Packager Engine.JPG (71 KiB) Viewed 1385 times
Packager Output Settings.JPG
Packager Output Settings.JPG (67.43 KiB) Viewed 1385 times
Packager Execution Restrictions.JPG
Packager Execution Restrictions.JPG (65.79 KiB) Viewed 1385 times
Build Options is blank.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Start-Process will not open .PDF from compiled package

Post by davidc »

Interesting that Run as Admin is failing. Make sure that the Administrator has access to the network share.
David
SAPIEN Technologies, Inc.
This topic is 6 years and 9 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.