Whenever I log into a Windows XP pc as a new user I always have to add My
Computer, My Network Places and Internet Explorer icons to the desktop. Is
there a way to do that with a vbscript?

Thanks in advance.

Russ

Re: XP Desktop icons by Björn

Björn
Thu May 26 08:24:51 CDT 2005

"Russ Hromyko" <rhromyko@verizon.net> wrote in message
news:fgLke.55$3u3.49@trnddc07...
> Whenever I log into a Windows XP pc as a new user I always have to add My
> Computer, My Network Places and Internet Explorer icons to the desktop.
Is
> there a way to do that with a vbscript?
>
> Thanks in advance.
>
> Russ
>
>
>

Try calling the following sub (watch for line wraps).

To turn on MyComputer, MyNetworkPlaces and InternetExplorer:

ShowDesktopIcons 0, 1, 1, 1

Note: When turning icons off, the result is not visible until you select the
desktop and press F5.

Sub ShowDesktopIcons(MyDocuments, MyComputer, MyNetworkPlaces,
InternetExplorer)
Const RegIconsClassic =
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\Cl
assicStartMenu\"
Const RegIconsNew =
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\Ne
wStartPanel\"
Const GUIDMyDocuments = "{450D8FBA-AD25-11D0-98A8-0800361B1103}"
Const GUIDMyComputer = "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
Const GUIDMyNetworkPlaces = "{208D2C60-3AEA-1069-A2D7-08002B30309D}"
Const GUIDInternetExplorer = "{871C5380-42A0-1069-A2EA-08002B30309D}"
Dim objShell
Set objShell = CreateObject("WScript.Shell")
' My Documents
objShell.RegWrite RegIconsClassic & GUIDMyDocuments, Abs(MyDocuments-1)
objShell.RegWrite RegIconsNew & GUIDMyDocuments, Abs(MyDocuments-1)
' My Computer
objShell.RegWrite RegIconsClassic & GUIDMyComputer, Abs(MyComputer-1)
objShell.RegWrite RegIconsNew & GUIDMyComputer, Abs(MyComputer-1)
' My Network Places
objShell.RegWrite RegIconsClassic & GUIDMyNetworkPlaces,
Abs(MyNetworkPlaces-1)
objShell.RegWrite RegIconsNew & GUIDMyNetworkPlaces, Abs(MyNetworkPlaces-1)
' Internet Explorer
objShell.RegWrite RegIconsClassic & GUIDInternetExplorer,
Abs(InternetExplorer-1)
objShell.RegWrite RegIconsNew & GUIDInternetExplorer,
Abs(InternetExplorer-1)
End Sub


--
Björn Holmgren




Re: XP Desktop icons by Russ

Russ
Thu May 26 22:10:55 CDT 2005

Thanks Björn, that's exactly what I was looking for.




"Björn Holmgren" <bjohol@hotmail.com> wrote in message
news:P6kle.64491$Of5.37779@nntpserver.swip.net...
> "Russ Hromyko" <rhromyko@verizon.net> wrote in message
> news:fgLke.55$3u3.49@trnddc07...
> > Whenever I log into a Windows XP pc as a new user I always have to add
My
> > Computer, My Network Places and Internet Explorer icons to the desktop.
> Is
> > there a way to do that with a vbscript?
> >
> > Thanks in advance.
> >
> > Russ
> >
> >
> >
>
> Try calling the following sub (watch for line wraps).
>
> To turn on MyComputer, MyNetworkPlaces and InternetExplorer:
>
> ShowDesktopIcons 0, 1, 1, 1
>
> Note: When turning icons off, the result is not visible until you select
the
> desktop and press F5.
>
> Sub ShowDesktopIcons(MyDocuments, MyComputer, MyNetworkPlaces,
> InternetExplorer)
> Const RegIconsClassic =
>
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\Cl
> assicStartMenu\"
> Const RegIconsNew =
>
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\Ne
> wStartPanel\"
> Const GUIDMyDocuments = "{450D8FBA-AD25-11D0-98A8-0800361B1103}"
> Const GUIDMyComputer = "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
> Const GUIDMyNetworkPlaces = "{208D2C60-3AEA-1069-A2D7-08002B30309D}"
> Const GUIDInternetExplorer = "{871C5380-42A0-1069-A2EA-08002B30309D}"
> Dim objShell
> Set objShell = CreateObject("WScript.Shell")
> ' My Documents
> objShell.RegWrite RegIconsClassic & GUIDMyDocuments, Abs(MyDocuments-1)
> objShell.RegWrite RegIconsNew & GUIDMyDocuments, Abs(MyDocuments-1)
> ' My Computer
> objShell.RegWrite RegIconsClassic & GUIDMyComputer, Abs(MyComputer-1)
> objShell.RegWrite RegIconsNew & GUIDMyComputer, Abs(MyComputer-1)
> ' My Network Places
> objShell.RegWrite RegIconsClassic & GUIDMyNetworkPlaces,
> Abs(MyNetworkPlaces-1)
> objShell.RegWrite RegIconsNew & GUIDMyNetworkPlaces,
Abs(MyNetworkPlaces-1)
> ' Internet Explorer
> objShell.RegWrite RegIconsClassic & GUIDInternetExplorer,
> Abs(InternetExplorer-1)
> objShell.RegWrite RegIconsNew & GUIDInternetExplorer,
> Abs(InternetExplorer-1)
> End Sub
>
>
> --
> Björn Holmgren
>
>
>