dbecker Posted December 4, 2005 Share Posted December 4, 2005 I'm trying to run a gui from a CD. the gui gives options for programs to install, the executables of which are in a directory on the cd, and will run the executables from the cd. I can make it run the executables from a specific drive letter, D:\ for example, but not every computer's cd drive will be labeled the D:\ drive. I saw that I could use @ScriptDir or @WorkingDir, but I can't seem to get either of them to work. anyone have any ideas? Do $msg = GUIGetMsg () Select Case $msg = $tab1XPPatch Run (@WorkingDir, "Ubertor Patch\XPPatch Installer.exe") Case $msg = $tab1Norton Run (@WorkingDir, "Ubertor Patch\Norton 10 Installer2.exe") Case $msg = $tab2MicrosoftASW Run (@WorkingDir, "Ubertor Patch\MicrosoftASW AutoInstaller.exe") Case $msg = $tab2AdAware Run (@WorkingDir, "Ubertor Patch\aawsepersonal.exe") Case $msg = $tab1CCAA Run (@WorkingDir, "Ubertor Patch\CCAA AutoInstaller.exe") Case $msg = $tab2Firefox Run (@WorkingDir, "Ubertor Patch\Firefox Setup.exe") Case $msg = $tab2Acrobat Run (@WorkingDir, "Ubertor Patch\AcrobatSetup.exe") Case $msg = $tab2Trillian Run (@WorkingDir, "Ubertor Patch\Trillian.exe") Case $msg = $tab2SpyBot Run (@WorkingDir, "Ubertor Patch\spybotsd14.exe") Case $msg = $tab1SP2 Run (@WorkingDir, "Ubertor Patch\WindowsXP-KB835935.exe") EndSelect Until "I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements Link to comment Share on other sites More sharing options...
themax90 Posted December 4, 2005 Share Posted December 4, 2005 Look in the AutoIt BETA for DriveGetSize, DriveGetType, ETC.... you should be able to test for it. Link to comment Share on other sites More sharing options...
dbecker Posted December 4, 2005 Author Share Posted December 4, 2005 Look in the AutoIt BETA for DriveGetSize, DriveGetType, ETC.... you should be able to test for it. could I use something like DriveGetLabel? $var=DriveGetLabel (@WorkingDir) "I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements Link to comment Share on other sites More sharing options...
MHz Posted December 4, 2005 Share Posted December 4, 2005 Do $msg = GUIGetMsg () Select Case $msg = $tab1XPPatch Run (@ScriptDir & "\Ubertor Patch\XPPatch Installer.exe") ... ... EndSelect Until Link to comment Share on other sites More sharing options...
dbecker Posted December 4, 2005 Author Share Posted December 4, 2005 Do $msg = GUIGetMsg () Select Case $msg = $tab1XPPatch Run (@ScriptDir & "\Ubertor Patch\XPPatch Installer.exe") ... ... EndSelect Until Thanks, MHz, that did the trick "I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements Link to comment Share on other sites More sharing options...
MHz Posted December 4, 2005 Share Posted December 4, 2005 Thanks, MHz, that did the trick Your welcome. Glad it was just a simple fix to your Run() function. Link to comment Share on other sites More sharing options...
dbecker Posted December 4, 2005 Author Share Posted December 4, 2005 Your welcome. Glad it was just a simple fix to your Run() function. definitely. what would be the difference in functionality/advantage in using @WorkingDir and @ScriptDir? "I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements Link to comment Share on other sites More sharing options...
MHz Posted December 4, 2005 Share Posted December 4, 2005 definitely. what would be the difference in functionality/advantage in using @WorkingDir and @ScriptDir?@WorkingDir can change. @ScriptDir is where your script is. If the script is at C:\ScriptDir_Folder and I want to reference files here. C:\ScriptDir_Folder\Folder_B I could use FileChangeDir(@ScriptDir & '\Folder_B') Now the script can work relative to Folder_B as it is the new working directory set. A file in Folder_B can be now accessed like: Run(@WorkingDir & '\yourfile.exe') or just relative Run('yourfile.exe') Link to comment Share on other sites More sharing options...
dbecker Posted December 4, 2005 Author Share Posted December 4, 2005 ahhh.. excellent. thanks a lot... that defitely makes a lot more sense now. "I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements 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