Jump to content

Could you show an example ini file that ...


Morkeleb

Recommended Posts

Hi...

Could you show us an example minimalistic ini-file for WIHU that does the same as the below RunOnceEx.cmd file?

I think it would help quite a few of us understand the ini file syntax:

Example:

There are quite some operands for the file configuration command.

There you mention a file either having a version, or not having one, in which

case it is checked if the file exists or not.

But how to I check if a version exists and it has a version?

But before the file I have some other questions

- What about the ability to do user configuration in the config file?

Do they act as proposed values or will the be used to create users?

- Can I remove all the user configuration stuff from the configuration file

to just let the user create his user as he likes on the gui?

- Unlike you seem to assume for everyone, I am not going to run the windows

install in full-unattended mode - the user will be able to edit predefined values.

But in this case the windows-own user-creation dialogs are shown.

Do these clash with those of WIHU?

How can I disable the windows-own user-cereation dialogs?

Here the file:

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installiere Applikationen" /f

IF EXIST %systemroot%\system32\atiddc.dll REG ADD %KEY%\010 /VE /D "ATI Control Panel 4.9 with SmartGART" /f
IF EXIST %systemroot%\system32\atiddc.dll REG ADD %KEY%\010 /V 1 /D "%systemdrive%\drivers\radeon_catalyst_4.9\Setup.exe -s -f1 setup.iss" /f
IF EXIST %systemroot%\system32\atiddc.dll REG ADD %KEY%\010 /V 2 /D "%systemdrive%\install\radeon_catalyst_panel_4.9\Setup.exe -s -f1 setup.iss" /f

REG ADD %KEY%\120 /VE /D "Power Toys" /f
REG ADD %KEY%\120 /V 1 /D "%systemdrive%\install\powertoys\CmdHerePowertoySetup.exe /S /v /qn" /f
REG ADD %KEY%\120 /V 2 /D "%systemdrive%\install\powertoys\TweakUiPowertoySetup.exe /S /v /qn" /f

REG ADD %KEY%\120 /VE /D "Adobe Acrobat Reader 6.0.1" /f
REG ADD %KEY%\120 /V 1 /D "\"%systemdrive%\install\adobe\acrobatreader\Adobe Reader 6.0.1 - Deutsch.msi\" /qn" /f

REG ADD %KEY%\130 /VE /D "MSN Messenger 6.2" /f
REG ADD %KEY%\130 /V 1 /D "msiexec /i %systemdrive%\install\msnmessenger\MsnMsgs.msi IAGREE=\"Yes\" ADDEXPLORERTOOLBAR=\"\" SETSEARCHENGINE=\"\" SETHOMEPAGE=\"\" /q" /f

REG ADD %KEY%\140 /VE /D "Winamp 5.0.5" /f
REG ADD %KEY%\140 /V 1 /D "%systemdrive%\install\winamp\winamp.msi INI=\"%systemdrive%\install\winamp\winamp.ini\" /qn" /f

EXIT

I think it would help all of us understand!

Thanx in advance,

Morke

Link to comment
Share on other sites


There is an example ini file included! Just take a look at that.

But I'll describe it shortly (btw. there is a help section on my web page).

Settings are either organized in INI file, per command line switches or in WIHU GUI.

Ini file may contain following predefined sections:

[Environment]

[settings]

[users]

[environment.x] whereby x is an index 0 ... 65535 which correspondences with user.x index.

EACH OTHER SECTION NAME may contain software installation commands. (described later)

First of all, let me say, EACH section is optional, i.e. not required.

1. [Environment] section

This section may contain environment variables which will be _ONLY_ available while WIHU is running. One special thing is, that this environment variables may also reference regsitry values like following:

DefaultProfilesDir = HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory

This will read the above key from registry and saves it in environment variable DefaultProfilesDir which will be accessable later with %DefaultProfilesDir% somewhere.

2. [settings] section

This section may conatin settings as the name implied.

; Write windows size back to ini file after exit

dimension.update=1

; set window size

dimension.width=900

dimension.height=500

; PageHeaderTitle.x and PageHeaderSubTitle.x sets the header title or subtitle of specified page. First page is page 0.

PageHeaderTitle.0=Title0

PageHeaderSubTitle.0=SubTitle0

PageHeaderTitle.1=Title1

