dreivilo47

[SOLVED] How to solve this problem?

10 posts in this topic

#1 ·  Posted (edited)

When I use the following code I receive an UAC message:
 

#RequireAdmin
RunWait("msiexec /i winzip205-64.msi /quiet")
Exit

How can I hide (bypass) the UAC message?

Edited by dreivilo47

Share this post


Link to post
Share on other sites



Turn UAC off in registry. A system with enabled UAC allway show a UAC message.

Share this post


Link to post
Share on other sites
6 minutes ago, AutoBert said:

Turn UAC off in registry. A system with enabled UAC allway show a UAC message.

Thanks for the suggestion AutoBert.
How can I turn off UAC in registry before RunWait and turn it on again after RunWait?

 

Share this post


Link to post
Share on other sites

RegRead and RegWrite are needed. But therefor you need also #RequireAdmin which shows a UAC Message.

Share this post


Link to post
Share on other sites

@dreivilo47,

this i not a "problem", and you do not "solve" it.

if you hate UAC on your own machine, then by all means suppress it as suggested (although that may cause other issues). but that is not the case, is it?

to perform an administrative task by a script, then before you begin, make sure your script runs with administrative rights in effect. how you do that depends on your system/network configuration. for examples, you can remotely create a scheduled task to run with the target local SYSTEM account; you can do it with PsExec; you can make use of a deployment tool installed in your network; you can write a background agent to do that; etc.

if you describe your environment, we can suggest the preferred method.

Share this post


Link to post
Share on other sites
On 27-8-2016 at 11:28 AM, AutoBert said:

Turn UAC off in registry. A system with enabled UAC allway show a UAC message.

@AutoBert, turning off UAC in registry (change value EnableLUA to 0) needs a reboot before it works.  I want to avoid that.

Share this post


Link to post
Share on other sites
On 27-8-2016 at 0:18 PM, orbs said:

@dreivilo47,

this i not a "problem", and you do not "solve" it.

if you hate UAC on your own machine, then by all means suppress it as suggested (although that may cause other issues). but that is not the case, is it?

to perform an administrative task by a script, then before you begin, make sure your script runs with administrative rights in effect. how you do that depends on your system/network configuration. for examples, you can remotely create a scheduled task to run with the target local SYSTEM account; you can do it with PsExec; you can make use of a deployment tool installed in your network; you can write a background agent to do that; etc.

if you describe your environment, we can suggest the preferred method.

@orbs, in a couple of weeks I need to install software on more than 100 new laptops.  And I want to automate that so it can be done faster.
These laptops are not connected to a network, so I want to use an USB flash drive with the software on it.
I don't hate UAC, but I want to suppress the uac prompt because it becomes irritant after doing a lot of computers.  It slows down.

Share this post


Link to post
Share on other sites

@orbs, how you do that (in a post) the username beginning with an @ is highlighted?  :)

Share this post


Link to post
Share on other sites
2 hours ago, dreivilo47 said:

@orbs, how you do that (in a post) the username beginning with an @ is highlighted?  :)

sometimes it works, sometimes it doesn't. this version of the forum software is somewhat crappy.

2 hours ago, dreivilo47 said:

in a couple of weeks I need to install software on more than 100 new laptops.  And I want to automate that so it can be done faster.
These laptops are not connected to a network, so I want to use an USB flash drive with the software on it.

since anyway you are going to plug it in, open the folder, double-click the setup file, and press a few [Next] buttons... i see no reason that one more click should discourage you. especially if working around that single click is probably the most troublesome piece of action to automate, in your case. if this is a one-off operation, and these laptops are fire-and-forget (i.e. you do not keep maintaining them centrally), then i advise you just accept the UAC as it is.

but, you can also get adventurous. you have a couple of weeks to prepare. answer this: are all of those laptops configured with an enabled, password-protected administrative account?

if so, here's what you can consider:

prepare a small network: 8-port switch, one Windows machine, a DHCP service, and an empty desk fitting for 7 laptops.

configure said Windows machine as follows: it constantly monitoring the LAN, whenever a new IP is discovered, it connects to it over PsExec with said admin account to perform the installation. when installation done, it checks if it was successful. if so, it sends a power-off command to the target.

