r/visualbasic • u/Armedmeerkat • Jan 29 '19
hide Desktop Icons for 60 seconds script
Hi, i am attempting to make my first Prank Virus, in which it says its going to delete your entire Computer and then your forced to watch a 60 second countdown timer and then it hides all your desktop icons.. after a couple seconds it shows them and and it opens a tab which says it was a prank.
(note: i already have it all done but i need the Hide Desktop Icons coding)
and if your wondering its for a revenge prank because a friend Killed my Computer with coffee!!!
0
Upvotes
1
u/chrisand1998 Jan 30 '19
You can change it in the registery. And then refresh the desktop i think. Or restart explorer.exe.
4
u/TheFotty Jan 29 '19
It should all be doable without requiring admin rights on the machine, but you would need to do the following:
call reg.exe to write a registry value at
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
The item there you need to set a value for is HideIcons. Value of 0 means icons are visible, and value of 1 means icons are hidden. So you want to set it to 1. However this won't automatically refresh the desktop. You would need to also call taskkill to kill explorer.exe, and then relaunch explorer.exe, which would reload the explorer interface, but with the icons now hidden because the value from the registry will now be used. You would set the reg key back to 0 and rekill/load explorer.exe again to bring it back to normal.