Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making exe from a script having argument seems to be not working #5

Open
orlith opened this issue Oct 21, 2020 · 1 comment
Open

making exe from a script having argument seems to be not working #5

orlith opened this issue Oct 21, 2020 · 1 comment

Comments

@orlith
Copy link

orlith commented Oct 21, 2020

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.

Is that bug or am I doing something wrong ?

Thx

@DSorlov
Copy link
Owner

DSorlov commented Jan 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants