hide icons on desktop with VB Code ?
Can anyone tell me how to hide all the icons on the desktop using VB code ?
Disable access to a particular program with VB code ?
Please reply .
Web Development
Can anyone tell me how to hide all the icons on the desktop using VB code ?
Disable access to a particular program with VB code ?
Please reply .
by richardh
Brute force in ignorance answer: move the files with .LNK extension from \windows\desktop directory elsewhere.
BRUTAL and DANGEROUS - Your users will HATE you! (But a ?good? practical joke)
Will not completely remove all icons, some like garbage can are not "lnk" types.
Multi-user machine, must search \windows\profiles in both "default user" and under each user name. Complex?! Gets ugly if
you do not think about disaster recovery.
by richardh
Found this in my "tips bank":
TIP OF THE WEEK: ENABLEREGISTRYTOOLS--
ENABLE OR DISABLE THE REGEDIT UTILITY
' Enable/Disable the Registry editor (RegEdit.exe)
' NOTE: this routine requires the SetRegistryValue, DeleteRegistryValue
' and CheckRegistryValue routines, that you can find from our Code Bank.
'
' Example:
'
' disable Regedit
' EnableRegistryTools False
'
' enable it again
' EnableRegistryTools
Public Sub EnableRegistryTools(Optional ByVal bEnable As Boolean = True)
Dim sKey As String
Const HKEY_CURRENT_USER = &H80000001
sKey = "Software\Microsoft\Windows\CurrentVersion\Policies\System"
If bEnable Then
' delete the value whose setting disables the registry
DeleteRegistryValue HKEY_CURRENT_USER, sKey, "DisableRegistryTools"
Else
' if the Key does not exist
If CheckRegistryKey(HKEY_CURRENT_USER, sKey) = False Then
' create the key
CreateRegistryKey HKEY_CURRENT_USER, sKey
End If
' create and set the value to disable the Registry
SetRegistryValue HKEY_CURRENT_USER, sKey, "DisableRegistryTools",1
End If
End Sub
by richardh
I admit that I have not tested this. I also wish to apologize to the author because I lost the credit - I have NO IDEA where this came from - and I would appreciateanyone letting me know who the original author is!
This idea MAY work for other programs - no promices!
Also a BRUTAL trick to pull! Be careful where you use this!
This discussion is closed to new replies.
Sort by Trending