AlBundy33 Posted November 28, 2008 Share Posted November 28, 2008 (edited) In core.js defaultWPI() you get the ROOT with // %root% root=fso.GetParentFolderName(wpipath); if (root.indexOf(":")==1) root=root.substr(0,2);But ROOT should be used to get the WPI-parentfolder.My folder-structure looks like thisDrive:\any\directory - WPI (only with contents from the download-package) - Tools (my additional Tools) - Applications - Common - Multimedia - Microsoft - ...And my commands look like this:%ROOT%\Applications\Multimedia\...But with the Bug above my commands does not work. :-(Only withroot=fso.GetParentFolderName(wpipath);all works fine.Al Edited November 28, 2008 by AlBundy33 Link to comment Share on other sites More sharing options...
mritter Posted November 28, 2008 Share Posted November 28, 2008 You are correct. The person that originally brought it to my attention (number of backslashes needed), and myself, have WPI only 1 folder deep, so the code for us is correct. Change it to this: // %root% root=fso.GetParentFolderName(wpipath); if (root.substr(root.length-1,1)=="\\") root=root.substr(0,root.length-1);Will be updated in dowload package, as well. Link to comment Share on other sites More sharing options...
AlBundy33 Posted November 28, 2008 Author Share Posted November 28, 2008 Thanks - this works for me.Btw: How do you debug your code?To find out what was wrong I used a lot of alerts. :-/Al Link to comment Share on other sites More sharing options...
mritter Posted November 29, 2008 Share Posted November 29, 2008 The more I thought about, the more I remembered why I did it the original way.To me, root means the very beginning, as in C: or D:, no matter how deeply buried WPI is.Parent would mean one folder up from the starting place.Lawrenca came up with the original code, and like me, we are just one folder deep, so it worked for us. That is just how we envisioned a "standard" dvd to be laid out:D:---I386---Install------Tools------Utilities------etc.---WPI------Install (could be here also)Not like this:D:---I386------Software---------WPI---------Apps---------UtilitiiesBut, too each his own. Nothing is written in stone. Link to comment Share on other sites More sharing options...
gbmacman Posted December 4, 2008 Share Posted December 4, 2008 This is also applicable when running from a network share. I also think of root as C:\, Y:\. I would prefer the variable be named WPIROOT to eliminate any confusion. I like that you grouped it in 7.2. Link to comment Share on other sites More sharing options...
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