New
#10
Odd. When you run the .vbs file from Option 1, were you prompted by UAC to click on Yes?
running it thru powershell, outputs this
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
https:/go.microsoft.com/fwlink/?LinkID=135170. : The term 'https:/go.microsoft.com/fwlink/?LinkID=135170.' is not
recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (https:/go.micro...?LinkID=135170.:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32> [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
what am I doing wrong?
This is the script below in the .vbs file.
It basically is suppose to copythe 3 folders at the top of the tutorial into a "Local-Group-Policy-Backup" folder on your desktop.
Code:If WScript.Arguments.length =0 Then Set objShell = CreateObject("Shell.Application") objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1 Else Set oShell = WScript.CreateObject ("WScript.Shell") oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine %userprofile%\Desktop\Local-Group-Policy-Backup\Machine"),0 oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\User %userprofile%\Desktop\Local-Group-Policy-Backup\User"),0 oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicyUsers %userprofile%\Desktop\Local-Group-Policy-Backup\GroupPolicyUsers"),0 End If
very bizarre, as to why it won't run properly, i'll play around some more
thx!
What happens when you manually run the commands from the script below in an elevated command prompt?
Code:xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine %userprofile%\Desktop\Local-Group-Policy-Backup\Machine xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\User %userprofile%\Desktop\Local-Group-Policy-Backup\User xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicyUsers %userprofile%\Desktop\Local-Group-Policy-Backup\GroupPolicyUsers
trying it now....
same output on the other commands too
output from admin command prompt
C:\WINDOWS\system32>xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine %userprofile%\Desktop\Local-Group-Policy-Backup\Machine
Invalid number of parameters
can't say I've ever had these issues before...lol
As a test, try these with the desktop path wrapped in quotes now.
Code:xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine "%userprofile%\Desktop\Local-Group-Policy-Backup\Machine" xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\User "%userprofile%\Desktop\Local-Group-Policy-Backup\User" xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicyUsers "%userprofile%\Desktop\Local-Group-Policy-Backup\GroupPolicyUsers"
I've reviewed this thread and a few others that are applicable and am finding the non-admin policy isn't applying when a non-user logs in. I've installed the non-admin local policy editor, made my changes and saved the console. I run the backup and it creates the folder just fine and I move the folder and the backup & restore scripts to the network. I log in as a non-admin user, copy the restore script and folder back to the desktop and run the restore. It says it's successful, and I reboot. When logging back in as the non-admin user, I still can't modify the items I've set in the policy.
Any suggestions? O/S is Win10 Pro.