Guest iwod Posted March 9, 2005 Posted March 9, 2005 1. I was wondering if %CDROM% is supported, and others like %SYSTEMFILE%.... 2. I read the example notepad.exe, Do you mean when placing the file within the same directory as notepad.exe, then simple pointing to notepad.exe will run?
Blue_Drache Posted March 9, 2005 Posted March 9, 2005 (edited) 1. I was wondering if %CDROM% is supported, and others like %SYSTEMFILE%.... 2. I read the example notepad.exe, Do you mean when placing the file within the same directory as notepad.exe, then simple pointing to notepad.exe will run?<{POST_SNAPBACK}>1. Look up the DriveGet functions and the @macros like @SystemDir and @ScriptDir2. Defaults to the same folder as the script currently resides, I believe. 3. Set the specific folder by defining it before the executable. Example: Run("C:\some\folder\somefile.exe","C:\some\working\folder")Notepad runs because the executable resides on the %PATH% Edited March 9, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Guest PJ_in_Fla Posted March 17, 2005 Posted March 17, 2005 Notepad runs because the executable resides on the %PATH%(NEWBIE ALERT!)I was just going to post this question as I complete my very FIRST script (to open several programs and set up the windows, etc.), but your response is the answer to my question ... Why does Run("program.exe") fail but Send("#rprogram.exe") work? Your answer referring to %PATH% was the difference. Now, does anyone know just HOW Windows (Win2K in my case) knows where executibles are to run them when they are buried somewhere in the Program Files folders?(/NEWBIE ALERT!)Questionably yours,PJ in Sunny Florida
Valik Posted March 17, 2005 Posted March 17, 2005 Windows also uses the registry. Specifically, if an executable has an entry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths, then the path specified in the registry will be used. If you get to looking around at some of the sub-keys below that, you'll see a lot of the programs there. Some of these are the ones located in your Program Files directory, so this is how Window's is able to find them, even though their specific directory isn't in the %PATH% variable.
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