Seite 1 von 1

[user error; not a bug] Patching ini file with local running winst

Verfasst: 07 Jan 2016, 00:23
von SisterOfMercy
I'm building a new package, and because I want to run a preliminary test I'm installing it with a local opsi-winst script.

Code: Alles auswählen

DefVar $InstallDir32$
Set $InstallDir32$      = "%ProgramFiles32Dir%\Mitsubishi ASA"
Patches_europe "$InstallDir32$\ASAMAIN.ini"
One would expect a file in C:\Program Files (x86)\Mitsubishi ASA\, but no:

Code: Alles auswählen

Patching: c:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\$InstallDir32$\ASAMAIN.ini
Somehow I do not think this is supposed to happen.

Re: Patching ini file with local running winst

Verfasst: 07 Jan 2016, 18:26
von d.oertel
Hi,

you are in a primary section and $installdir32 is a variable and not constant.
You may use variables as placeholders (like constants) only in secondary sections.
see:
http://download.uib.de/opsi_stable/doc/ ... n-sections
Try:

Code: Alles auswählen

setloglevel=7
DefVar $InstallDir32$
Set $InstallDir32$      = "%ProgramFiles32Dir%\Mitsubishi ASA"
Patches_europe $InstallDir32$+"\ASAMAIN.ini"
cheers
d.oertel

Re: Patching ini file with local running winst

Verfasst: 07 Jan 2016, 22:10
von SisterOfMercy
d.oertel hat geschrieben:

Code: Alles auswählen

Patches_europe $InstallDir32$+"\ASAMAIN.ini"
:cry: :oops: Argh, what a stupid mistake :-(
Maybe I shouldn't mess with opsiscripts when it's obviously too late in the evening :)