Jump to content

Explanation of relative paths and workdir function


Senser

Recommended Posts

I've got several problems using and installing software with WIHU. Most applications install without any problem btw.

First question, I'm trying to install a few applications, most of them work without a problem, but with a few, WIHU gives an error.

For example:

description.2 = Sun Java VM 1.4.2
command.2 = Apps\SunJavaRE\j2re-1_4_2_05-windows-i586-p.exe /s /v"/qn ADDLOCAL=jrecore IEXPLORER=1"
selected.2 = 1

description.3 = .NET Framework v1.1 Patch
command.3 = Apps\MSNetFrameWork11\NDP1.1sp1-KB867460-X86.exe /qb
selected.3 = 1

Both the Sun Java VM and the .NET Framework give errors. When I try to install them a second time, the .NET Framework patch installs without errors. :wacko:

Another strange example, Acrobat Reader installation is not working in WIHU:

description.1 = Adobe Reader 6
command.1 = Apps\AdobeReader6\AdbeRdr60_nld_full.exe -p"-s /v\"/qn\""
selected.1 = 1

I'm getting the error 'BAD COMMAND LINE' (error code -1). In the WIHU logfile: 'Status: 1, "Adobe Reader 6" terminated with code -1. Reason: Het opgegeven netwerkpad is door geen enkele netwerkleverancier geaccepteerd.

' (dutch language).

However this syntax seems to work just fine when using a single batchfile to install all applications. I've tried using the workdir.x function to specify the path to the AdbeRdr60_nld_full.exe application, this doesn't solve it. I also tried using '%systempath%\Install\Apps\AdobeReader6' as path, but no luck either.

Can someone explain me how this whole relative path function works and when to use the workdir.x function?

I don't seem to understand when to and when not to use this. Of course i've read the manual, searched in this forum, read a few threads etc. ;)

Last question, I'm trying to hide some commands in the WIHU GUI from appearing. I.e. :

description.1 = Lavasoft Ad-Aware Personal SE 1.03
command.1 = Apps\AdAware\aawsepersonal.exe /s
selected.1 = 1

hidden.1.0=1
command.1.0 = taskkill /F /IM Ad-Aware.exe
selected.1.0 = 1

hidden.1.1=1
description.1.1 = Killing HH.EXE process
command.1.1 = taskkill /F /IM hh.exe
selected.1.1 = 1

However, the GUI still shows information about executing these commands ('taskkill ad-aware.exe' and 'taskkill hh.exe'). Is there something wrong with my syntax?

Here is a piece of log to show what I mean:

Status: 2, "Lavasoft Ad-Aware Personal SE 1.03" was executed.
Status: 2, "<missing description>" was executed.
Status: 2, "Killing HH.EXE process" was executed.

I've tried several different WIHU versions, including latest stable release and the development release.

Thanks! :blushing:

Link to comment
Share on other sites


Hi, first let me answer about this:

However, the GUI still shows information about executing these commands ('taskkill ad-aware.exe' and 'taskkill hh.exe'). Is there something wrong with my syntax?

Here is a piece of log to show what I mean

Hiding something doesn't mean not executing it, isn't it? it will only hide the command in software selection list.

Last time I'll explain how workdir.x work

Example:

command.x = apps\myapp.exe myscript.iss

workdir.x= %inidir%\apps

This will NOT set relative path for apps\myapp.exe, it will even not used by WIHU in any way, expect it will set the current directory for myapp.exe process only. So each relative path that myapp.exe encounter will be relative to "workdir.x".

So myapp.exe would search in %inidir%\apps for myscript.iss. Thats all ;)

I'm getting the error 'BAD COMMAND LINE' (error code -1). In the WIHU logfile: 'Status: 1, "Adobe Reader 6" terminated with code -1. Reason: Het opgegeven netwerkpad is door geen enkele netwerkleverancier geaccepteerd.

No that's no errocode, this only says that Adobe Acrobat Reader terminates with code -1 ... interpretation of this code is not always possible because only return code of microsoft installer (msi) based scripts can be interpreted as error code.

So just ignore this message. (btw. a warning symbol was showed there, no error symbol. Status 0=error, 1=warning, 2=info)

Both the Sun Java VM and the .NET Framework give errors.
Which error codes, or messages?
When I try to install them a second time, the .NET Framework patch installs without errors. 

It could mean that previous installation was successfull.

Btw. I, using exactly the same command in my setup cd script:

command.0=Anwendungen\SunJava\j2re-1_4_2_04-windows-i586-p.exe /s /v"/qn ADDLOCAL=jrecore IEXPLORER=1"
description.0=Java Virtual Machine 1.4.2 von Sun Systems
selected.0=1

There was never a problem with this script.

So how do you start WIHU. is apps\ path relative to wihu.exe? If yes it should be or you could use something like %curdir%\apps\...

Benjamin

Edited by BenjaminKalytta
Link to comment
Share on other sites

Bejamin,

Thanks for your reply. The workdir.x function is now completely clear. I thought I did not understand it completely and that this caused the 'problems' I have with WIHU.

About the hidden.x function, wouldn't it be more correct to not show the status of the hidden.x entries in the status window at all? But only when you use some /verbose parameter to start WIHU for instance.. just a thought.. :)

I start WIHU from the GuiRunOnce section in WINNT.SIF by the following batchfile:

@echo off
start %systemdrive%\Install\wihu.exe /log=%temp%\wihu.log /skipsettings /skiprestart /ini=%systemdrive%\install\unattended_new.ini

About the warning message when installing Adobe Reader, the Reader isn't installed at all. So ignoring this doesn't make me happy.. :P

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