EXE with Exchange powershell

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 4 years and 7 months 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.
userausera
Posts: 2
Last visit: Tue Aug 27, 2019 1:59 pm

EXE with Exchange powershell

Post by userausera »

Greeting

Product, version and build: Studio

Have a question for studio.

I have a development windows 10 machine with Microsoft exchange Powershell installed, the script working no any issues.

if I compile it to an EXE file, it will works on this development machine no issue.

But if the TARGET machine is a normal windows 10 machine, say clean new installed (for sure no Microsoft exchange powershell installed). Can I still run that EXE file without issue?

Thanks and Best Regards,
usera
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: EXE with Exchange powershell

Post by Alexander Riedel »

No, it will not work. Its not compiler, its a packager. Any dependencies you have must also exist on the target machine.
The underlying mechanism is still PowerShell, so any snapins, modules etc you use must be present.
Alexander Riedel
SAPIEN Technologies, Inc.
userausera
Posts: 2
Last visit: Tue Aug 27, 2019 1:59 pm

Re: EXE with Exchange powershell

Post by userausera »

Thanks Alexander,

Any workaround base on using studio.

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

Re: EXE with Exchange powershell

Post by Alexander Riedel »

Three ways this is usually done.

1. You create one script and package it as an executable that checks if all the stuff you need is there. If yes, it launches the main application.
This way you check every time the application is launched. If something is missing, you launch the appropriate installer(s) from your network or the internet.

2. You create an MSI with PowerShell Studio to properly install your application. In a custom action you check if what you need is there and if not, you install it.
The check for prerequisites in only on install that way.

3. Your script in your application checks in the beginning if all what is needed is present. If not display an error with instructions for the user what to do and fail gracefully.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 4 years and 7 months 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.