• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Dumpy Dooby

Regarding Autoit "run" command.

6 posts in this topic

Why doesn't this work:

Run  	( "%programfiles%\FlashFXP\Flashfxp.exe", "%programfiles\Flashfxp\", "" )

When I try that, it says "Cannot find 'd:\program files\flashfxp\flashfxp.exe'"

Yes, my program files directory is on drive d: and yes, if I click start->run and type "%programfiles%\FlashFXP\Flashfxp.exe," it works just fine.

It also works just fine if I click start->run and type "d:\program files\flashfxp\flashfxp.exe."

What gives?

Any way that I could do this using @ComSpec?

I'm using AutoIt v3, btw.

PS-

I'm currently using the following

Send 	 ("#r")
ControlClick ( "Run","","edit1","","2" )
Send  ("%programfiles%\FlashFXP\flashfxp.exe{Enter}")

But I've had some problems with that one if my computer is running slow. Besides, that won't exactly work on my unattended xp disc as there is no start button during the XP install.

0

Share this post


Link to post
Share on other sites

Try adding this to your script.

AutoItSetOption("ExpandEnvStrings",1)

0

Share this post


Link to post
Share on other sites

Nah, that didn't help at all...

Anyone know how to do this using the @programfilesdir macro?

I tried

Run ( "" & @ProgramFilesDir & '\FlashFXP\flashfxp.exe""' & "", "" )

didn't work.

Then I tried.

Run (@ProgramFilesDir & "\FlashFXP\flashfxp.exe", "")

didn't work.

0

Share this post


Link to post
Share on other sites

try using ShellExecute($wDir&"filename.exe","open", @SW_MAXIMIZE)

0

Share this post


Link to post
Share on other sites

Try this

RunWait ( @ComSpec & ' /k "%programfiles%\FlashFXP\Flashfxp.exe"', '"%programfiles%\Flashfxp\"' )

This will close the dos window when finished

RunWait ( @ComSpec & ' /c "%programfiles%\FlashFXP\Flashfxp.exe"', '"%programfiles%\Flashfxp\"' )

This will hide and close the dos window when finished

RunWait ( @ComSpec & ' /c "%programfiles%\FlashFXP\Flashfxp.exe"', '"%programfiles%\Flashfxp\"', @SW_HIDE )

Hope this helps (and works), having to do this from memory as i'm not at my pc at the moment!!

edit:

(Why do my code boxes take up half the page??? :} )

Fixed!

Edited by Yzöwl
0

Share this post


Link to post
Share on other sites

try this

Run (@ProgramFilesDir&"\FlashFXP\Flashfxp.exe")

0

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

  • Recently Browsing   0 members

    No registered users viewing this page.