BelieverofAutoIt Posted April 7, 2011 Share Posted April 7, 2011 How to use "Run" Command. I want to Setup.exe from DVD drive automatically. I want to install software automatically. SCripts below:(E is DVD drive.) But no launch the software. Run("E:\LEXT\Setup.exe") why? OS is Vista(Service pack1) Is it impossbile other than C drive? Link to comment Share on other sites More sharing options...
hudl Posted April 7, 2011 Share Posted April 7, 2011 Try ShellExecute("E:\LEXT\Setup.exe") "Run" tries to open the file in the associated application (as far as i've understood). Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 7, 2011 Moderators Share Posted April 7, 2011 hudl,I am afraid you have got it the wrong way round! Run - will run an executable. The file must be an EXE, BAT, COM, or PIF.ShellExecute - asks the shell to run what ever app is associated with the file type. It will run EXE files as well, but it is designed to let you use files with extensions like DOC, TXT, LNK, etc as the parameter. BelieverofAutoIt,When you say it does not run, what exactly happens? Could UAC be preventing you from running the executable? Do you have the correct permissions? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
hudl Posted April 7, 2011 Share Posted April 7, 2011 Uhm, yes... You live and learn... I too had a problem once with Run and used ShellExecute instead - which worked. Tried it now again with Run and it works... anyways... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 7, 2011 Moderators Share Posted April 7, 2011 hudl,You live and learn...Always! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
BelieverofAutoIt Posted April 7, 2011 Author Share Posted April 7, 2011 hudl Thanks for quick response. It goes well using ShellExecute. Melba23 Run goes well on XP. Maybe,the problem is permission, I think too. But I executed with Administrator. I didn't know the detail any more. Anyway, 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