Jump to content

Silent/Unattended Install The INF way!


Recommended Posts


noone has solution for this?

OK the mod works perfectly.

The only bug is in the disinstallation

process, when i open Control Panel ->

and try to remove foobar, the first

click on the "Remove" button erase

files only, while the second remove

entry and links.

Link to comment
Share on other sites

i have looked at regedit and for example

in the uninstall and it doesn't remove

the registry entries.

For example Software\Classes\.ac3 is not removed

and not also Uninstall\DisplayName...

Also it doesn't remove the C:\Program Files\foobr2000

directory nor the .lnk.

It seems it doesn't execute the DefaultUninstall section at all!!

Link to comment
Share on other sites

I've been trying to install RegCleaner using the inf method.

It works when I install locally, but just won't work from my unattended cd, giving me an "Installation Failed" message, just for RegCkeaner.

My cmd, which is called by runonce, is as follows:

@echo off

Title=Installing RegCleaner - A Windows Registry Tool

start /wait rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 ./RegCleaner.inf

COPY "Link\RegCleaner.lnk" "%systemdrive%\Documents and Settings\All Users\Desktop\"

EXIT

which calls the inf file:
[Version]

Signature="$Windows NT$"

[DefaultInstall]

RequiredEngine = Setupapi

AddReg = Uninst.Reg

CopyFiles = Core.Copy, Lang.Copy, Inf.Copy

UpdateInis = AddLink

[DefaultUninstall]

RequiredEngine = Setupapi

AddReg = NoDir.Reg

DelReg = Uninst.Reg

DelFiles = Core.Copy, Lang.Copy Inf.Del

[DestinationDirs]

Core.Copy=16422,%DESCNAME%

Lang.Copy=16422,%Lang%

Inf.Copy = 17

File.Del = 17

[Core.Copy]

DefaultColors.dat

DefaultColumns.dat

DefaultOptions.dat

RegCleaner.exe

ignorelist.dat

uninstall.exe

readme.htm

[Lang.Copy]

English.rlg

Italian.rlg

[AddLink]

setup.ini, progman.groups,, ""group1="%16395%\Programmi\RegCleaner\"""

setup.ini, group1,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\RegCleaner.exe"""""""

setup.ini, progman.groups,, ""group2="%16410%\Microsoft\Internet Explorer\Quick Launch\"""

setup.ini, group2,,"""%DESCNAME%"",""""""%16422%\%DESCNAME%\RegCleaner.exe"""""""

[uninst.Reg]

HKLM,%UNINSTAL%\%DESCNAME%,DisplayName,,"%DESCNAME%"

HKLM,%UNINSTAL%\%DESCNAME%,UninstallString,,"%REMOVCMD% %17%\%FILENAME%.inf"

[NoDir.Reg]

HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce,RemDir,,"%11%\cmd.exe /C RD /S /Q ""%16422%\%DESCNAME%"""

HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce,RemLink1,,"%11%\cmd.exe /C DEL /F /Q ""%16395%\Programs\ProToolz\%DESCNAME%.lnk"""

HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce,RemLink2,,"%11%\cmd.exe /C DEL /F /Q ""%16410%\Microsoft\Internet Explorer\Quick Launch\%DESCNAME%.lnk"""

[strings]

DESCNAME = "RegCleaner v4.3"

Lang = "RegCleaner v4.3\Languages"

REMOVCMD = "rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132"

UNINSTAL = "Software\Microsoft\Windows\CurrentVersion\Uninstall"

The folder "RegCleaner" contains all the files needed, and even the lnk I created gets copied onto the desktop. But during unattended install it just won't work!

Note that the XP installation is in Italian, thus "programmi" in the code.

Can anyone tell me what I'm doing wrong? Or is it that you just can't install using inf from runonce?

Thanks

Link to comment
Share on other sites

hi Kapo

No, the installer isn't a 7zip compressed installer, although I could try with one. Do you think it would make any difference?

All I basically need to do with regcleaner is copy it into the progams directory (in this case "programmi", but usually "programs") and copy the link into the all users desktop.

There are no switches or anything because it doesn't actually get installed, but only copied.

btw, I agree, it's definitely better to write English here!!

Link to comment
Share on other sites

This is my attempt at a rewrite of the foobar inf file.

I noticed some errors in it whilst looking into Kapo's problem.

The file is intended to basically replicate the original, therefore Kapo will have to alter at least the [AddLink] and [DelLink] sections and obviously any changes they needed from the first example.

When I say replicate I mean that if any of the heaps of files included for installation require registering they are not going to be, as they weren't in the original.

Hope it helps!

foobar2000.zip

Link to comment
Share on other sites

Okay, I managed to install RegCleaner using the 7zip installer method.

All the other files (the inf, the cmd etc) remained exactly the same, but were just zipped up and called by the installer.

Why, if the cmd and inf are the same, should the 7zip installer work and the unarchived version fail the installation?

Link to comment
Share on other sites

@ big i don't know how translate "Directory di lavoro" :)

@Yzöwl: I've modified a little your inf:

1) the Uninstall string now is rundll32.exe (only rundll gives error).

2) added a Pre.Copy section for Presets copy.

3) added a link on the desktop (All Users Desktop) and the uninstall too

4) added a RunOnceEx istruction to delete the foobar2000 \Software\blabla\Uninstall key

if you want i post it.

i've noticed the the string

rundll32.exe setupapi,InstallHinfSection DefaultUninstall 130

blocks the uninstallation of the program.

It asks if you want to restart the computer in theory.

0	  Either System provided INF Or Never reboot the computer
128 Set the default path of the installation to the location of the INF. This is the typical setting.
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.

Anyone can try ?

Edited by Kapo
Link to comment
Share on other sites

i've noticed the the string

rundll32.exe setupapi,InstallHinfSection DefaultUninstall 130

blocks the uninstallation of the program.

It asks if you want to restart the computer in theory.

Where did you notice that string?
Link to comment
Share on other sites

when i try the disinstallation.

It freeze the "Application Install" in control panel.

the sting is in the HKLM\blablabla\Uninstall section

and i've take it on MicroXoft site.

Edited by Kapo
Link to comment
Share on other sites

  • 5 weeks later...

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...