PageHeaderSubTitle.1=SubTitle1

; Set computer name to xyz

computer=xyz

; Skip settings dialog

skipsettings=1

Take a look at command line switches (WIHU /?) for detailed description of each of this keyword.

3. [users] section

Here you may create new user accounts or modify existing one. See example install.ini or my web page for more information how to do this.

;Disable Administrator account

user.0=Administrator

status.0=0x002

Group.0=1

password.0=1A6178031B607F041A617C071B6073081A61700B1B60770C1A61740F1B601B60D0

crypted.0=32

4. [environment.x] section

This contains permanent environment variables which will be stored in registry for corresponding user. x is the index specified in [users] section in user.x keyword. In above example there _could_ be a [environment.0] section.

Please note, registry references as in [environment] section are not allowed here!

5. software specific sections. This may contain many keywords. Most important one is command.x and description.x.

[My New Software]
command.0 = myapp.exe
description.0 = My first application

Please don't forget to append valid index. There may no holes in indixes, i.e. following isn't possible:

command.0=...

command.1=...

command.3=...

In this case WIHU will stop execution at command.1.

To organize software items in a tree structure you may append sub indixes like:

command.0.0 = mysubapp.0.exe

description.0.0 = First sub item of "My first application"

command.0.1 = mysubapp.1.exe

description.0.1 = Second sub items of "My first application"

command.0.0.0 = mysubapp.0.0.exe

description.0.0.0 = First sub item of sub item 0.0

selected.0.0.0 = 1

WIHU will show above example as:

[x] My New Software
   [ ] My first application
       [ ] First sub item of "My first application"
           [x] First sub item of sub item 0.0
       [ ] Second sub items of "My first application"

For detailed information about allowed keywords please take a look at example install.ini or at my web page.

Here your example:

[ATI specific things]

command.0 = "%systemdrive%\drivers\radeon_catalyst_4.9\Setup.exe -s -f1 setup.iss"
description.0= ATI Display Driver
file.0.0 = %systemroot%\system32\atiddc.dll?!
selected.0=1
command.1="%systemdrive%\install\radeon_catalyst_panel_4.9\Setup.exe -s -f1 setup.iss"
description.1= Control Panel 4.9 with SmartGART
file.1.0 = %systemroot%\system32\atiddc.dll?!
selected.1=1

[Power Toys]
command.0 = "%systemdrive%\install\powertoys\CmdHerePowertoySetup.exe /S /v /qn"
description.0=<Will never be showed since hidden>
hidden.0=1
selected.0=1
command.1="%systemdrive%\install\powertoys\TweakUiPowertoySetup.exe /S /v /qn"
description.1=<Will never be showed since hidden>
hidden.1=1
selected.1=1

[Adobe Acrobat Reader 6.0.1]
hidden.0=1
command.0="%systemdrive%\install\adobe\acrobatreader\Adobe Reader 6.0.1 - Deutsch.msi" /qn"
description.0=<Will never be showed since hidden>
selected.0=1

[MSN Messenger 6.2]
hidden.0=1
command.0=%systemdrive%\install\msnmessenger\MsnMsgs.msi IAGREE="Yes" ADDEXPLORERTOOLBAR="" SETSEARCHENGINE="" SETHOMEPAGE="" /q"
description.0=<Will never be showed since hidden>
selected.0=1

[Winamp 5.0.5]
hidden.0=1
selected.0=1
command.0="%systemdrive%\install\winamp\winamp.msi INI="%systemdrive%\install\winamp\winamp.ini" /qn"
description.0=<Will never be showed since hidden>

... or you could do (prefered):

[Drivers]

command.0 = "%systemdrive%\drivers\radeon_catalyst_4.9\Setup.exe -s -f1 setup.iss"
description.0= ATI Display Driver & Control Panel 4.9 with SmartGART
file.0.0 = %systemroot%\system32\atiddc.dll?!
selected.0=1

command.0.0="%systemdrive%\install\radeon_catalyst_panel_4.9\Setup.exe -s -f1 setup.iss"
description.0.0= Control Panel 4.9 with SmartGART
selected.0.0 = 1
hidden.0.0 = 1

