sc4ry Posted March 5, 2009 Share Posted March 5, 2009 Hey, i would like to set some ico-files as Folderpic (using Windows Vista). the manuell way goes over customize in properties. because i have a lot of folders, i will automate this. the ico-files are already in the folders, where they should be the folderpic. when i do this manually, an file called "desktop.ini" is created in each folder. so i try to create these file via autoit, but the folderpic does not change. did somebody know a way, how i can change easily folderpics via autoit? creating the ini-file could be a part of this routine, maybe a dllcall or somethin like that is missing ... thank you =) Link to comment Share on other sites More sharing options...
James Posted March 5, 2009 Share Posted March 5, 2009 Sorry, do you want to change the folder icons themselves or the backgrounds folders have? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
sc4ry Posted March 5, 2009 Author Share Posted March 5, 2009 Hi, i watn to change the folder icon themselves. so that i do not have the bad foldericon from windows, instead the nice icon in my explorer ;-) Link to comment Share on other sites More sharing options...
James Posted March 5, 2009 Share Posted March 5, 2009 This works sometimes, I think you need to restart explorer or something. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $sLocation = @HomeDrive Global $sFilename = @SystemDir & "\shell32.dll" $frmIcon = GUICreate("Change Folder Icons", 290, 187) GUICtrlCreateGroup("", 8, 0, 273, 178) GUICtrlCreateLabel("Folder:", 16, 16, 36, 17) $inpLocation = GUICtrlCreateInput("", 56, 16, 217, 21) $btnChange = GUICtrlCreateButton("Change Folder", 152, 40, 123, 25) GUICtrlCreateLabel("Folder:", 16, 16, 36, 17) GUICtrlCreateLabel("Icon:", 16, 68, 36, 17) $inpIcon = GUICtrlCreateInput("", 56, 68, 217, 21) $btnIcon = GUICtrlCreateButton("Change Icon", 152, 92, 123, 25) $btnSave = GUICtrlCreateButton("Save", 172, 148, 99, 25) GUICtrlCreateLabel("Index:", 16, 120, 33, 17) $inpIndex = GUICtrlCreateInput("", 56, 120, 217, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btnChange $sLocation = FileSelectFolder("Select Folder", @HomeDrive) GUICtrlSetData($inpLocation, $sLocation) Case $btnIcon $sFileName = FileOpenDialog("Select file:", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "Executables & dll's (*.exe;*.dll;*.ocx;*.icl)") If @error Then ContinueLoop GUICtrlSetData($inpIcon, $sFileName) Case $btnSave _Write(GUICtrlRead($inpLocation), GUICtrlRead($inpIcon), GUICtrlRead($inpIndex)) EndSwitch WEnd Func _Write($ioLocation, $ioIcon, $ioIndex) $ioLocation = $ioLocation & '\desktop.ini' IniWrite($ioLocation, ".ShellClassInfo", "IconResource", $ioIcon & "," & $ioIndex) FileSetAttrib($ioLocation, "+SH") MsgBox(64, "Folder Icons", "Saved!") EndFunc Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
sc4ry Posted March 13, 2009 Author Share Posted March 13, 2009 hey, thank you, but that does not work for me (vista). what process is behind changing folderpic via properties? Link to comment Share on other sites More sharing options...
James Posted March 13, 2009 Share Posted March 13, 2009 Logoff and logon again. I don't know how to auto update the image. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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