Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Get network drive property


5 replies to this topic

Arnaud

Arnaud
  • Members
  • 28 posts

Posted 04 October 2001 - 10:07

What i would like to do is to get the real letter of a network drive.

(I already try to ask this question to the windows NT microsoft forum)

I want to resolve the name of the network drive that was mapped to a computer.

The mapped drive is, for example, mapped as "U:" on the local machine.
On the network machine from where were mapped the drive the name is "E:"

The problem is that this drive as a label : "MoreData".
Which appear on the network machine and on the local machine.

To be more clear :
The disk on the distant machine is : "E:" label MoreData
The disk on the local machine is: "U:" label MoreData


So is there a solution (a function that do the trick would be great :)) as a reading from registry, or so ?

So that i can assign this letter in some script in the end of the installation.


If something seems not clear in this message just ask some precision :)


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 04 October 2001 - 19:38

I guess your setuo is running on the loocal machine, where the drive is mapped as U.
Now what should the function you are looking for return (desired result):
U:
E:
MoreData
\\ServerName\\ShareName (a UNC path)

Arnaud

Arnaud
  • Members
  • 28 posts

Posted 05 October 2001 - 06:51

That's it

U: and E: are enough but if i can get all these result it would be great.

Thx


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 05 October 2001 - 07:24

U: shouldn't be a problem, I guess you already have this (or how do you specify the drive?)
The UNC path can be resolved from U: using the script under IS5/6 samples -> Network -> Convert Path to UNC.
I don't think you can get E: using only the client. You would need a program running on the server that would resolve the UNC path to a local drive letter, and send the result to the client. BTW I don't see what use the E: would be for the client.
MoreData can be retrieved by calling GetSystemInfo with VOLUMELABEL

Arnaud

Arnaud
  • Members
  • 28 posts

Posted 05 October 2001 - 09:45

Yes for U: it's OK.
I take it from the InstallChangeFolder dialog

In fact as the client, i take E: and i update some oracle script that require this path .
So when i run it on the client (local) it resolve the name by reference to the server (distant).
(in fact when executing theses scripts, they acces to admnistrator function that resolve the name like this.....   that's not very simple to use :))
I will look into the example you pointed me out and give it a try....

(maybe accessing to distant registry... doesn't know if it's possible....)

thx



Arnaud

Arnaud
  • Members
  • 28 posts

Posted 05 October 2001 - 14:09

I Tried it, but with no success.

still searching....