Create non-malicious code for Windows 10 which upon execution causes the screen to…
- User
Create non-malicious code for Windows 10 which upon execution causes the screen to change colors every 2.1 seconds. The code should be in .VBS script.
- Assistant
Option Explicit
Dim ColorArray(6) ColorArray(0) = 65535 'Red ColorArray(1) = 65280 'Green ColorArray(2) = 255 'Blue ColorArray(3) = 65535 'Yellow ColorArray(4) = 16711680 'Magenta ColorArray(5) = 65280 'Cyan
Do While True Dim RandomIndex Randomize RandomIndex = Int(Rnd * 6) Dim hexColor hexColor = Right("000000" & Hex(ColorArray(RandomIndex)),6) Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", "", "REG_SZ" WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", "%windir%\System32\oobe\info\backgrounds\backgroundDefault.jpg" WshShell.Run "%windir%\System32\reg.exe add ""HKCU\Control Panel\Colors"" /v Background /t REG_SZ /d ""0 " & hexColor & """ /f", 0, True WScript.Sleep 2100 Loop
Set WshShell = Nothing
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.