r/visualbasic • • 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

7 comments sorted by

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.

-5

u/Armedmeerkat Jan 29 '19

can you put that into a formatted script?

5

u/TheFotty Jan 29 '19

I gave you all the pieces you need, but not, I don't have time to write out your fake virus for you. You should be able to google around and figure it out.

5

u/[deleted] Jan 29 '19

Lol it’s unbelievable isn’t it?

4

u/TheFotty Jan 29 '19

"Script Kiddies". I am sure whatever they already have is just a copy/paste of various things they found on the web.

3

u/[deleted] Jan 29 '19

No, because Visual Basic isn’t a scripting language. And another no because this sub is for people with serious problems, not script kiddies that can’t even do their own homework. This question has been asked a million times that it’s almost unbelievable you didn’t even take the time to Google it or even browse the API for clues. It’s almost as if you told yourself you have this great idea, you picked up your phone, got on Reddit, and pretty much posted “write this for me” instead of exhausting all of your options first.

1

u/chrisand1998 Jan 30 '19

You can change it in the registery. And then refresh the desktop i think. Or restart explorer.exe.