This is my first question I'm asking on here. I've searched high and low for an answer/help but cant find anything that works.
Been tasked with creating a batch script that runs when our users log into their PC's that sets there Screensaver to the company one. I know some people are going to say to use Active Directory to enforce this but we don't use it.
The script itself is this:
IF EXIST "C:\Windows\System32\MDXScreenSaver.scr" goto :found
IF NOT EXIST "C:\Windows\System32\MDXScreenSaver.scr" goto :notfound
:notfound
copy "\\VSMG\VOL1\APPS\Screensaver\New\MDXScreenSaver.scr" "%UserProfile%\Desktop"
copy "%UserProfile%\Desktop\MDXScreenSaver.scr" "C:\Windows\System32\"
REG add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 1 /f
REG add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 30 /f
REG add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaverIsSecure /t REG_SZ /d 0 /f
REG add "HKEY_CURRENT_USER\Control Panel\Desktop" /v SCRNSAVE.EXE /t REG_SZ /d C:\Windows\System32\MDXScreenSaver.scr /f
:found
exit
When testing, I broke it down into separate stages so i know what worked and doesn't. It will move the file from the server to the desktop, and apply the REG keys.
When doing the copy/move to System32 (using the pause command) it states in CMD that it has copied/moved it but on inspection the file isn't there.
Please can someone help me to get this file into System32.