Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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

Hi,

try #RequireAdmin at the beginning of your script.

;-))

Stefan

Posted

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.

Posted (edited)

Hi,

if you start the script and you are not admin, the admin logon dialog should appears.

@midiman

What 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 by 99ojo
  • Moderators
Posted

midiman,

Think about what you are asking for a moment. :huggles:

What would be the point of a UAC dialog if you could click it programatically ? :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

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

  • Moderators
Posted

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? :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

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.

  • Moderators
Posted

mistersquirrle,

Do you really think that will work? :D

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

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.

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...