what you do is this: unpack a laptop, connect it to the network, power it on. visit the laptop after few minutes. if it is shut down, repack it and ship to end user (or, randomly picking, disconnect from network, power on and validate the installation yourself). if it is not shut down, then something went wrong with the installation, check the cause or just install manually. you can do several laptops simultaneously like that.

good luck!

 

 

 

 

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

@orbs,
- Good to know about the username beginning with an "@".
- You're right, I am going to accept the UAC as it is.
- I don't know of all of them are configured with an enabled, password-protected administrative account.
- Thank you very much for the information about the small network!

Edited by dreivilo47

Share this post


Link to post
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

  • Similar Content

    • BBs19
      By BBs19
      Features:
      Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 3 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left. Windows 10 style right click menu
      Example(Image): 

      Hover effect of the control buttons:

      Windows 10-Style MsgBox:

      Windows 10/Android-Style menu:

      Credits: @UEZ, for the function to create buttons with text using GDIPlus. @binhnx for his SSCtrlHover UDF
      Version 5.0 - Changelog - 03.09.2017
      New features:
      Hover effects, minimize,maximize,restore and other GUI effects are now working natively, there is no need to call any function in a loop. This also allows the hover effects to work if the main script is paused due to "Sleep, Msgbox etc." The hover effects now work slightly faster and create less CPU usage, however the startup time of the main script is slightly increased. Thanks to @binhnx for his SSCtrlHover UDF. Maximize, Minimize, Fullscreen and Restore buttons now work natively, meaning you don't need to set actions for them manually.  If you prefer handling the buttons manually, then you can disable this by setting "$ControlBtnsAutoMode = False" Added _Metro_CreateButtonEx2 -> Creates a slightly rounded button without a frame around. Hovering changes the button color to a lighter color. Added _Metro_CreateCheckboxEx2 -> Creates a modern round checkbox. Added _Metro_CreateRadioEx -> Creates a metro style radio with colored checkmark. Added "_Metro_RightClickMenu" an easy to use rightclick menu. You can use this with listviews or anything else. Check out the example for a demo of the rightclick menu and how to implement it. -> Rightclick on Button3 to show the menu. Added multiple new themes with flat colors and updated the old themes. Check out the example for a demo with all themes by pressing the menu button -> Themes Demo Improvements:
      You can now delete all controls that have hover effects(buttons, checkboxes etc.) using GUICtrlDelete($ControlHandle). This will also automatically release all resources and remove the control from the global array. Many other optimizations,changes and bugfixes.  
      Download UDF with example:
       
       
    • VIP
      By VIP
      I can not do anything with any user in the "Local Users Group"
      I tried from my account but I could not change my password (ie set new password)!
      But I was able to activate the Administrator account and I logged into the Administrator account and still could not do anything with my account! But I can set the password and disable the Administrator account from my account or Administrator.
      Any ideas? (Ignore the click on the Sign-in option in the Change Accout settings.)
       

    • dreivilo47
      By dreivilo47
      When I want to test Example 1 of Function _IECreate (AutoIt Help File), I see that function _IECreate doesn't work in Windows 10.
      Syntax Check (Ctrl+F5) gives no errors.
       
      Example 1:
      ; Create a browser window and navigate to a website #include <IE.au3> Local $oIE = _IECreate("www.autoitscript.com")  
      The error I receive with F5 (Tools, Go) in SciTE:

    • Chaym
      By Chaym
      Does AutoIT supported  in Windows 10 OS (x64)?
      After installing AutoIT in x64 OS and recompiling code,
      I get a lot of error messages...
       
    • kristo
      By kristo
      The DriveGetDrive command returned all drives (option "ALL") for years now and my program could always rely on that function. Suddenly a drive letter that was created with the subst command does not appear in the list of drives anymore. And it clearly did, because I used to react to a certain subst command by reacting to new or revoked (subst /D) drive letters.
      Why is that? I think this a bug because there's no way left to list ALL drive letters anymore.
      And why should I use an API command for that when this was already built in for years?