Im looking to convert my ps1 to exe. it has to be some kind of a compiler that can accept parameters since i would like this exe file to be a bit different some times. for example i may have inside the script:
$var1 = 0
$password = 'blabla'
I would like to to make it possible to compile it with the possibility to change $var1 or $password WITHOUT making any change in the ps file. is that possible?
**edit
After researching the subject, My goal was to make a template script and being able to manipulate the script and create more scripts from the template. in the template i had for examples variables of paths, usernames and so on. so i created a template script, and then another script which goes into the template script, reads it and then us the -replace method to replace what is needed and create a new script. after that i used ps2exe script to compile it to exe
My Solution was:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.