Nazgul Posted January 7, 2005 Posted January 7, 2005 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 XPCategories: | System Tools | Office | Tools | PowerToys | SortPrograms runningSortPrograms finishedWinheight: 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.47Rendering of boxes finishedApplying checks: defaultTesting 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. SP1Testing 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.47SortInstalling...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?
a06lp Posted January 7, 2005 Posted January 7, 2005 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...
Nazgul Posted January 7, 2005 Author Posted January 7, 2005 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)
r2k02 Posted January 8, 2005 Posted January 8, 2005 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.
Nazgul Posted January 8, 2005 Author Posted January 8, 2005 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?
r2k02 Posted January 8, 2005 Posted January 8, 2005 Hi Nazgul,You're a better programmer than me. Your modifications seem to solve the problems on my computer as well Bedank voor je hulp!
hasi001 Posted January 8, 2005 Posted January 8, 2005 Probs should be fixed in 3.3.3 available for download now.
Nazgul Posted January 8, 2005 Author Posted January 8, 2005 I just tried version 3.3.3 and it fixed my problems.Thanks hasi001.
poppyq Posted January 8, 2005 Posted January 8, 2005 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).
hasi001 Posted January 9, 2005 Posted January 9, 2005 No - there isn't.But you should know, which version you downloaded.
a06lp Posted January 9, 2005 Posted January 9, 2005 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now