Reputation: 11966
I want the url to be opened in Firefox by Powershell script
To make things a bit difficult, Firefox is not the default browser and it is a portable Firefox version.
Edit:
There seems to be some problem with my portable firefox installation. Even when making it the default browser, it doesn't work properly when invoked by start url.
I rechecked it with a fresh install of portable Firefox 4.0 from here and ittlefoot's solution works fine.
Upvotes: 7
Views: 22746
Reputation: 1
Start-Process 'C:\Program Files\Mozilla Firefox\firefox.exe' -argumentlist "-url https://stackoverflow.com"
Upvotes: 0
Reputation: 61
try
[system.Diagnostics.Process]::Start("firefox","your-url")
not sure it'll work on portable version you might have to (replace "firefox" with the path to the portable exe) however, it works even if firefox is not default.
Upvotes: 6
Reputation: 504
Using the website as the first argument should work.
X:\path-to-firefox\firefox.exe "http://website-to-launch.com/yadda"
Upvotes: 8