totoymola Posted December 23, 2004 Posted December 23, 2004 I want to change the default icon of the text files without hacking the shell32.dll.So this is what I did.Under the HKCR\txtfile\DefaultIcon, I manually changed the default value to the path of my icon file. In my case, it is "%SystemRoot%\Resources\Icons\txt.ico",0.However, if I export that entry so I can use it on my unattended installation, the value changed to hex.Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\ 00,25,00,5c,00,52,00,65,00,73,00,6f,00,75,00,72,00,63,00,65,00,73,00,5c,00,\ 49,00,63,00,6f,00,6e,00,73,00,5c,00,74,00,78,00,74,00,2e,00,69,00,63,00,6f,\ 00,22,00,2c,00,30,00,00,00Is there a way to change this hex value to a more readable text? And I'm not sure if this will work on a different installation.I tried[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]@="%SystemRoot%\Resources\Icons\txt.ico",0but it didn't work.
totoymola Posted December 23, 2004 Author Posted December 23, 2004 Sorry. Wrong section. I thought I was in the Unattended section.
pinout Posted December 23, 2004 Posted December 23, 2004 I think your first problem is this:"%SystemRoot%\Resources\Icons\txt.ico",0should be"%SystemRoot%\Resources\Icons\txt.ico,0"If you do it with an INF file you can read the value as plaintext rather than hex values..[Version]Signature = "$Windows NT$"[DefaultInstall]AddReg = Add.AddReg[Add.AddReg]HKCR,"txtfile\DefaultIcon","",0x00020000,"%SystemRoot%\Resources\Icons\txt.ico,0"0x00020000 is REG_EXPAND_SZ (which isn't too readable when exported to a REG file)
totoymola Posted December 23, 2004 Author Posted December 23, 2004 Thanks guys for the reply. I'm gonna try them.@MCTWhat is it gonna look like if I use 2 percent signs? Is it like this?@="%%SystemRoot%%\Resources\Icons\txt.ico",0@pinoutThe "%SystemRoot%\Resources\Icons\txt.ico",0 is actually the exact value in my registry. But I will try your idea.I'm still a rookie in INF files. I don't even know how to use it for a silent installation. All I know is installing it manually. (right click an INF file, then click install. )And I don't know how to make those kind of scripts.
MCT Posted December 23, 2004 Posted December 23, 2004 @Totoymola he made the inf for u Rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 %systemdrive%\install\myinf.inf
totoymola Posted December 23, 2004 Author Posted December 23, 2004 Thanks. I think it's time to continue studying how INF files work. I started studying this months ago, but I stopped because I got bored, and I thought I'm not going to use it.
big poppa pump Posted December 23, 2004 Posted December 23, 2004 Thanks. I think it's time to continue studying how INF files work. I started studying this months ago, but I stopped because I got bored, and I thought I'm not going to use it. You should. Inf files are the coolest and the easiest way to install apps. I do my entire unattended installation with INF files and all my new changes to my unattended DVD takes less than a few minutes. Granted it took me some time to get the hang of it, but once I did there is no way I am going back to the .cmd extensions anymore.
totoymola Posted December 23, 2004 Author Posted December 23, 2004 Yeah. I guess you are right. INF files are good, but more complicated than command scripts. It's time to read endless manuals again.
totoymola Posted December 23, 2004 Author Posted December 23, 2004 Rundll32.exe setupapi,InstallHinfSection DefaultInstall 128What does that 128 means? Because under my HKCR\inffile\shell\install\command, I have rundll32.exe setupapi,InstallHinfSection DefaultInstall 132.Thanks.
prathapml Posted December 23, 2004 Posted December 23, 2004 Hey if you haven't already seen this guide, then take a look now atleast. http://gosh.msfnhosting.com/He has a trememdous lot of info regarding INF.BTW, I won't dis-courage you from learning how INF files would work, but I'd say its not worth spending that much time over. Personally, I prefer using XML configure files for uA (check out XPlode) - its easier and good-looking, and functionality is unmatched.
Yzöwl Posted December 23, 2004 Posted December 23, 2004 I have answered this before, it should be around here:http://www.msfn.org/board/index.php?&act=S...=33043&p=226184
totoymola Posted December 23, 2004 Author Posted December 23, 2004 Thanks for the link prathapml. Infos there are worth reading.Yeah. XPlode is xml based. And it is really complicated. My stupid brain can't comprehend that for now. But I'm planning to study that one of these days because I might need it for making installshield projects. There are lots of things that I wanna learn. I'm just taking one step at a time. Thanks Yzöwl for the explanation of 128 and 132.
Tsunami Posted December 23, 2004 Posted December 23, 2004 Edit: oops, this topic has a second page Oh well, here's what I posted anyway:InstallHinfSectionValue Description -------------------0 System provided INF. 128 Set the default path of the installation to the location of the INF. This is the typical setting. +0 Never reboot the computer. +1 Reboot the computer in all cases. +2 Always ask the users if they want to reboot. +3 Reboot the computer if necessary without asking user for permission. +4 If a reboot of the computer is necessary, ask the user for permission before rebooting.
totoymola Posted December 23, 2004 Author Posted December 23, 2004 Thanks Tsunami for the additional information.
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