Jump to content

Recommended Posts

Posted

I'm having some issues using Conditions.

I've added 2 programs through Config which have the following conditions:

1: FileExists("%cdrom%\Installers\Microsoft .Net Framework 1.1 Incl SP1\netfx.msi") && FileExists("%cdrom%\Installers\Microsoft .Net Framework 1.1 Incl SP1\NDP1.1sp1-KB867460-X86.exe")

2: FileExists("%cdrom%\Installers\Daemon Tools 3.47\Daemon Tools 3.47.msi") && !FileExists("%programfiles%\D-Tools\Daemon.exe")

Because all 4 files exist, I expect the first condition to succeed and the second to fail. This is confirmed for me when the Framework checkbox is rendered and the Daemon Tools one isn't.

But when I press install both conditions fail, as can be seen in the debug output below.

DEBUG:
Working on Windows XP
Categories: | System Tools | Office | Tools | PowerToys |
SortPrograms running
SortPrograms finished
Winheight: 768 - Computed 3 columns - Using max. 3 columns with a column-width of 33%
Dependencies: |
Rendering of boxes started
 Found CDROM as folder C:\
 Condition failed: FileExists("C:\\Installers\\Daemon Tools 3.47\\Daemon Tools 3.47.msi") && !FileExists("C:\\Program Files\\D-Tools\\Daemon.exe") -- not rendering Daemon Tools 3.47
Rendering of boxes finished
Applying checks: default
Testing condition: FileExists("Írom%\Installers\Microsoft .Net Framework 1.1 Incl SP1\netfx.msi") && FileExists("Írom%\Installers\Microsoft .Net Framework 1.1 Incl SP1\NDP1.1sp1-KB867460-X86.exe")
Condition failed -- skipping .Net Framework 1.1 Incl. SP1
Testing condition: FileExists("Írom%\Installers\Daemon Tools 3.47\Daemon Tools 3.47.msi") && !FileExists("%programfiles%\D-Tools\Daemon.exe")
Condition failed -- skipping Daemon Tools 3.47
Sort
Installing...

I did notice that the debug window shows Írom% where I would be expecting %cdrom%, but I can't figure out what's causing it, or if it's even relevant.

Could somebody tell me what I'm doing wrong here?


Posted

strange.

someone else had this "Írom" problem: here.

I wonder if the cases are somehow related? both are discussing cond[pn].

I don't use cond, so I'm not much help here. maybe hasi knows what's going on...

Posted

That post is indeed exactly like my problem.

I also get that JavaScript Error Report when exiting after debugging. (Forgot to mention that in the first post)

Posted

I reported the same problem and a place where the fix should be implemented here (2nd post from the bottom).

We only have to wait for hasi001 as it seems he's having a real live now :) I someone else is capable of looking at javascript, please do. This seems to be my last problem before I can burn and do some real installations instead of testing in VMware.

Posted

After reading your post in the other topic I decided to take a look at the pieces of code you mentioned in boxes.js and generate.js. I got everything to work by modifying the following pieces of code in generate.js.

if(!eval(replpath(unescape(cond[i])).replace(/\\/g, "\\\\"))) {

into

var c = unescape(replpath(cond[i][0]).replace(/\\/g, "\\\\"));
if(!eval(c)) {

if(!eval(replpath(unescape(programs[i].cond)).replace(/\\/g, "\\\\"))) {

into

var c = unescape(replpath(programs[i].cond + "").replace(/\\/g, "\\\\"));
if(!eval(c)) {

The debug window still shows those weird "Írom" things (which are caused by the unescape function by the way) but everything now works as it should.

I've also made a small workaround for the JavaScript report I was getting on exit. This code has to be changed at line 16 of generate.js.

WshShell.regDelete(KeyBase);

into

try {
   WshShell.regDelete(KeyBase);
} catch (b) {
   debug("Problem on deleting RegKey '" + KeyBase + "': " + b.message,1);
}

Maybe somebody else can test this as well?

And if its good enough maybe hasi001 would be kind enough to put it in the official version?

Posted

Hi Nazgul,

You're a better programmer than me. Your modifications seem to solve the problems on my computer as well :thumbup

Bedank voor je hulp!

Posted

Is there a file somewhere in the WPI files that says what version you have? I can't seem to find it (maybe I'm blind).

Posted

i just include a file called 'WPI Version 3.3.2 (2004-01-06)' (for example) in my WPI folder. I make the file as soon as I extract it, so there is no confusion.

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