Bug only exists after the program is built

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

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 11 months and 3 weeks 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.
Locked
matthewmazer
Posts: 7
Last visit: Wed Jul 05, 2023 1:01 pm

Bug only exists after the program is built

Post by matthewmazer »

Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.213
OS: Windows 10 Pro (64 Bit)
Build: v10.0.19044.0

Now onto the problem...

I'm using Powershell Studio to build a Windows Self Service Store for some of my team. A lot of the functionality involves installing/uninstalling/updating programs through the use of Winget (a windows package manager provided by Microsoft/FOSS Community). There are a few programs that I install via web downloads instead (not entirely relevant for this support issue).

If I "run" this project before building it as an executable, everything works without issue. However, if I build the project and use it as a live tool (whether it's my machine or a coworker's machine) any commands that involve the use of Winget cease to work.

I'm not sure if Winget is having issues, or perhaps the GUI button? Any insight is greatly appreciated (especially if the insight is that this should be posted elsewhere).

I have the project built as a form, but have considered creating a powershell application instead, if that's the proper way to go.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Bug only exists after the program is built

Post by Alexander Riedel »

Sounds like a permission issue. It would certainly help to see what the actual error message is.
Alexander Riedel
SAPIEN Technologies, Inc.
matthewmazer
Posts: 7
Last visit: Wed Jul 05, 2023 1:01 pm

Re: Bug only exists after the program is built

Post by matthewmazer »

"It would certainly help to see what the actual error message is."

That's the tricky part, there is no error message. It just...does nothing.

I loaded some admin creds into the exe, to no avail. I've ever tried running as admin, running under my admin account directly, and running as admin while logged in as my admin account.

And nothing.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Bug only exists after the program is built

Post by Alexander Riedel »

If you package it as a Windows Form app, console output gets 'eaten' so to speak. Package as a console app. It will work the same way, but you get a console with output.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 11 months and 3 weeks 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.
Locked