#RequireAdmin #include #include ;========================================================================================================================================================================================= ; Creating Folders & Files ;========================================================================================================================================================================================= If not FileExists("C:\Windows\Web\Wallpaper\Levix") Then DirCreate("C:\Windows\Web\Wallpaper\Levix") If not FileExists("C:\Windows\Web\Wallpaper\Levix") Then MsgBox(4096, "Let op!", "Achtergrond map niet kunnen aanmaken." & @CRLF & "C:\Windows\Web\Wallpaper\Levix" & @CRLF & @CRLF & "Maak de map handmatig aan.") Exit EndIf EndIf If Not FileExists("C:\Windows\OEMLOGO") Then DirCreate("C:\Windows\OEMLOGO") If not FileExists("C:\Windows\OEMLOGO") Then MsgBox(4096, "Let op!", "OEMLOGO map niet kunnen aanmaken." & @CRLF & "C:\Windows\OEMLOGO" & @CRLF & @CRLF & "Maak de map handmatig aan.") Exit EndIf EndIf If not FileExists("C:\Windows\Temp")Then DirCreate("C:\Windows\Temp") If not FileExists("C:\Windows\Temp") Then MsgBox(4096, "Let op!", "Temp map niet kunnen aanmaken." & @CRLF & "C:\Windows\Temp" & @CRLF & @CRLF & "Maak de map handmatig aan.") EndIf EndIf FileInstall("C:\Users\Beheerder\CloudStation\Scripting\Settings\Graphics\OEMLogo\oemlogo.BMP", "C:\Windows\OEMLOGO\oemlogo.BMP") FileInstall("C:\Users\Beheerder\CloudStation\Scripting\Settings\Graphics\Wallpaper\Levix Particulier.png", "C:\Windows\Web\Wallpaper\Levix\Levix Particulier.png") FileInstall("C:\Users\Beheerder\CloudStation\Scripting\Settings\Graphics\Wallpaper\Levix Particulier Black.png", "C:\Windows\Web\Wallpaper\Levix\Levix Particulier Black.png") FileInstall("C:\Users\Beheerder\CloudStation\Scripting\Settings\Graphics\Wallpaper\Levix Zakelijk.png", "C:\Windows\Web\Wallpaper\Levix\Levix Zakelijk.png") FileInstall("C:\Users\Beheerder\CloudStation\Scripting\Settings\Graphics\Wallpaper\Levix Zakelijk Black.png", "C:\Windows\Web\Wallpaper\Levix\Levix Zakelijk Black.png") FileInstall("C:\Users\Beheerder\CloudStation\Scripting\Settings\Software\Ninite.exe", "C:\Windows\Temp\Ninite.exe") ;========================================================================================================================================================================================= ; Creating Folders & Files ;========================================================================================================================================================================================= $GUI = GUICreate("", 197, 55, -1, -1, $WS_POPUPWINDOW) $COMPUTERSHOP = GUICtrlCreateButton("Computershop", 16, 16) $AUTOMATISERING = GUICtrlCreateButton("Automatisering", 104, 16) GUISetState(@SW_SHOW) ;========================================================================================================================================================================================= While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $COMPUTERSHOP Computershop() Case $AUTOMATISERING Automatisering() EndSwitch WEnd ;========================================================================================================================================================================================= Func Computershop() If FileExists("C:\WINDOWS\Web\Wallpaper\Levix") Then FileDelete("C:\Windows\Web\Wallpaper\Levix\Levix Zakelijk.png") FileDelete("C:\Windows\Web\Wallpaper\Levix\Levix Zakelijk Black.png") EndIf RegWrite("HKCU\Control Panel\Desktop" , "Wallpaper" , "REG_MULTI_SZ" , "C:\WINDOWS\Web\Wallpaper\Levix\Levix Particulier.png") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "Logo", "REG_MULTI_SZ", "C:\Windows\OEMLOGO\oemlogo.bmp") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "Manufacturer", "REG_MULTI_SZ", "Levix") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "SupportPhone", "REG_MULTI_SZ", "| Geffen: 073-5341325 | Oss: 0412-692090 | Uden: 0413-331536 | Rosmalen: 073-5220070 | 's Hertogenbosch: 073-6440576 |") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "SupportURL", "REG_MULTI_SZ", "https://webshop.levix.nl/bedrijfsinfo/bedrijfsprofiel/contact") Run("C:\Windows\Temp\Ninite.exe /repair") $TITLE = "Ninite" $SUB = "Close" WinWait($TITLE, $SUB) If Not WinActive($TITLE, $SUB) Then WinActivate($TITLE, $SUB) WinActive($TITLE, $SUB) ControlClick($TITLE, $SUB, "Button1") Sleep(1000) FileDelete("C:\Windows\Temp\Ninite.exe") MsgBox(4096, "Let op!", "Instellingen zijn voltooid, systeem gaat herstarten als er op OK geklikt wordt.") Stop() EndFunc ;========================================================================================================================================================================================= Func Automatisering() If FileExists("C:\WINDOWS\Web\Wallpaper\Levix") Then FileDelete("C:\Windows\Web\Wallpaper\Levix\Levix Particulier.png") FileDelete("C:\Windows\Web\Wallpaper\Levix\Levix Particulier Black.png") EndIf RegWrite("HKCU\Control Panel\Desktop" , "Wallpaper" , "REG_MULTI_SZ" , "C:\WINDOWS\Web\Wallpaper\Levix\Levix Zakelijk.png") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "Logo", "REG_MULTI_SZ", "C:\Windows\OEMLOGO\oemlogo.bmp") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "Manufacturer", "REG_MULTI_SZ", "Levix") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "SupportPhone", "REG_MULTI_SZ", "| Geffen: 073-5341131 |") RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation", "SupportURL", "REG_MULTI_SZ", "http://www.levix.nl/automatisering/contact") Run("C:\Windows\Temp\Ninite.exe /repair") $TITLE = "Ninite" $SUB = "Close" WinWait($TITLE, $SUB) If Not WinActive($TITLE, $SUB) Then WinActivate($TITLE, $SUB) WinActive($TITLE, $SUB) ControlClick($TITLE, $SUB, "Button1") Sleep(1000) FileDelete("C:\Windows\Temp\Ninite.exe") MsgBox(4096, "Let op!", "Instellingen zijn voltooid, systeem gaat herstarten als er op OK geklikt wordt.") Stop() EndFunc ;========================================================================================================================================================================================= Func Stop() $DP = "herstart.cmd" If FileExists($DP) Then FileDelete($DP) EndIf If $DP = -1 Then MsgBox(4096, "Fout!", "herstart.cmd kon niet geopend worden") Else $var = FileOpen($DP, 1) FileWrite($VAR, "@ECHO OFF" & @CRLF) FileWrite($VAR, "TITLE Systeem herstart" & @CRLF) FileWrite($var, "net accounts /maxpwage:unlimited" & @CRLF) FileWrite($var, "shutdown -r -t 30" & @CRLF) FileWrite($var, "ECHO." & @CRLF) FileWrite($var, "del herstart.cmd" & @CRLF) EndIf Sleep(3000) Run(@ComSpec & " /c " & 'START /min herstart.cmd', "", @SW_HIDE) Sleep(500) Exit EndFunc ;=========================================================================================================================================================================================