Jump to content

Firefox with specific profile


Recommended Posts

Hi all,

first: I took my first steps with AutoIt :whistle:

So, i will learn - but it's hard if you don't know where to start first. I've searching around a few hours - but i didn't find anything, that will help me.

I wanna create my own launcher to use a portable Version of Firefox. I have a folder called "Firefox" Inside this folder is my profile-folder called "myprofile".

If i call a batch will, this will work:

@echo off
cd firefox
set MOZ_NO_REMOTE=1
start firefox.exe -profile "myprofile"
set MOZ_NO_REMOTE=0

So, how to get this with AutoIt to work?

Link to comment
Share on other sites

From the help file:

Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] )

Parameters

filename The name of the executable (EXE, BAT, COM, or PIF) to run.

workingdir [optional]The working directory.

flag [optional] The "show" flag of the executed program:

@SW_HIDE = Hidden window

@SW_MINIMIZE = Minimized window

@SW_MAXIMIZE = Maximized window

standard_i/o_flag [optional] Provide a meaningful handle to one or more STD I/O streams of the child process.

1 ($STDIN_CHILD) = Provide a handle to the child's STDIN stream

2 ($STDOUT_CHILD) = Provide a handle to the child's STDOUT stream

4 ($STDERR_CHILD) = Provide a handle to the child's STDERR stream

Link to comment
Share on other sites

  • Moderators

Run( "C:\Users\caschy\Desktop\Firefox\firefox.exe" -profile "myprofile" )

Doesnt work.

You have to have "some" understanding of how to use some of the functions, such as syntax and operators.

I have no idea if this is right... but you can try this:

Run('"C:\Users\caschy\Desktop\Firefox\firefox.exe" -profile myprofile')
You may also like to look at ShellExecute. Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

If i call a batch will, this will work:

@echo off
cd firefox
set MOZ_NO_REMOTE=1
start firefox.exe -profile "myprofile"
set MOZ_NO_REMOTE=0

So, how to get this with AutoIt to work?

How about this one?

Run(@ComSpec & " /c " & 'cd firefox && set MOZ_NO_REMOTE=1 && start firefox.exe -profile "myprofile && set MOZ_NO_REMOTE=0', "", @SW_HIDE)

By the way, I don´t think you´ll need the "set MOZ_NO_REMOTE=0". It´s obsolete, if you ask me. But I guess it won´t do any harm, so it´s up to you.

Link to comment
Share on other sites

Run( 'C:\Users\caschy\Desktop\Firefox\firefox.exe -profile "myprofile"' )

Try that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...