I am trying to compile two separated Powershell files into a single .EXE using the solution PowerGUI . It seems to support this feature as it even has a button called Dependencies for that purpose. But I couldn't find any example of how to refer to a dependency file from any other PowerShell file included in the same .EXE
My main PS file only contains the following line:
Start-Process powershell.exe -ArgumentList "-noexit -file C:\PGM\usbControl.ps1"
I would like to know how to encode "C:\PGM\usbControl.ps1" as a relative path inside the .EXE package and point to the dependency included.
Thanks.
Finally I didnt have to use any external IDE, standard powershell code did the trick. Embed code! :) the ScriptBlock was the key.
After this nice workaround, I just used the PS2EXE tool to compile it.