3 ms·
Didn't work for me, I think you have to prepend with a & so & notepad.exe Which isn't complicated I agree but annoyed me.
by rb808 9y ago
Didn't work for me, I think you have to prepend with a & so
& notepad.exe
Which isn't complicated I agree but annoyed me.
- AnIdiotOnTheNet 9y agoWhat version of Powershell are you using? Just typing "notepad" is enough to launch it. The problems with powershell and executables only really come in to play when argument passing, where some escaping is necessary.
- rb808 9y ago3, we still have win7 at work.
- joeyaiello 9y agoYou can download and install PowerShell Core 6 completely side-by-side with Windows PowerShell 3.0. We even have a portable ZIP you can drop down wherever: https://github.com/powershell/powershell/releases https://github.com/powershell/powershell/releases
- Arnavion 9y agoThe only reason to use iex is if the thing you're trying to execute is not directly the name of the process. So you need & for `&'notepad'` and `&$string_variable` but not `notepad`