converting ps1 script to exe, $psrootscript seems not working

biswajeet Kumar 41 Reputation points
2021-03-25T05:50:40.497+00:00

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
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,355 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,486 Reputation points Microsoft Vendor
    2021-03-25T06:51:01.64+00:00

    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.

    0 comments No comments