Sign in to follow this  
Followers 0
caschy

Firefox with specific profile

7 posts in this topic

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

From the help file:

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

Parameters

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

Doesnt work.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Try that.

Share this post


Link to post
Share on other sites

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

Try that.

None of them above will work..

Share this post


Link to post
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
Sign in to follow this  
Followers 0