Jump to content

Run Commands questions


junah
 Share

Recommended Posts

Hi everybody,

I'm searching about the way to launch a software stored in a directory named PROG, and the softwares can be in serverals drive letter.

My script begins like that:

;Launch audacity.exe who is in D:\prog directory

Run("D:\prog\audacity.exe")

After, I'd like to put my script on a dvd, but the path will change:

The drive letter will change, but not the folder (PROG)

i think the script may be something like that :

Run("%prog\audacity.exe%")

Can you help me please ?

Thanks.

Edited by junah
Link to comment
Share on other sites

For $i = Asc('a') to Asc('z')
   If FileExists(Chr($i) & ":\prog\audacity.exe") Then Run(Chr($i) & ":\prog\audacity.exe")
Next

#)

Link to comment
Share on other sites

Thanks a lot nfwu, i'll test the code now.

It's ok

here's the beginnig :

; Install automatisée de AUDACITY

;

; History :

; 12 Septembre 2006 : Audacity version 1.2.4b FR

;

For $i = Asc('a') to Asc('z')

If FileExists(Chr($i) & ":\prog\audacity.exe") Then Run(Chr($i) & ":\prog\audacity.exe")

Next

WinwaitActive("Setup - Audacity","Welcome to the Audacity Setup Wizard")

send("!n")

;scrip not finished

Exit

This works, and i try to move the folder on the C: Drive and it works, thank you !

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...