[Applications]
command.0.0 = "%systemdrive%\install\powertoys\CmdHerePowertoySetup.exe /S /v /qn"
description.0.0 = Power Toys (Helper or whatever)
hidden.0.0 = 1
selected.0.0 = 1
command.0 = "%systemdrive%\install\powertoys\TweakUiPowertoySetup.exe /S /v /qn"
description.0 = Power Toys
selected.0 = 1

command.1 = "%systemdrive%\install\adobe\acrobatreader\Adobe Reader 6.0.1 - Deutsch.msi" /qn"
description.1 = Adobe Acrobat Reader 6.0.1
selected.1 = 1

command.2=%systemdrive%\install\msnmessenger\MsnMsgs.msi IAGREE="Yes" ADDEXPLORERTOOLBAR="" SETSEARCHENGINE="" SETHOMEPAGE="" /q"
description.2 = MSN Messenger 6.2
selected.2 = 1

selected.3 = 1
command.3 = "%systemdrive%\install\winamp\winamp.msi INI="%systemdrive%\install\winamp\winamp.ini" /qn"
description.3 = Winamp 5.0.5

This will unselect this item only if atiddc.dll doesn't exists, otherwise this item will be selected and installed by default. To prevent some one from selecting this item anyway, you could add locked.0=1

Or in case you don't want some one changing any item in [ATI specific things] section you could add top level locked=1 (without indixes)

btw. file.0.0=%systemroot%\system32\atiddc.dll?= would be the inverse meaning of ?!.

Note: There is currently a bug in file existence check implementation. Please download new version 2.1.11.1

Benjamin

Edited by BenjaminKalytta
Link to comment
Share on other sites

Is this because they do not exactly concern WIHU?

How can I disable the windows-own user-cereation dialogs?

I don't know the answer.

Do these clash with those of WIHU?

No, there are no problems using WIHU to modify this account, to add new one and delete exiting one.

What about the ability to do user configuration in the config file?

Each user in [users] section will be created/modified/deleted by WIHU, except you remove this entries within WIHU UI.

Benjamin

Link to comment
Share on other sites

I have tried it out (on an installed system)...

The check ?! and ?= still dont work as it seemes.

It doesnt matter if the file is written in capital letters or not, I assume?

Anyway, when I use ?! the install is always striked out,

and when I use ?= it is always normal.

And it doesnt matter which file I check for or if the file exists or not.

Still seemes to be buggy...

I've used the wihi.exe which is 220kb large and came in wihu.2.1.10.0.zip.

Link to comment
Share on other sites

Thanx.

Now it works.

Btw, the new window is for detailed description as I grasped.

It doesnt, work yet, does it?

If it works, which ini parameter sets the detailed description?

And there is another thing I noticed:

I will install Nero also, and there is the main installation and

the additional German language pack.

It makes sense only to install the second if the first is installed.

Currently I have it like:

command.5.0.0 = %systemdrive%\install\nero\Nero63120DEU.exe /silent /noreboot
description.5.0.0 = Nero Burning ROM 6.3120 Paket für deutsche Sprache
selected.5.0.0  = 1
command.5.0 = %systemdrive%\install\nero\Nero63120.exe /silent /noreboot
description.5.0 = Nero Burning ROM 6.3120 Applikation
selected.5.0  = 1
command.5 = REGEDIT /S %systemdrive%\install\nero\nero6.reg
description.5 = Nero Burning ROM 6.3120
selected.5 = 1

But I am unsure:

Does a greyed out checkbox with a check in itmean it is installed?

The reg import is required for Nero for the installation to work,

but I have not yet managed it to both make it required and hidden.

Also in the way I set it here, as I understand, it is possible to only

import the reg file but not install anything.

Is there a solution to this?

Morke

Link to comment
Share on other sites

Btw, the new window is for detailed description as I grasped.

It doesnt, work yet, does it?

You are right, I doesn't work at this moment because I'm currently not able to fully load rtf data (images, text and other objects)

There will be a new keyword help.x=file.rtf

Does a greyed out checkbox with a check in itmean it is installed?

Yes greyed means it is checked, but some of it's subitems may be (not necessarily) unchecked.

I would do following:

command.4.0.0 = %systemdrive%\install\nero\Nero63120DEU.exe /silent /noreboot
description.4.0.0 = Nero Burning ROM 6.3120 Paket für deutsche Sprache
selected.4.0.0  = 1
hidden.4.0.0 = 1

