Script Packager and W2012 - impossible combination

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 10 years and 2 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
User avatar
jyrki.huikuri
Posts: 13
Last visit: Mon Mar 15, 2021 11:00 pm

Script Packager and W2012 - impossible combination

Post by jyrki.huikuri »

Greetings from Finland!!

I use SAPIEN Powershell Studio 2012 and I have done application with GUI.

I have generated exe file using Script Packager and alternate credentials. Every exe file works fine on Windows Server 2003 and Windows Server 2008 platforms. But same exe files do not work on Windows Server 2012 platforms. When I execute same script as .ps1 format everything works fine.

Script Packager settings are
Platform: Forms (64 Bit)
Powershell version: 3
Manifest Creation: Enbed a default manifest
Execution: Run as specified user (xxxx@yyyy.ccc)
File Version: 2.35.0.0
Product Version: 1.0.0.0

When I define
Execution: Execute as logged on user
and log on as same user everything works fine.

So, alternate credentials does not work. Has anyone met same problem? How to resolve this issue?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Script Packager and W2012 - impossible combination

Post by jvierra »

How do you know it doesn't work? What error are you getting?

Package a simple script with no alternate credentials. Does it work?

Does you script require elevation?

Can you place trace statements into the script and see it execute anything?
User avatar
jyrki.huikuri
Posts: 13
Last visit: Mon Mar 15, 2021 11:00 pm

Re: Script Packager and W2012 - impossible combination

Post by jyrki.huikuri »

Now I know what is the problem.

I cannot import ActiveDirectory and GroupPolicy modules as alternate credentials on my script. GUI is freezing and finally showing "Not Responding" message.

I think that script cannot load PS modules but how to resolve this. Can anyone help me?

Same error happened on Windows 2008 and Windows 2012 platforms.

I have Powershell Studio 2012 3.1.32.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Script Packager and W2012 - impossible combination

Post by jvierra »

Why are you using alternate credentials?

Can you run package without alternate credentials?

How do you know I is the import that is causing the freeze? What have you done to troubleshoot this?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Script Packager and W2012 - impossible combination

Post by jvierra »

FYI - I just ran this with GP and AD modules on WS2008 ith no issues.

If you are still having issues then you can try posting in the Product Support forum for PowerShell Studio.

http://www.sapien.com/forums/viewforum.php?f=12
User avatar
jyrki.huikuri
Posts: 13
Last visit: Mon Mar 15, 2021 11:00 pm

Re: Script Packager and W2012 - impossible combination

Post by jyrki.huikuri »

More information about this case.

When I define on Script Packager

PowerShell Version: 2
- executable file is working

PowerShell Version: 3
- executable file not working
This topic is 10 years and 2 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