VBScript to start Firefox with profile

February 4, 2011 at 09:51:38
Specs: Windows XP, 2.0 GHz, 512MB
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


See More: VBScript to start Firefox with profile

Report •


#1
February 4, 2011 at 11:53:02
shell """C:\Program Files\Mozilla Firefox\firefox.exe"" --no-remote -p JANE"

How To Ask Questions The Smart Way


Report •

#2
February 4, 2011 at 12:20:30
YEA! THANK YOU Razor2.3!

Now both of these VBScripts:


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"

-----------------------------------------------------------------------------------------------------------


Work perfectly. Many thanks!


Report •
Related Solutions


Ask Question