![]() %_AppDir_%reg.exe add "HKCR\Directory\shell\Set_Folder_Icon" /ve /d "Set Folder Icon" /f To add register entries in command line, run as admin:.The Remove_Set_Folder_Icon.reg file looks like:.Just replace drive and folder\file name. The Set_Folder_Icon.reg file looks like:.If Desktop.ini is not in the target folder, a new one will be created, if it exists, the relevant edits to the Folder.ico file will be made in the existing Desktop.ini. That the entries in the registry have been made, and the path of the bat file is set in the registry correctly.Ī Folder.ico file already exists in the destination folder. \\Desktop.old >.\\Desktop.ini %_AppDir_%findstr.exe. offĮcho & echo IconResource=.\Folder.ico,0 Obs.: CertUtil.exe already comes with WindowsĪ short answer, where the presence of registry entries are ignored, would be. Note: Assign the icon to the folder, some displays immediately, others after a few seconds, the same seems to happen also when we change the wallpaper via the Windows registry/command line. ::-BEGIN - Wy5TaGVsbENsYXNzSW5mb10gDQpJY29uUmVzb3VyY2U9LlxGb2xkZXIuaWNvLDA Wy5TaGVsbENsYXNzSW5mb10gDQpJY29uUmVzb3VyY2U9LlxGb2xkZXIuaWNvLDANĬltWaWV3U3RhdGVdDQpNb2RlPQ0KVmlkPQ0KRm9sZGVyVHlwZT1HZW5lcmljDQo= \Desktop.ini defaults to folders that do not contain configuration. If the folder does not contain >\Desktop.ini, it will create one using decoding a standard file saved in itself in base64 strings. If the folder has a \Desktop.ini, it will use all the settings, except those related to icon options.Ħ. If the informed folder does not contain an icon, it will abort without warnings.ĥ. Informing a valid folder, and it will check if a Folder.ico icon is present and will use it, if it does not exist, it will use another one that is in the same folder.Ĥ. Execute (click/prompt), without informing a valid folder as parameter, and it will abort.ģ. Run a first time as admin, and it will add all the entries to the Windows registry.Ģ. ico file, if not, a new one will be created.ġ. When a Desktop.ini file exists in the target folder, the necessary edits will be made to replace the. If a Folder.ico file is in the target folder, it will be used, in the absence, another icon file will be used, and renamed to Folder.ico The following executions will be right click menu, in the target folder ![]() Will run a first time (as an administrator) so that the necessary entries in the Windows registry are added, (by the bat itself) and pointed to the location of to your File.bat. That you are going to put the bat in the folder where it should be, where it will always be called. ::-BEGIN -Wy5TaGVsbENsYXNzSW5mb10gDQpJY29uUmVzb3VyY2U9LlxGb2xkZXIuaWNvLDA ![]() \\Desktop.iniĢ>nul del/q /f /a "%~f1\Desktop.old" & endlocal & &0 ||goto :eOf If "%_er%" = "y" (%_AppDir_%timeout.exe 5|echo\Admin rights required! %_AppDir_%Findstr.exe /bliv "\[\.Shell IconR IconF IconI" nul 2>&1 %_AppDir_%CertUtil.exe -decode -f "%~dpnx0". ![]() \\Desktop.iniĮcho & echo IconResource=Folder.ico,0 \\Folder.ico (%_AppDir_%Attrib.exe -s -r -h +a. ( %_AppDir_%reg.exe add "%_key%" /ve /d "Set Folder Icon" /f Set "_reg_qry=%_AppDir_%reg.exe query "%_key%"" Set "_key=HKCR\Directory\shell\Set_Folder_Icon" I'd like to just check if folder.ico exists, edit desktop.ini or create it entirely if it doesn't exist (I don't know if the current bat can do that), and ideally (but not mandatory) not edit the other options that might be there off I based my work from this topic: rem offįOR /R %%I IN (*.ico) DO exist %%~dpnfolder.ico ( I fear this is because I can't get it to pickup the folder I right click on. Have a right click menu on folders that runs a batch file (done thanks to this topic): Windows Registry Editor Version folder \"%1\""įor the bat file, I fail to make it work. I try to make a custom right click menu that allows me to set a folder's custom icon using whatever folder.ico I put in that folder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |