Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript to start Firefox with profile

Status
Not open for further replies.

stevemarks59

Technical User
Apr 8, 2010
22
US
My OS is XP-Pro SP3

I use the two command lines below to start Firefox with a desired profile.

"C:\Program Files\Mozilla Firefox\firefox.exe" -p STEVE

"C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -p JANE


This script will start Firefox using the default profile:

-------------------------------------------------
sub shell(cmd)
dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run(cmd)
Set objShell = Nothing
end sub

shell """C:\Program Files\Mozilla Firefox\firefox.exe"""

-------------------------------------------------
How can I edit this line

shell """C:\Program Files\Mozilla Firefox\firefox.exe"""

to start Firefox with the desired profiles?


I have tried this line

shell """C:\Program Files\Mozilla Firefox\firefox.exe"" ""--no-remote -p JANE"""

But the script still starts Firefox with the default profile.

I appreciate any help given to me. Thanks







 
Try:

shell """C:\Program Files\Mozilla Firefox\firefox.exe"" -p STEVE"
 
My question was answered here:


My link


This is what worked:

STEVE.vbs

sub shell(cmd)
dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run(cmd)
Set objShell = Nothing
end sub

shell """C:\Program Files\Mozilla Firefox\Firefox\firefox.exe"" --p STEVE"




JANE.vbs

sub shell(cmd)
dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run(cmd)
Set objShell = Nothing
end sub

shell """C:\Program Files\Mozilla Firefox\Firefox\firefox.exe"" --no-remote -p JANE"




The modifications given to me by "Razor2.3" at that forum worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top