Jump to content

Reg key for auto arrange icons on desktop ?


Recommended Posts


Posted

Save this as desktop.vbs and run it. It will auto-arrange icons on the desktop.

' *** Begin Script ***
' Registry constants
Const HDI_CLASSIC = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu"
Const HDI_NEW = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel"
Const MY_COMPUTER = "\{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
Const MY_NETWORK_PLACES = "\{208D2C60-3AEA-1069-A2D7-08002B30309D}"
Const MY_DOCUMENTS = "\{450D8FBA-AD25-11D0-98A8-0800361B1103}"
Const INTERNET_EXPLORER = "\{871C5380-42A0-1069-A2EA-08002B30309D}"

' Edit registry to show all icons
With CreateObject("WScript.Shell")
.RegWrite HDI_CLASSIC & MY_COMPUTER, 0
.RegWrite HDI_CLASSIC & MY_NETWORK_PLACES, 0
.RegWrite HDI_CLASSIC & MY_DOCUMENTS, 0
.RegWrite HDI_CLASSIC & INTERNET_EXPLORER, 0
.RegWrite HDI_NEW & MY_COMPUTER, 0
.RegWrite HDI_NEW & MY_NETWORK_PLACES, 0
.RegWrite HDI_NEW & MY_DOCUMENTS, 0
.RegWrite HDI_NEW & INTERNET_EXPLORER, 0
End With

' Create explorer command file to toggle desktop window
Set oFSO = CreateObject("Scripting.FileSystemObject")
sSCFFile= oFSO.BuildPath(oFSO.GetSpecialFolder(2), oFSO.GetTempName &".scf")
With oFSO.CreateTextFile(sSCFFile, True)
.WriteLine("[Shell]")
.WriteLine("Command=2")
.WriteLine("[Taskbar]")
.WriteLine("Command=ToggleDesktop")
.Close
End With

' Toggle desktop and send F5 (refresh)
With CreateObject("WScript.Shell")
.Run """" & sSCFFile & """"
WScript.Sleep 100
.Sendkeys "{F5}+{F10}in"
WScript.Sleep 100
.Run """" & sSCFFile & """"
End With

' Delete explorer command file
oFSO.DeleteFile sSCFFile
' *** EOF ***

Posted

You will find the answer here, jrzycrim found the solution. The important part it to import the tweak after the 1st logon, it wont work from cmdlines or before windows loads for the first time.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...