Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

VBScript to start Firefox with profile


  • Please log in to reply
1 reply to this topic

#1 steve.marks59

steve.marks59

  • Members
  • 11 posts
  • OFFLINE
  •  
  • Local time:06:40 AM

Posted 04 February 2011 - 01:08 PM

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

BC AdBot (Login to Remove)

 


#2 steve.marks59

steve.marks59
  • Topic Starter

  • Members
  • 11 posts
  • OFFLINE
  •  
  • Local time:06:40 AM

Posted 04 February 2011 - 03:45 PM

My question was answered here:

http://www.computing.net/answers/programming/vbscript-to-start-firefox-with-profile/24196.html#postfp

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users