Jump to content

DiscPath


Recommended Posts

Is anyone still using the DiscPath='root' option? I feel it pretty has been eliminated and am on the verge of removing all code for it.

If someone still uses it, post here about what and how you are using it for.

Link to comment
Share on other sites


Hmmm, everyone is trying to guess what that variable is ...

if (DiscPath == 'root') TempSource = TempSource.substr(0,3) + u[1];
// return the drive letter of the CD/DVD drive. eg. D:\ | E:\ | F:\ etc.

So this should clarify what it is ...

But, to stay ontopic, I ain't using it yet. I don't understand why you would want to remove such a nice feature...

I'm really considering using it my next UA cd.

Edited by sadicq
Link to comment
Share on other sites

I myself have never used it. It does the same thing as %CDROM%, but it looks like not as reliable. To me it looks like it would only be reliable from a UACD launch, not from the desktop because it looks at from what drive Windows was installed from. If it was installed from a network, it would be wrong (per se). BUT the code that it was in was poorly written and actually never worked like it should.

In the path() function, the very first if (...) check fails EVERY time so the code never even got to the check for DiscPath. So unless someone fixed it on their own, no one could have been using it.

Dje wrote an update for it, and I updated some other code, to streamline and expand the variables. All system Env Var's are now available.

Link to comment
Share on other sites

I understand that %CDROM% is generated by certain files being found, ie wpi.ico, winsp51, etc, etc (can't remember the others)

if %CDROM% outputs the same as %DISCPATH% then I don't see the point in having it, especially if the code isn't reliable.

Does %WPIPATH% work if run from Physical C: Drive, CDROM D: or E:, from mapped network drives and UNC Paths?

Link to comment
Share on other sites

wpipath is derived from the location of the wpi.hta file. JavaScript sees it as: document.location. So technically, it should work no matter what. As long as the relative paths, "./WPIScripts/main.js" and full paths wpipath+"WPIScipts\main.js" are honored as-is, then no problem. Have not tried UNC.

I can't say for all network shares, but I just did a simple test: from a second computer browsed to where WPI is on my main computer. Launched it. It could not find the themes. That then causes an error. Of course, that is just a simple file-sharing set up.

Link to comment
Share on other sites

I'm running WPI from a network drive (both WPI and the progs are on the share) since ages. This at least works.

For using UNC paths without using NET USE, you may want to use a WPI.cmd with the trick described by AlBundy33 in this post.

I've tested it a bit and it seems that with it, you don't even need to have full paths in your commands (cmd1, etc.)!!!

The only full path of the whole thing would be in the PUSHD command. Very convenient for buidling an installation that can be run from everywhere.

I'll do more testing and update the related thread when I will be done.

Edited by Djé
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...