Results 1 to 3 of 3

Thread: VBScript to start Firefox with profile

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2010
    Posts
    18

    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

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: VBScript to start Firefox with profile

    Code:
    shell """C:\Program Files\Mozilla Firefox\firefox.exe"" --no-remote -p JANE"
    You don't need the inner quotes on the parameter... it's not a singluar string. You need them around the path to Firefox because of the spaces in the paths.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2010
    Posts
    18

    Re: VBScript to start Firefox with profile

    My question was answered here:

    http://www.computing.net/answers/pro...96.html#postfp

    This is what worked:

    STEVE.vbs
    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\firefox.exe"" --p STEVE"



    JANE.vbs
    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\firefox.exe"" --no-remote -p JANE"



    The modifications given to me by "Razor2.3" at that forum worked perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width