# Launching Programs

## Recommended Posts

Hi Everyone,

Ok this is driving me nuts .. Every morning when i get into work , i have about a dozen programs i have to launch and open up ..

I have been for the last 2 hours , trying to writing something that will launch a program , but not having any luck ..

Run ( "firefox.exe" , "C:\Program Files\Mozilla Firefox" , @SW_MINIMIZE)

##### Share on other sites

Here you go: Run (@ProgramFilesDir & "\Mozilla Firefox\firefox.exe" , "" , @SW_MINIMIZE)

The second parameter is NOT the path to the program, it is the working directory.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

##### Share on other sites

Also, Firefox will restore its window, while it is loading a webpage, so try this.

Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe", "", @SW_MINIMIZE)
Opt("WinTitleMatchMode", 2)
WinWait("Mozilla Firefox")
WinSetState("Mozilla Firefox", "", @SW_MINIMIZE)

##### Share on other sites

Running them is fine, you just need the path to the executables

$firefox = "x:\path\to\firefox.exe" Run($firefox)

Just put all the app paths you want to run in a file of some sort like ini or txt.

Go through them in a loop running them, while you have a coffee.

• 1

Monkey's are, like, natures humans.

##### Share on other sites

thanks rcmaehl

strange though because the help file , has it setup like how i typed it ... never would have thought that there was a @programfilesdir command ..

thanks again for the help ..

##### Share on other sites

also, easier way to run a program(I think) is the ShellExecute() command

Challenge accepted!

##### Share on other sites

But i always use Run() coz Run() return executed file's PID.

##### Share on other sites

That's true, but I dont think the OP cares about PIDs, just wants to start the apps.

Another way, might be to keep a list of any current documents being worked on, or even default documents, one for each app, and shellexecute them, doing away with needing a path.

Monkey's are, like, natures humans.

##### Share on other sites

Can you not just add them to the startup folder so let windows load them?

If Ive just helped you ... miracles do happen. Chimaera

##### Share on other sites

Second that. Keep it simple

##### Share on other sites

Can you not just add them to the startup folder so let windows load them?

Won't work if he want's to start them minimized.

Otherwise he could also keep a batch (.cmd) file on the desktop to start his programs anytime.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

## Create an account

Register a new account