midiman Posted February 10, 2010 Share Posted February 10, 2010 Hi I am trying to execute an exe located on my C:\. When i try to run it from my script it will not open. I am using Run commang with the follwing path ("C:\AR\Risk.exe") If I manually click on the exe I get a UAC message saying "Do you want to allow the following program to make changes to this computer?" Yes or No What could be causing this exe to not run when I run my script. Link to comment Share on other sites More sharing options...
mistersquirrle Posted February 10, 2010 Share Posted February 10, 2010 I don't know what could be causing it not to run, I've had some strange things happen with the run command. Try using ShellExecute() and see if that works We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
99ojo Posted February 10, 2010 Share Posted February 10, 2010 I don't know what could be causing it not to run, I've had some strange things happen with the run command. Try using ShellExecute() and see if that worksHi,try #RequireAdmin at the beginning of your script.;-))Stefan Link to comment Share on other sites More sharing options...
mistersquirrle Posted February 10, 2010 Share Posted February 10, 2010 Ah, yeah, #RequireAdmin was another thing that I was thinking of, but I couldn't remember it at the time. Doesn't that prevent the script from running if it's not an admin account? We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
99ojo Posted February 10, 2010 Share Posted February 10, 2010 (edited) Hi,if you start the script and you are not admin, the admin logon dialog should appears.@midimanWhat could be causing this exe to not run when I run my script.You already answered this question.-> I get a UAC message saying "Do you want to allow the following program to make changes to this computer?" Yes or No This is normal behaviour, if UAC (User Account Control) is switched on and your program needs administrative rights for execution.;-))Stefan Edited February 10, 2010 by 99ojo Link to comment Share on other sites More sharing options...
midiman Posted February 10, 2010 Author Share Posted February 10, 2010 Thanks #RequireAdmin at the top of the script worked. Link to comment Share on other sites More sharing options...
midiman Posted February 10, 2010 Author Share Posted February 10, 2010 When the UAC prompt comes up. How do I set the focus to yes and then send an enter? Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 10, 2010 Moderators Share Posted February 10, 2010 midiman, Think about what you are asking for a moment. What would be the point of a UAC dialog if you could click it programatically ? 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...
99ojo Posted February 10, 2010 Share Posted February 10, 2010 Indeed.... Link to comment Share on other sites More sharing options...
midiman Posted February 10, 2010 Author Share Posted February 10, 2010 I know but this is annoying. The program is an add on for excel and I want to automate it. Because I need to install it on over 100 machines. So I am going to have to accept the UAC every time? Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 10, 2010 Moderators Share Posted February 10, 2010 midiman,So I am going to have to accept the UAC every time?As I said above, what is the point of UAC if the user does not have to decide whether an action should take place ot not? 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...
mistersquirrle Posted February 10, 2010 Share Posted February 10, 2010 you could try making the script turn off UAC, add it's self to the start up list, restart (for UAC to take effect) do it's thing, then reset UAC, and take its self off the start up list, and restart... just a suggestion, may/may not work We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 10, 2010 Moderators Share Posted February 10, 2010 mistersquirrle,Do you really think that will work? As the Prime Minister is wont to say at Question Time: "I refer the Honourable Member to my previous answers". UAC protects itself just as much as any other critical area - it would not be any use otherwise.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...
mistersquirrle Posted February 10, 2010 Share Posted February 10, 2010 Meh... I thought it was worth a mention. I seem to remember being able to run some script to disable UAC without it bothering me... I don't use UAC cause it's annoying and it serves no purpose for me (since I don't run random AWESOME-PROGRAM.EXE, and such) UAC's lame We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
midiman Posted February 10, 2010 Author Share Posted February 10, 2010 I,m new to this and this is my first script. Lets keep things simple lol. So how can I do this? When the first install page opens I am presented with a next or cancel option. What would I use to press enter on the next button which has the focus. I am using : #requireadmin Run("C:\AR\5Pro.exe") WinWaitActive("5Pro for Excel - InstallShield Wizard","&Next >") Send("!n") But it's not working 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