Jump to content
Sign in to follow this  
bioloyx

Run command

Recommended Posts

bioloyx

Well I am just a beginner and I have read the tutorials on using the run command. I think it's called a 'command'. Please correct me if I'm wrong about that - or anything, really.

I can use Run("notepad.exe") and it would open up notepad and Run("mspaint.exe") would open up paint, but when i try something like Run("chrome.exe"), it shows the loading thing next to the mouse for a couple milliseconds, and then nothing happens...

What am I doing wrong?

Share this post


Link to post
Share on other sites
wakillon

notepad and mspaint are microsoft executables, but for chrome.exe you need

to indicate the path like this firefox example :

Run ( @ProgramFilesDir & '\Mozilla Firefox\firefox.exe' )

you have to find your chrome.exe path ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
GianAutoitprogrammer

I dont use the run command but I use the shellexecute("") command

Too execute Google Chrome in XP but I dont know in 7 and Vista

Here is the Code:

Shellexecute(@UserProfileDir & "\Local Settings\Application Data\Google\Chrome\Application\Chrome.exe")

I hope it helps :unsure:

Share this post


Link to post
Share on other sites
bioloyx

Thanks wakillion. So, I'm assuming the dir is directory? What other files count as a directory?:unsure:

It didn't work for me gian... Thank you though!

OH it worked nevermind...

I just did

ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")

Edited by bioloyx

Share this post


Link to post
Share on other sites
bioloyx

Thanks wakillion. So, I'm assuming the dir is directory? What other files count as a directory?:unsure:

It didn't work for me gian... Thank you though!

Wait, you start the path from the Program Files folder right? What if it's in the Program Files(x86) folder?

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.