Jump to content

Installing RegCleaner using inf


Recommended Posts

I'm having some problems installing RegCleaner from my unattended cd/dvd I'm creating.

It fails the installation for regcleaner only. The inf install method is used, with VMWare.

I've attached a file containing the folder with the inf , and including the test cmd file which actually manages to install the program proprely once windows is set up, but fails the installation if run with runonce. The installer adds a link to All Users' desktop. Note that the path is "programmi" instead of "programs" because it's on an italian unattended cd.

Could anyone tell me why and what I should be doing?

Thanks

RCleaner.zip

Link to comment
Share on other sites


Firstly your install command is wrong.

  • It should be Title [string] not Title=
    and also .\ not ./

Then there are errors in your inf including but not limited to

  • The name of the Executable is RegCleanr.exe not RegCleaner.exe

Here are some, hopefully corrected, examples for you.

regcleaner.cmd

[Version]
Signature = $Windows NT$

[SourceDisksNames]
55 = %SETUPNAME%

[SourceDisksFiles]
%THISFILE%.inf = 55

[DestinationDirs]
Core.Copy =16422,%DESCNAME%
Lang.Copy =16422,%DESCNAME%\Languages
Inf.Copy = 17
File.Del = 17

[DefaultInstall]
AddReg = Reg.Uninstall
CopyFiles = Core.Copy, Lang.Copy, Inf.Copy
UpdateInis = AddLink

[DefaultUninstall]
AddReg = Do.Remove
DelReg = Reg.Uninstall
DelFiles = Core.Copy, Lang.Copy, Inf.Copy, File.Del
UpdateInis = DelLink

[Reg.Uninstall]
HKLM,"%UNINSTAL%\%DESCNAME%"
HKLM,"%UNINSTAL%\%DESCNAME%",DisplayName,,"%DESCNAME%"
HKLM,"%UNINSTAL%\%DESCNAME%",UninstallString,,"%REMOVCMD% %THISFILE%.inf"

[Core.Copy]
DefaultColors.dat
DefaultColumns.dat
DefaultOptions.dat
ignorelist.dat
%EXENAME%

[Lang.Copy]
English.rlg
Italian.rlg

[Inf.Copy]
%THISFILE%.inf

[AddLink]
setup.ini, progman.groups,, "group0=""%16386%\%DESCNAME%\"""
setup.ini, group0,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%"""""""
setup.ini, progman.groups,, "group1=""%16410%\%QLAUNCH%\"""
setup.ini, group1,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%"""""""
setup.ini, progman.groups,, "group2=""%16400%\"""
setup.ini, group2,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%"""""""

[Do.Remove]
HKLM,"%RUNONEX%\%DESCNAME%",,,"Finalizing Uninstall of %DESCNAME%"
HKLM,"%RUNONEX%\%DESCNAME%",1,,"%11%\CMD.EXE /C RD /S/Q ""%16422%\%DESCNAME%"">NUL 2>&1"

[DelLink]
setup.ini, progman.groups,, "group0=""%16386%\%DESCNAME%\"""
setup.ini, group0,,"""%DESCNAME%"""
setup.ini, progman.groups,, "group1=""%16410%\%QLAUNCH%\"""
setup.ini, group1,,"""%DESCNAME%"""
setup.ini, progman.groups,, "group2=""%16400%\"""
setup.ini, group2,,"""%DESCNAME%"""

[File.Del]
%THISFILE%.PNF

[Strings]
; Non-localizable
SETUPNAME = "Setup Files"
UNINSTAL = "Software\Microsoft\Windows\CurrentVersion\Uninstall"
REMOVCMD = "rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132"
QLAUNCH = "Microsoft\Internet Explorer\Quick Launch"
RUNONEX = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

; Localizable
THISFILE = "RegCleaner"
DESCNAME = "RegCleaner v4.3"
EXENAME = "RegCleanr.exe"

Link to comment
Share on other sites

Thanks Yzöwl.

I acutally managed to get it to work using the original inf and cmd. The only difference is that I created a 7zip installer. It worked perfectly.

What I can't understand is why it failed the install in the first place. I'm no expert, but installing locally actually worked, so there seems to be no syntax problem, otherwise it would've told me there, wouldn't it? Only the runonce failed, using the cmd which called the inf.

The method which eventually worked was with RunOnceEx, with the 7zip installer.

Any ideas as to why the cmd didn't work with runonce but the same cmd, 7zipped, works perfectly with runonceex?

Another question, which line of code adds the link to the desktop?

btw, I know that I should have named it RegCleanr, but I renamed the original file to RegCleaner (why? because I can't understand the reason why I should miss the extra e, when it works the same with it!).

Link to comment
Share on other sites

Another question, which line of code adds the link to the desktop?
setup.ini, progman.groups,, "group2=""%16400%\"""
setup.ini, group2,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\%EXENAME%"""""""

Edited by Yzöwl
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...