Trying to use GPO to install Spark

Run it on startup or shutdown. I do it on shutdown and it can copy files into program files and run the installer just fine.

In GP, I set a logon/startup script to run the .bat file I created with that code basically like your post had. Nothing happens. When I try running the batch file nothing seems to happen until I run it as administrator. Were you storing yours on a server? I have it on a server and the users have read rights to that server and folder. These are Win 7, Win 8, and Win 10 machines.

Iā€™m using shutdown script (can also be used on startup, but will take longer before it will show login window). This is NOT in user settings of GPO, but in Computer settings. Then it will run the installer with system account and it will run. Installer could be on a server where machine/PC has access. Not sure about this part. But in my case local administrator is the same on the user machine and on the server hosting the file. This server is also a part of domain, so GPO also has full access on that server with domain admin.

So in essence if the policy is under a Computer setting with the script set at login or shut down, I should not be having problems with install privileges? The case is the user logging in will not have admin privileges. This means I need the batch and installer to run with elevated permissions even though the user account on the domain logging in will not be admin.

Yes, running it in the computer settings should work. Btw, i see you still mention login. It has to be either startup or shutdown. Startup script will run before user logins or even if he doesnā€™t login. Windows just needs to startup.

Iā€™m placing it in computer configuration > policies > windows settings > scripts (startup/shutdown) calling the batch file located on the server with no parameters set. Applying policy to computer(s)ā€¦nothing ever occurs. If I go to the server and run the script as admin it works fine on the computer.

Ah, the batch file has to be on the same machine you are creating GPO on (domain controller). When you press Browse to select a batch, just create it in that Browse dialog window and then select it. Although, it should probably work by pulling a batch from a server share, but i tend to store it locally. Also, testing GPOs is always a pain in the neck (and the simulation stuff in the GPO console doesnā€™t help a bit). Canā€™t suggest anything more. Just make sure to run gpupdate /force on the machine your are testing on after every GPO edit and then of course restart that machine and check how the installation went.

i make my own script but something is not right. I have client 2.8.3 and when script install spark_2_9_4.exe with -q, install that version to local appdata along side 2.8.3 that are on program files. Now I have 2 spark installed: 2.8.3 on program files and 2.9.4 to local appdata user