views:

415

answers:

4

Is there any free software to package a powershell script into a standalone WIN32 executable?

It seems it was possible to get the powershell beta's to run on win2000 and winNT, is there any known way to get the final powershell to run on it?

+1  A: 

I don't think there is any software that will package a PowerShell script into a stand-alone executable. That would require bundling PowerShell itself with the script (no small feat).

The oldest supported OS is Windows XP SP2, so there is not a supported way to get PowerShell to run on NT or 2000.

aphoria
A: 

A easy step would be to create a .NET exe which embedded the script.

This would, of course, require PSH (and any non-standard snapins) installed when executed.

To remove those dependencies you would need to be able to handle any cmdlets used, as noted @aphoria this would be reinventing PSH, and all the snapins.

Richard
A: 

Not strictly the answer you are looking for (free software), but it may be useful to others. Here are some commercial options for packaging scripts into single executables:

Admin Script Editor

PrimalScript OR PrimalPackager (just packaging portion of PrimalScript)

JasonMArcher