Hello
I'm trying to convert to an exe file a simple script that needs 2 arguments.
Running the ps1 populates the 2 variable with the 2 arguments I passed
Running the exe (made with the same ps1) returns only default value
Investigating shows that variables are not populated .
Here is the simple code test.ps1
Param([STRING]$clipboard = "defaultvalue", [STRING]$APP = "test",[SWITCH]$SELECT) Write-Host "Text: $clipboardnAppli: $app"`
so running "test.exe param1 param2" returns text:defaultvalue Appli:test
where runing t he ps1 returns : text:param1 Appli:param2
Building the exe using PS2EXE instead of New-SelfHostedPS solve my issue.
With PS2EXE conversion polulating variables from a passed arguments works fine.
Looking into this. Not sure if I will fix sue to the severe lag in the library (have not been kept up 2 date). Will update as soon as I had a chance to check it out.
Hello I'm trying to convert to an exe file a simple script that needs 2 arguments. Running the ps1 populates the 2 variable with the 2 arguments I passed Running the exe (made with the same ps1) returns only default value Investigating shows that variables are not populated .
Here is the simple code test.ps1
Param([STRING]$clipboard = "defaultvalue", [STRING]$APP = "test",[SWITCH]$SELECT) Write-Host "Text: $clipboard
nAppli: $app"`so running "test.exe param1 param2" returns text:defaultvalue Appli:test where runing t he ps1 returns : text:param1 Appli:param2
Building the exe using PS2EXE instead of New-SelfHostedPS solve my issue. With PS2EXE conversion polulating variables from a passed arguments works fine.
Is that bug or am I doing something wrong ?
Thx