tapopf.blogg.se

How to make scr file
How to make scr file










For New-GPLink parameters: msdn reference

how to make scr file

Set-GPRegistryValue -Name "ScreenSaverTimeOut" -Key "HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop" -ValueName ScreenSaveTimeOut -Type DWord -Value 900 New-GPO -Name "ScreenSaverTimeOut" -Comment "Sets the time to 900 seconds" Using powershell and group policy, you can manage for which Organizational Unit / Domain / Site you're affecting the change, and it's having prevedence over user settings.Ĭhanging group policy in the case of the screen saver time out: Get-Command -Module GroupPolicy

how to make scr file

With user / domain / site awareness: group policy

how to make scr file

NB: Thoses parameters are superseeded by group policy parameters (eg., to force a screen saver for users in an enterprise). You can put these in a ScrnInstaller.ps1 script that you execute with the command: $ powershell -WindowStyle hidden -f "ScrnInstaller.ps1" Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name scrnsave.exe -Value "c:\windows\system32\mystify.scr" Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name ScreenSaveTimeOut -Value 60 The modern way, with powershell Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 1 Public static void setScreenSaver(boolean isActive, int timeOutMin, String pathToScr) throws IOException) Ģ) Get path from registry and rewrite scr file, but if is set to null, you can't do it. * set screen saver active, timeout and scr, only works in Windows

how to make scr file

JAVA setScreenSaver(true, 1, "C:\\Windows\\System32\\Mystify.scr") Reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 60 /f Reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 1 /f 1) Add in registry, make sure is active and setTimeOut (only minutes) CMD reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v SCRNSAVE.EXE /t REG_SZ /d C:\Windows\System32\Mystify.scr /f












How to make scr file