junah Posted September 12, 2006 Share Posted September 12, 2006 (edited) 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 September 12, 2006 by junah Link to comment Share on other sites More sharing options...
nfwu Posted September 12, 2006 Share Posted September 12, 2006 For $i = Asc('a') to Asc('z') If FileExists(Chr($i) & ":\prog\audacity.exe") Then Run(Chr($i) & ":\prog\audacity.exe") Next #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
junah Posted September 12, 2006 Author Share Posted September 12, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now