Answer the question
In order to leave comments, you need to log in
How to run a bat file with admin rights when a user logs in?
Available: Active Directory, policy for installing the necessary software, domain accounts without administrator rights, machines on win7-win8.1.
Task:
One of the applications must be installed directly from the user's account, since the files are written to the user's appdata/roaming folder . In this case, the application needs to install administrator rights.
Installation is done through a batch script that launches an .msi file with the necessary keys.
Attempts to solve: The runas
construct was already tried for the solution , but not an option, since the first time you run it on each machine, you will need to enter an administrator password, which is not feasible. CPAU and RunAsSPC
were also tested, the problem is that the installation of files occurs in the folder of the same administrator encrypted by these programs, and not in the folder of the user who launches it.
It is unacceptable to install through designated applications or through an autoload script , it is required that at the time the installation starts, the user is already logged in on the machine. In addition, with this approach, the application itself is listed as installed, but does not upload the necessary files to the user's folder. I tried to throw them after installation separately, but it does not help.
Question:
Are there any other installation options?
Answer the question
In order to leave comments, you need to log in
Literally just had the same question:
How to execute a logon script with administrator privileges? - the second answer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question