crestj Posted December 19, 2005 Share Posted December 19, 2005 As a post build step I remove a load of icons from the desktop.I'd like to set the desktop icons to auto arrange to tidy this up.Does anyone know the reg keys?ThanksTony Link to comment Share on other sites More sharing options...
muiz Posted December 19, 2005 Share Posted December 19, 2005 This is discussed before tony , search for it Link to comment Share on other sites More sharing options...
cluberti Posted December 19, 2005 Share Posted December 19, 2005 ' Registry constantsConst 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 iconsWith 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, 0End With' Create explorer command file to toggle desktop windowSet 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") .CloseEnd 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 fileoFSO.DeleteFile sSCFFile Link to comment Share on other sites More sharing options...
gunsmokingman Posted December 20, 2005 Share Posted December 20, 2005 This is a script some else used to sort the desktop icons.Dim Act, AppData, Fso, SDSet Act = CreateObject("WScript.Shell")Set Fso = CreateObject("Scripting.FileSystemObject")SD = Act.ExpandEnvironmentStrings("%Systemdrive%")AppData = Act.ExpandEnvironmentStrings("%Appdata%")AppData = AppData & "\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf" Act.Run(Chr(34) & AppData & Chr(34))WScript.Sleep 1000Act.sendkeys "{F5}"WScript.Sleep 500Act.sendkeys "+{F10}"Act.sendkeys "I"Act.sendkeys "A"If Fso.FileExists(SD & "\SortIcons.vbs") Then Fso.DeleteFile(SD & "\SortIcons.vbs") End If Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now