command.4.0 = REGEDIT /S %systemdrive%\install\nero\nero6.reg
description.4.0 = Nero Burning ROM 6.3120 (Keys & Others)
selected.4.0  = 1
hidden.4.0 = 1

command.4 = %systemdrive%\install\nero\Nero63120.exe /silent /noreboot
description.4 = Nero Burning ROM 6.3120 Applikation (Main Item)
selected.4 = 1

Benjamin

Link to comment
Share on other sites

The way you showed only leaves the user to install the whole thing or not.

But I can live with that as its a german OS and it makes sense to also install

the german language for Nero always.

Secondly the way I see it the registry is imported AFTER installing Nero,

which will not work.

So it should be:

command.4.0.0 = %systemdrive\install\nero\Nero63120DEU.exe /silent /noreboot
description.4.0.0 = Nero Burning ROM 6.3120 Paket für deutsche Sprache
selected.4.0.0  = 1
hidden.4.0.0 = 1

command.4.0 = %systemdrive%\install\nero\Nero63120.exe /silent /noreboot
description.4.0 = Nero Burning ROM 6.3120 Application
selected.4.0  = 1
hidden.4.0 = 1

command.4 = REGEDIT /S %systemdrive%\install\nero\nero6.reg
description.4 = Nero Burning ROM 6.3120
selected.4 = 1

Oh, why do the subsections have to come before?

I've tried it the other way around but it doesnt work then.

And theres another thing I noticed about the version check:

There is a file ctaud2k.sys with version 5.12.1.323 and I wish to

check that it is equal or larger.

But the following code does not have the installation enabled.

command.1 = "%systemdrive%\drivers\005_Audio\eax4drv_audigy2\CtPanel_Silent.exe"
description.1 = Creative Audigy 2 Control Panel
file.1.0 = %systemroot%\system32\drivers\ctaud2k.sys?>5.12.1.322
selected.1 = 1
locked.1 = 1

Also

file.1.0 = %systemroot%\system32\drivers\ctaud2k.sys?>5.12.1.323
file.1.0 = %systemroot%\system32\drivers\ctaud2k.sys?=5.12.1.323
file.comparison.1 = OR

does not enable installation. Only an exact check (?=) without

comparison works in my tests.

Is this a bug?

If not, how do I have to formulate the checks?

Morke

Link to comment
Share on other sites

The way you showed only leaves the user to install the whole thing or not.

But I can live with that as its a german OS and it makes sense to also install

the german language for Nero always.

What was your intention again?

You could just remove hidden.x key or add another subkey in this way:

command.4.0 = %systemdrive%\install\nero\Nero63120.exe /silent /noreboot
description.4.0 = Nero Burning ROM 6.3120 Application
selected.4.0  = 1

command.4.1 = %systemdrive\install\nero\Nero63120DEU.exe /silent /noreboot
description.4.1 = Nero Burning ROM 6.3120 Paket für deutsche Sprache
selected.4.1  = 1

command.4 = REGEDIT /S %systemdrive%\install\nero\nero6.reg
description.4 = Nero Burning ROM 6.3120
selected.4 = 1

Oh, why do the subsections have to come before?

I've tried it the other way around but it doesnt work then.

Ordering is TOTALLY unimportant here, it can have any order!

file.1.0 = %systemroot%\system32\drivers\ctaud2k.sys?>5.12.1.322

Will check if version of current ctaud2k.sys is less/equal than 5.12.1.322. If greater, it will return false (unchekced, striked out) ... or in other words check if

5.12.1.322 is greater than version of ctaud2k.sys. I know that's a bit confusing, but I once introduced it so, would make some trouble if I would change this behaviour now.

file.1.0 = %systemroot%\system32\drivers\ctaud2k.sys?>5.12.1.323

file.1.0 = %systemroot%\system32\drivers\ctaud2k.sys?=5.12.1.323

file.comparison.1 = OR

Since you want compare 2 entries, you have to append correct sub index here. There can't be file.1.0 multiple times!

Please use:

file.1.0 = %systemroot%\system32\drivers\ctaud2k.sys?>5.12.1.323

file.1.1 = %systemroot%\system32\drivers\ctaud2k.sys?=5.12.1.323

file.comparison.1 = OR

Note: key.x.n and file.x.n have an additional index "n"

Benjamin

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