question

biswajeetKumar-3437 avatar image
0 Votes"
biswajeetKumar-3437 asked IanXue-MSFT answered

converting ps1 script to exe, $psrootscript seems not working

Hi,

I have converted a PowerShell script of a UI to exe using PS2exe module. In the script, I used one image and gave the location of image as $PSScriptRoot\image.png.

It was working when running the .ps1 file but after converting it to exe, the image does not appear in the UI. Is there other method for exe files?

Thanks

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

As it's a third-party module you can report the issue to the author for better help. Or you may try the other ways over here

https://adamtheautomator.com/ps1-to-exe/

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.