Object that toggles Icons
Tuesday, November 21, 2006 by Jaramia | Discussion: DesktopX
Reply #2 Tuesday, November 21, 2006 10:15 PM
| 'desktopicons.vbs - Hide/Show Desktop Icons '© Doug Knox - rev 12/03/99 Option Explicit On Error Resume Next 'Declare variables Dim WSHShell, n, MyBox, p, p1, p2, t, mustboot, errnum, vers Dim itemtype Dim enab, disab, jobfunc Set WSHShell = WScript.CreateObject("WScript.Shell") p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\" p1 = "NoDesktop" p2 = p & p1 itemtype = "REG_DWORD" mustboot = "Log off and back on, or restart your pc to" mustboot = mustboot & vbCR & "effect the changes" enab = "ENABLED" disab = "DISABLED" jobfunc = "Desktop Icons are now " 'This section tries to read the registry key value. If not present an 'error is generated. Normal error return should be 0 if value is 'present t = "Confirmation" Err.Clear n = WSHShell.RegRead (p2) errnum = Err.Number if errnum <> 0 then 'Create the registry key value for NoDesktop with value 0 WSHShell.RegWrite p2, 0, itemtype End If 'If the key is present, or was created, it is toggled 'Confirmations can be disabled by commenting out 'the two MyBox lines below If n = 0 Then n = 1 WSHShell.RegWrite p2, n, itemtype Mybox = MsgBox(jobfunc & disab & vbCR & mustboot, 4096, t) ElseIf n = 1 then n = 0 WSHShell.RegWrite p2, n, itemtype Mybox = MsgBox(jobfunc & enab & vbCR & mustboot, 4096, t) End If |
Reply #3 Tuesday, November 21, 2006 10:27 PM
| Here's a VBS script that could be an object (I think): |
Are you stealing Roman's scripts again?
*Goes to inform Roman of the treachery in an attempt to set off a war that will inevitably bring the demise of both, allowing for the rise of Kilo*
Reply #4 Tuesday, November 21, 2006 11:29 PM
| 'desktopicons.vbs - Hide/Show Desktop Icons '© Doug Knox - rev 12/03/99 |
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Tuesday, November 21, 2006 9:24 PM