Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Regarding Autoit "run" command.

- - - - -

  • Please log in to reply
5 replies to this topic

#1
Dumpy Dooby

Dumpy Dooby

    Advanced Member

  • Member
  • PipPipPip
  • 424 posts
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.

IceBlackIce> ill just take you are not a experienced person with coding [source]
^lol



How to remove advertisement from MSFN

#2
kyuuzo

kyuuzo

    Junior

  • Validating
  • Pip
  • 64 posts
Try adding this to your script.

AutoItSetOption("ExpandEnvStrings",1)


#3
Dumpy Dooby

Dumpy Dooby

    Advanced Member

  • Member
  • PipPipPip
  • 424 posts
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.

IceBlackIce> ill just take you are not a experienced person with coding [source]
^lol


#4
pacav69

pacav69
  • Member
  • 3 posts
try using ShellExecute($wDir&"filename.exe","open", @SW_MAXIMIZE)

#5
Dougal4263

Dougal4263

    Newbie

  • Member
  • 10 posts
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, 12 May 2009 - 10:39 AM.


#6
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • OS:XP Pro x86
  • Country: Country Flag
try this
Run (@ProgramFilesDir&"\FlashFXP\Flashfxp.exe")





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN