;ricktendo64 2007[Version]Signature="$CHICAGO$";Add this to your [Optional Componenets][Add This]AddReg=Uninstall.AddReg;Tells the INF what directory & sub-folder the [Program.Files] are located[DestinationDirs]Program.Files=16422,%PROG_DIR%;Adds option to "Add or Remove Programs"[Uninstall.AddDelReg]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%PROG_NAME%","DisplayIcon",0,"%16422%\%PROG_DIR%\Program.exe"HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%PROG_NAME%","DisplayName",0,"%PROG_NAME%"HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%PROG_NAME%","DisplayVersion",0,"%VERS%"HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%PROG_NAME%","NoModify",0x10001,01,00,00,00HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%PROG_NAME%","NoRepair",0x10001,01,00,00,00HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%PROG_NAME%","UninstallString",0,"rundll32.exe advpack.dll,LaunchINFSection %MAIN_INF%,Uninstall";Uninstall section that will be launched[Uninstall]BeginPrompt =BeginUnInsPromptRunPreSetupCommands =Close.Program:1 ;<- The ":1" Flag Hides the taskkill.exe CMD window (does not need to be in section name)DelFiles =Program.Files,PNF.FileDelDirs =Program.DirsProfileItems =Program.DelShortcutDelReg =Uninstall.AddDelRegUpdateInis =sysoc.EditEndPrompt =EndUnInsPromptRunPostSetupCommands=Dir.Delete,Launch.WebsiteCleanup =1;Closes program executable if running before uninstall[Close.Program]TASKKILL /F /IM Program.exe;for XP Home compatibility useTSKILL Program ;<- tskill fails if you add the file extention (bad example: tskill program.exe);Program files to delete, will not work without a DestinationDir[Program.Files]Program.exeProgram.iniShellExt.dll,,,1 ;The ",1" flag is used if the file is in use, so entries will be added to the registry to delete it on next boot.;Obsolote PNF file created during Windows Setup (Requires a entry in DestinationDirs example PNF.File=17)[PNF.File]addon.PNF;Deletes Start Menu shortcut using profileitems the secret is the ",0x00000002" flag (also used is 3 and 4)[Program.DelShortcut]Name =%PROG_NAME%,0x00000002SubDir=%SUB_DIR%;Removes addon entry from sysoc.inf so Cleanup=1 does not break Add/Rem Windows Components[sysoc.Edit]%17%\sysoc.inf,Componets,Whatever Is Under [Optional Components]=*;Deletes Program Folder (will only delete empty folder)[Program.Dirs]%16422%/%PROG_DIR%;Deletes Folders and files in them[Dir.Delete]rundll32.exe advpack.dll,DelNodeRunDLL32 %16422%\%PROG_DIR%,<flag>[Launch.Website]rundll32.exe url.dll,FileProtocolHandler <a href="http://www.ryanvm.net/msfn/" target="_blank"><a href="http://www.ryanvm.net/msfn/" target="_blank"><a href="http://www.ryanvm.net/msfn/" target="_blank"><a href="http://www.ryanvm.net/msfn/" target="_blank"><a href="http://www.ryanvm.net/msfn/" target="_blank">http://www.ryanvm.net/msfn/</a></a></a></a></a>;Uninstall Prompt[BeginUnInsPrompt]Title =%PROG_NAME% UninstallerPrompt =Are you sure you want to remove %PROG_NAME% from your computer?ButtonType=YESNO ;<- YESNO or OKCANC;Optional End Prompt (not really nessesary just tells you the uninstall was a success.)[EndUnInsPrompt]Prompt=%PROG_NAME% was successfully removed from your computer.;Here you tell the INF what all the variables are (Example: lets say %VAR% so under strings you add VAR=VARIABLE)[Strings]MAIN_INF ="Program.inf"PROG_DIR ="Program Folder"PROG_NAME="Program Name"SUB_DIR ="Start Menu Sub"
[How To] INF Uninstall Template
#1
Posted 14 October 2007 - 08:10 PM
#2
Posted 15 April 2008 - 07:16 PM
However I'm still not entierly clear on how to insert a exactly specified directory there. For example working on the IE uninstall ini file, at the very end I would like something like that:
; delete whole IE directory [files.del.ie] rundll32.exe advpack.dll,DelNodeRunDLL32 %16422%\%"Internet Explorer"%,<flag>
But it does not work. Could be the commas not welcome there?
#3
Posted 15 April 2008 - 10:04 PM
[files.del.ie] rundll32.exe advpack.dll,DelNodeRunDLL32 %16422%\Internet Explorer,8You had some rougue percentages and a unspecified flag
%16422%\%"Internet Explorer"%,<flag>
#4
Posted 16 April 2008 - 12:46 AM
#5
Posted 16 April 2008 - 01:27 AM
NopeCool, Rick. Question though. Has anyone shown any interest in wanting to learn .inf's?
#6
Posted 16 April 2008 - 01:36 AM
#7
Posted 17 April 2008 - 12:06 AM
So, something in the % mean that this is a variable, defined elsewhere. So when I define it just in the place, then it is not need, okay. That is why I had there the add %. The flag I copy directly from your example. And should not be the Internet Explorer path in commas? It does contain a space, so I thought...
And what the 8 at the end does mean?
In the file I include are deleting files made this way:
[DefaultInstall]
DelFiles = files.del.sys
[DestinationDirs]
files.del.sys = 11
[files.del.sys]
actxprxy.dll, 1
asctrls.ocx,,,1
cdfview.dll,,,1
...etc...
But that only delete already known files and files in the defined directory too. When I want to remove whole dir wih bunch of files, well, that is a problem. How can do it, I don't know.
But I would love to be able automatize my cleaning up of windows 2000 SP4
Attached Files
#8
Posted 17 April 2008 - 12:38 AM
actxprxy.dll, 1
#9
Posted 17 April 2008 - 09:24 AM
Any chances the deleting directory will work?
#10
Posted 04 June 2008 - 10:13 AM
Using
[DestinationDirs]
files.del.ie = 16422,Internet Explorer
[files.del.ie]
11,,iexplore.exe, 1
11,,hmmapi.dll, 1
Is possible to delete the files inside of the Internet Explorer dir, however not dirs and not the WHOLE IE directory as I very much want to do so.
When I add this:
rundll32.exe advpack.dll,DelNodeRunDLL32 16422\Internet Explorer
...it does not work as well. Help?
PS: rundll32.exe advpack.dll,DelNodeRunDLL32 C:\Program files\Internet Explorer
from commandline it does delete the Internet Explorer dir, even with files inside. Same doest NOT do the shorter version:
rundll32.exe advpack.dll,DelNodeRunDLL32 16422\Internet Explorer
...probably because there is a difference between commandline and commands inside of the inf file... Both versions also does not work at all inside of the inf file
Not even using it like this:
[Dir.Delete]
rundll32.exe advpack.dll,DelNodeRunDLL32 C:\Program files\Internet Explorer
Edited by trodas, 04 June 2008 - 01:51 PM.
#11
Posted 04 June 2008 - 05:13 PM
[Dir.Delete] rundll32.exe advpack.dll,DelNodeRunDLL32 """%16422%\Internet Explorer""",8
#12
Posted 06 August 2008 - 02:53 PM
What does mean "Cleanup =1"?
#13
Posted 06 August 2008 - 09:50 PM
#14
Posted 06 August 2008 - 10:13 PM
Thanks
#15
Posted 06 September 2008 - 09:02 PM
section for this example in SumatraPDF after frist run create (sumatrapdfprefs.dat)file
in a C:\Documents and Settings\user\Application Data\SumatraPDF
ho to create unistall section for add to inf file for delete this
sum.inf.rar 1.19K
3 downloads
#16
Posted 07 September 2008 - 12:09 AM
[DestinationDirs] CopySumraP = 16422,"Utilities\SumatraPDF" NewSectionName = 16410,"SumatraPDF" ; %userprofile%\Application Data\SumatraPDF DelFiles = CopySumraP,NewSectionName [NewSectionName] sumatrapdfprefs.dat AnotherFileExample.extDont forget to add it to DestinationDirs, if not DelFiles will not work
#17
Posted 07 September 2008 - 09:31 PM
[SumP.DelDirs]
%16422%\Utilities\SumatraPDF"
%16410%\SumatraPDF"
#18
Posted 24 December 2008 - 04:47 PM
I have installed an inf and I am unable to "uninstall".
My inf file contains a part about "uninstall" but I feel unable to use it.
I would be most grateful for some indications as to how to uninstall.
The inf file is attached, but for your convenience, here is the full text of my inf file:
[version]
signature="$CHICAGO$"
Class = MEDIA
[DefaultInstall]
CopyFiles = Util.Files.Sys
AddReg = Util.Add.Reg.Sys
UpdateInis= AddSysIniEntry
[DefaultUnInstall]
DelFiles = Util.Files.Sys
DelReg = Util.Del.Reg.Sys
UpdateInis= DelSysIniEntry
[DestinationDirs]
Util.Files.Sys = 11
[SourceDisksNames]
1="PANA",,1
[SourceDisksFiles]
pdvcodec.dll=1
[Util.Files.Sys]
pdvcodec.dll
panadv.inf
[Util.Add.Reg.Sys]
HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.dvsd,Description,,%*PANA.DeviceDesc%
HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.dvsd,Driver,,pdvcodec.dll
HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.dvsd,FriendlyName,,%*PANA.DeviceDesc%
[Util.Del.Reg.Sys]
HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.dvsd,Description
HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.dvsd,Driver
HKLM,SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.dvsd,FriendlyName
[AddSysIniEntry]
system.ini, drivers32,,"vidc.dvsd=pdvcodec.dll",0
[DelSysIniEntry]
system.ini, drivers32,,"vidc.dvsd=pdvcodec.dll",0
[Strings]
*PANA.DeviceDesc="PANA"
Attached Files
#19
Posted 24 December 2008 - 09:19 PM
#20
Posted 18 November 2009 - 01:04 AM
I'm trying my hand on a simple addon. So far, encounter problem. It can install and uninstall properly. After uninstalled, the only problem is I got an error message when I tried to launch 'Add/Rem windows components' despite that I have included my inf with the above
[sysoc.Edit] portion and updateinis entry.
I checked sysoc.inf entry after uninstall and the program still listed there:
[Components] Rota=ocgen.dll,OcEntry,Rota.inf,HIDE,7Screenshot
http://www.kwikpiks.com/files/66/error.jpg
Can you guy help to check what is wrong with my inf? Rota.inf as below :
[Version] Signature=$Windows NT$ [Optional Components] Rota [DefaultInstall] CopyFiles =Rota.Files,@Rota.INF ProfileItems=Rota.AddShortcut AddReg =Rota.AddReg [Rota] OptionDesc ="Rota v0.70" Tip ="Lossless Jpg Batch Rotator via GUI" Modes =0,1,2,3 CopyFiles =Rota.Files ProfileItems=Rota.AddShortcut AddReg =Rota.AddReg [SourceDisksNames.x86] 1="Rota Files","Rotav07.cab",,"i386" [DestinationDirs] Rota.Files=16422,Rota DefaultDestDir =17 PNF.File =17 [SourceDisksFiles] droot.gif=1 readme-e.html=1 readme.html=1 Rota.exe=1 rotadisp.gif=1 rotainf.gif=1 rotainit.gif=1 rotamod.gif=1 rotamode.gif=1 rotanorm.gif=1 rotaopen1.gif=1 rotaopen2.gif=1 rotaro.gif=1 rotarow.gif=1 test1.jpg=1 test1l.jpg=1 test2.jpg=1 test2l.jpg=1 test3.jpg=1 test3l.jpg=1 test4.jpg=1 test4l.jpg=1 test5.jpg=1 test5l.jpg=1 Rota.ini=1 [Rota.Files] droot.gif readme-e.html readme.html Rota.exe rotadisp.gif rotainf.gif rotainit.gif rotamod.gif rotamode.gif rotanorm.gif rotaopen1.gif rotaopen2.gif rotaro.gif rotarow.gif test1.jpg test1l.jpg test2.jpg test2l.jpg test3.jpg test3l.jpg test4.jpg test4l.jpg test5.jpg test5l.jpg Rota.ini [Rota.AddShortcut] Name =Rota CmdLine =16422,Rota,Rota.exe SubDir =Rota WorkingDir=16422,Rota IfoTip =Loss-less JPEG rotate utility. [Rota.AddReg] HKLM,%UNINSTALL%,"Comments",0x0,"Loss-less JPEG rotate utility" HKLM,%UNINSTALL%","DisplayIcon",0x0,"%16422%\Rota\Rota.exe" HKLM,%UNINSTALL%,"DisplayName",0x0,"Rota" HKLM,%UNINSTALL%,"DisplayVersion",0x0,"0.7" HKLM,%UNINSTALL%,"NoModify",0x10001,01,00,00,00 HKLM,%UNINSTALL%,"NoRepair",0x10001,01,00,00,00 HKLM,%UNINSTALL%,"Publisher",0x0,"TsuruZoh Tachibanaya" HKLM,%UNINSTALL%,"UninstallString",0x0,"rundll32.exe advpack.dll,LaunchINFSection Rota.inf,Uninstall" HKLM,%UNINSTALL%,"URLInfoAbout",0x0,"http://park2.wakwak.com/~tsuruzoh/index-e.html" [UnInstall] BeginPrompt =BeginUnInsPrompt RunPreSetupCommands=Close.Rota:1 DelFiles =Rota.Files,PNF.File DelDirs =Rota.Dirs DelReg =Obsolete.Reg ProfileItems =Rota.DelShortcut UpdateInis =sysoc.Edit EndPrompt =EndUnInsPrompt Cleanup =1 [Close.Rota] TSKILL Rota [PNF.File] Rota.PNF [sysoc.Edit] %17%\sysoc.inf,Components,Rota=* [Obsolete.Reg] HKLM,"%UNINSTALL%\" [Rota.DelShortcut] Name =Rota,0x00000002 SubDir=Rota [Rota.Dirs] %16422%/Rota [BeginUnInsPrompt] Title =Rota 0.7 Uninstall Prompt =Are you sure you want to completely remove Rota? ButtonType=YESNO [EndUnInsPrompt] Prompt=Rota was successfully removed from your computer. [Strings] UNINSTALL="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Rota"
BTW, is this a typo error for the word 'Componets' in post #1? I think it should be Components but better to confirm with you guys.
;ricktendo64 2007;Removes addon entry from sysoc.inf so Cleanup=1 does not break Add/Rem Windows Components[sysoc.Edit]%17%\sysoc.inf,Componets,Whatever Is Under [Optional Components]=*[/quote]
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












