Reputation: 5941
This works just fine:
Start-Job -Name notepadpp -ScriptBlock { c:\directory\install\npp.6.5.1.Installer.exe /S }
This however does NOT:
Start-Job -Name notepadpp -ScriptBlock { & "$using:pwd\install\npp.6.5.1.Installer.exe /S" }
What am I missing?
Upvotes: 0
Views: 152
Reputation: 5941
Start-Job -Name notepadpp -ScriptBlock { & "$($using:pwd)\install\npp.6.5.1.Installer.exe" /S }
Upvotes: 0
Reputation: 5548
It should probably be
Start-Job -Name notepadpp -ScriptBlock { & "$($using:pwd)\install\npp.6.5.1.Installer.exe /S" }
Upvotes: 1