Jump to content

How to get rid of UAC prompt for autoit scripts


Recommended Posts

I am running my scripts on a remote machine. Only Disabling UAC will launch the application otherwise nothing happens. If I disable UAC, during running my tests while executing autoit script it prompts for Allow autoit script to make changes in your system. How can I get rid of this message. Tried making the program exe to run as administrator but still its not working.

Edited:

Even in the .net script from where I am calling the autoitscript I am running it as run as administrator. but nothing seems to work.

Public Sub ShellandWait(ByVal ProcessPath As String, ByVal Argument As String)

Dim objProcess As System.Diagnostics.Process

Try

objProcess = New System.Diagnostics.Process()

objProcess.StartInfo.Verb = "runas"

objProcess.StartInfo.Arguments = Argument

objProcess.StartInfo.FileName = ProcessPath

objProcess.Start()

'Wait until it's finished

objProcess.WaitForExit()

'Exitcode as String

Console.WriteLine(objProcess.ExitCode.ToString())

objProcess.Close()

Catch ex As Exception

Assert.Fail("Could not start process " & ProcessPath & " " & ex.Message.ToString)

End Try

End Sub

PLease help

Edited by gigabyte
Link to comment
Share on other sites

I am running my scripts on a remote machine. During running my tests while executing autoit script it prompts for Allow autoit script to make changes in your system. How can I get rid of this message. Tried making the program exe to run as administrator but still its not working.

PLease help

I assume that you are able to run other programs without a problem, if not then the rest of this is no help.

Making the program run as administrator won't help because it will ask for administrator approval, you must have full rights already.

I have a poor understanding of UAC so my limited experience might not be much help. I have had similar problems. I have found that usually, if I install a program correctly then it runs ok without asking for permission. Sometimes it won't. On these occasions no amount of uninstalling, reinstalling or updating will change the situation but renaming the exe to anything else will allow it to run without a problem. Of course you have to give permission for the renaming. (I would be very gratefule if anyone knows the correct fix for this.) The other way is to install the exe in somewhere like the downloads file and run it from there but the user has no protection then so I never do that.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

UAC, for all its faults, is not necessarily a bad thing for clueless users.

Granted, you're not clueless, and are using it for honorable (I hope) purposes, however... such knowledge would most likely be a "BAD THING" .

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

UAC, for all its faults, is not necessarily a bad thing for clueless users.

Granted, you're not clueless, and are using it for honorable (I hope) purposes, however... such knowledge would most likely be a "BAD THING" ™.

That doesn't make a lot of sense to me, but maybe I'm a bit too near to being clueless. But if you have "such knowledge" has it been a bad thing for you?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...