Here is what I recommend - create a shortcut that uses wscript to execute a VBS. I use this all the time to make authentic Windows dialogs like the below.
- In File Explorer, right-click - select New and click "New shortcut". Then type the following "C:\Windows\System32\wscript.exe "error.vbs"" where error is the name of your VBS script
- Create a VBS script with the name you chose that looks like this
x=msgbox("Windows Defender has detected one or more viruses infecting this machine. To protect the integrity of your operating system and keep your files safe, please run a complete scan from Windows Defender to purge your system of any leftover malware.", 0+16, "Windows Defender Has Discovered Malware")
The 0+16 is the Button+Icon code. Here are the number codes for the icons you can use.
Button =
0 - OK
1 - OK and Cancel
2 - Abort, Retry and Ignore
3 - Yes, No and Cancel
4 - Yes and No
5 - Retry and Cancel
Icon =
0 - No Icon
16 - Critical Icon
32 - Question Icon
48 - Warning Icon
64 - Info Icon
You may also refer to them by name.
- The VBS and the shortcut NEED to be in the same folder.
- Now, go to the properties of the shortcut you created. Change the icon to an authentic (realistic) Windows error or message icon. Realistically, it should correspond to the meaning of the number you chose for the Icon.
In the end, you get something like this:
(Yes, I made up the message)
1A few suggestions - I would use VBScript to do this and save as a VBS file - VBS is executed by Cscript by default - instead, create a new shortcut in Windows to your VBScript but run it with Wscript - something like "wscript.exe -file "C:\File\ETC". Go to the properties of the shortcut and change the icon. Then link the shortcut to your logon script. It will now look like an authentic Windows dialog message! No command window, and a genuine task-bar icon. – InterLinked – 2016-07-21T00:56:19.780
I would take that into consideration too. Thank you anyway – deXterlab97 – 2016-07-21T00:59:47.783
I posted my comment as a new answer - I have detailed it more there – InterLinked – 2016-07-21T01:07:31.140
One important part of the scheduled task. you have to use 'Run only when user is logged on' it DOES NOT work with 'Run whether user is logged in or not' I guess because that makes it non interactive? so you might want to change the user that it runs under to .\Users so it runs when anyone is logged in – Max – 2019-03-29T17:23:53.947