Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 02-04-2011, 01:05 PM   #1
Beta Member
 
Join Date: Jan 2011
Posts: 3
Default VBScript to start Firefox with profile

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:
Code:
  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
Code:
    shell """C:\Program Files\Mozilla Firefox\firefox.exe"""

to start Firefox with the desired profiles?

I have tried this line
Code:
    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

My question was answered here:


VBScript to start Firefox with profile

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.
steve.marks59 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0