Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My script will not run as a PS2EXE #4

Open
mcdonamw opened this issue Jun 24, 2022 · 3 comments
Open

My script will not run as a PS2EXE #4

mcdonamw opened this issue Jun 24, 2022 · 3 comments

Comments

@mcdonamw
Copy link

I used the PS2EXE to convert my script to EXE but all it does is flash on the screen when ran. Running the script works fine.

I'm not sure how to debug this PS2EXE process to even begin looking at where the issue is. Doesn't seem to be any relevant documentation on PS2EXE. Thoughts or suggestions?

@rzander
Copy link
Owner

rzander commented Jun 24, 2022

Add some logging logic to your script to see if and what is running... or post an example of your script...

@mcdonamw
Copy link
Author

mcdonamw commented Jun 27, 2022

So I ended up using the ps2exe gui version and made some progress (I'm getting stuff on screen), but unfortunately it's a bunch of errors. After the errors, many of the Write-Host statements I have in the script are displayed as annoying dialog boxes. I haven't gone through your documentation yet but is that expected?

If I use the suppress error option just to see if my form loads (it's a WPF application), I get the first few write-host/dialog boxes as expected but once done, it simply disappears with no form shown. The error in the picture appears to be the attempt to parse the XAML that creates the form so I guess that's why no form is shown. Is PS2EXE not compatible with WPF/XAML forms or something?

image

Update I just realized the GUI version I'm referencing is a different PS2EXE project from a differ author. My bad.

@rzander
Copy link
Owner

rzander commented Jun 27, 2022

Stupid question, but why not compiling an EXE directly by using C# and WPF ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants