Windows domain management is a good management method for convenient software distribution, permission control, and other functions. However, due to software distribution, some computers are not successfully installed, or some software is missing when new computers are installed, which requires administrator privilege to install, you can install any software or patches on your own. For this reason, after finding some articles on the internet, I decided to use the autoit software to write a script for Automatic Running of patches or software installation without the assistance of the Administrator.
Download autoit from the Internet and install it easily. The script I wrote is also very simple, mainly using the RunAs command:
After compiling the EXE executable program, package it with WinRAR, and use WinRAR tools to create a self-solution package, set parameters, decompress the folder, decompress the package, and run the command automatically, this solves the problems we face.
We know that autoit is very powerful and we will discuss it with you later.
Local $ susername = "username" Local $ spassword = "password" RunAs ($ susername, @ computername, $ spassword, 0, @ comspec, @ SystemDir)
Runas(" ", " "," ((( including .exe) "," folder of the program to be executed ")
Note: It is very difficult to write the password in the command. We provide a temporary solution. Please refer to the instructions. The script may be decompiled after compilation, so this method can only be a temporary method to temporarily solve the problem.
How to install software as an administrator