-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Exec doesn't work well with forward slash arguments #209
Comments
@CoenraadS I am not yet sure it's about
The first command is not correct, indeed. The second looks correct. What is in your |
The full command is:
If I run it directly in powershell, it also returns immediately, unless I add => Works ok: But if I try to that to the exec block, I get e.g. The innosetup installer does trigger a UAC prompt, not sure if related. |
I do not think you use |
Hmm I got it from this answer and it works for me: https://stackoverflow.com/a/24439202/4503491 Powershell version: 5.1.19041.2364 Invoke Build version: 5.10.2 It's not really a big problem, for now I am just using my own helper function as workaround:
|
Like I said, it is not about Disclaimer. I do not use innosetup, the above thoughts are just common sense. |
Yes, but I use this nice framework so I could avoid having to write my own helper scripts. Would be nice to support this out of the box, since I don't think it's so unusual, that was all. Indeed I see now it has nothing to do with the forward arguments as I first though. |
$process = Start-Process $installerPath "/verysilent /allusers /dir=$innoSetupDir" -Wait -PassThru
# check $process exit code here I do not think any support from |
Hello, first of all, really nice project :)
I am trying to run InnoSetup, which uses forward slash arguments, e.g.
This doesn't work very well, as powershell complains
You must provide a value expression following the '/' operator.
So then I try to workaround by using
&
But now it returns immediately, and doesn't behave correctly on errors.
I understand this is limitation of using
[scriptblock]
to pass the arguments.I was wondering if perhaps it's an idea to make something like
exec-process ($Command, $ArgumentList)
, which would just callStart-Process
under the hood to handle these situations.Then I could use e.g.
exec-process $installerPath "/verysilent /allusers /dir=$innoSetupDir"
The text was updated successfully, but these errors were encountered: