4

I need to install a software using a login script, which is distributed by the GPO. Currently it is starting, but it is not run as an administrator, so the installation is not done.

How can I make this script run as an administrator in the login to install??

Note: All users have an administrator user, so it is okay to run with the current user as long as it is started "as administrator"

Ivo Jesus
  • 63
  • 1
  • 1
  • 6

4 Answers4

7
  1. Every user has Admin rights ... hmmmm

What "batistuta09" said but with pictures

  1. On the DC ... "Group Policy Management"
  2. User Configuration \ Preferences \ Control Panel Settings \ Scheduled Tasks
  3. Right click and create a new Scheduled Task for Windows 7 like the pictures show (Conditions and Settings tab I leave to you.) enter image description here enter image description here enter image description here
toofat
  • 311
  • 3
  • 11
5

Any user configuration items, including login scripts are run with the user's permissions. In order to run a script (or software installation) with elevated permissions you need to either run it using Computer configuration, which will run as local system, or use group policy preferences to create a scheduled task and configure the desired credentials.

batistuta09
  • 8,981
  • 10
  • 23
2

I was able to make it work by putting the script inside the path (inside the GPO):

Computer Configuration\Policies\Windows Settings\Scripts (Startup/Shutdown)

In it, the script runs as administrator by the system, doing the installation.

More details at:

https://www.experts-exchange.com/questions/27997313/Admin-Rights-in-GPO-to-Run-a-BAT-File.html

But anyway, thanks for the tips.

Ivo Jesus
  • 63
  • 1
  • 1
  • 6
0

There is another trick patron I found. The first step is to create a link to the script you want to run, and apply it to run with administrator privileges. Second step, since it is not possible to run a shortcut in the GPO, therefore another script must be created that runs with normal privileges that will cause the link that runs with administrator privileges to be run and activates the script that we want to apply in the GPO.