Windows 7 batch file won't "write" using KACE1000 scripting
I can do this in Windows XP but not Windows 7 using scripting in the KACE1000. I need help with Windows 7.
The goal is to push out a certain local group policy configuration to out-of-WAN computers using KACE1000 scripting. This is done simply by overwriting the “Machine” and “User” folders inside the “GroupPolicy” folder at “%systemroot%\system32”. So, this is basically a process of effectively pushing out folders using the KACE1000. Sounds simple, huh? It is easy with XP but not Windows 7.
The problem with Windows 7 is that I cannot find a way to run the simple batch file with elevated credentials of administrator. Please keep in mind I need this to run silently with no user interaction. You may recall that for Windows 7 to write using a batch file locally, one must first open the command prompt on the machine by right clicking on it and choosing “run as administrator”. How does one effectively do that when using KACE1000 scripting?
I tried changing the user the script itself runs with, since there is such a choice when configuring the script in the KACE1000, but that did not solve the problem.
Here is what I did that worked for Windows XP: From a computer that had the local group policy configured the way I want, I zipped the “GroupPolicy” folder found at “C:\Windows\System32” and copied it to a network location my KACE1000 could access. From the KACE1000 I created a script job, adding a dependency of that zipped folder. I created a Verification that the “grouppolicy” folder exists on the computer, then created a batch file that copied that “GroupPolicy” folder from the Kace dependency folder “C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots…” to “C:\Windows\System32\GroupPolicy”. Like I said it worked like a charm on Windows XP. But on Windows 7, even though the script ran, it did not actually copy the data to C:\Windows\system32\grouppolicy. It’s all about access rights.
To make this work on Windows 7, when LOCALLY run, I can use the exact same batch file but I must first open the command prompt “as administrator” for that batch file to actually copy the folders. So, I need a way to make the KACE1000 script run that batch file on a client computer, “as administrator”.
Any solutions? Many thanks