Page 1 of 1 1
Topic Options
#176475 - 2007-05-25 09:54 AM Mapped Shares without Sharename
PeckMan Offline
Fresh Scripter

Registered: 2007-05-18
Posts: 8
Loc: Austria
Hello,

I need again your help.
I've an annoying problem with my kix script.

We're mapping our users network drives (for example the HR Team) like this:

; Drives Human Resources Group
If INGROUP("G-AT-VIE-HUMAN-RESOURCES")
use N: "\\AT-VIENNA-FS03\users\craabe"
use O: "\\AT-VIENNA-FS03\HR"
use W: "\\AT-VIENNA-FS03\users\photoshop"
endif

It works fine but sometimes the mapped drives don't have names.
For more explanation please look at my attached screenshot.
I don't really know why this happens.
When I disconnect all mapped drives and run the script again everything works fine and all the shares have names.

Thank in advance for your help.


Attachments
37-networkshares.JPG
Description:




Edited by PeckMan (2007-05-25 09:55 AM)

Top
#176476 - 2007-05-25 10:02 AM Re: Mapped Shares without Sharename [Re: PeckMan]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
We build in a safety part because users can delete and remap drives. At logon we first delete all drives that we want our user to have.
Not the prettiest way but this way you will prevent user from having the wrong drives mapped on there system. In our case deleting the drives ads less then one second to the login script this is acceptable for us.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176478 - 2007-05-25 10:08 AM Re: Mapped Shares without Sharename [Re: PeckMan]
PeckMan Offline
Fresh Scripter

Registered: 2007-05-18
Posts: 8
Loc: Austria
Hello Mart,

So this is a normal issue?
I'm now wondering a little bit but if there is no other solution, we need to do the mapping in the same way as you.

Markus

Top
#176481 - 2007-05-25 10:17 AM Re: Mapped Shares without Sharename [Re: PeckMan]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Drve names are remembered and stored somewhere in the registry, they only get names if they are manually labelled once. However you could script the mapped drives to be named:
 Code:
Function DriveName($Drive,$Name)
  Dim $Shell
  $Shell = CreateObject("Shell.Application")
  $Shell.NameSpace($Drive).Self.Name = $Name
EndFunction

DriveName("W:","Everyone Disk")

Top
#176482 - 2007-05-25 10:17 AM Re: Mapped Shares without Sharename [Re: PeckMan]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
No it's not normal but I seriously doubt if it is a kix issue. I'd put my money on a workstation issue.
Does this happen on all workstations or just one some of them? Does it always happen to the same users or to random users?

Deleting the drives and then mapping them to the share they should point to would be a workaround and it ensures you that your users will have the proper drives mapped.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176483 - 2007-05-25 10:20 AM Re: Mapped Shares without Sharename [Re: Arend_]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Quote:

....
they only get names if they are manually labelled once
....


Not completely true imho.

A mapped drive always gets a name like "pdrive on server01" where pdrive is the name of the share.
Your example sets a user friendly name to the drive.


Edited by Mart (2007-05-25 10:20 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176485 - 2007-05-25 10:38 AM Re: Mapped Shares without Sharename [Re: Mart]
PeckMan Offline
Fresh Scripter

Registered: 2007-05-18
Posts: 8
Loc: Austria
 Originally Posted By: Mart
...
Does this happen on all workstations or just one some of them? Does it always happen to the same users or to random users?
...

It happens on all workstations and users but not every day.
So I though this must be a kix issue.

@apronk
Thx for the code.
Where I need to put this code?
After every 'use' command?


Edited by PeckMan (2007-05-25 10:38 AM)

Top
#176535 - 2007-05-28 11:23 PM Re: Mapped Shares without Sharename [Re: PeckMan]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: PeckMan

It happens on all workstations and users but not every day.
So I though this must be a kix issue.


I still don't think it's a kix issue. What happens if you put a clean install (not a previously made image) on a workstation?

 Quote:

@apronk
Thx for the code.
Where I need to put this code?
After every 'use' command?


Yes.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176537 - 2007-05-29 08:43 AM Re: Mapped Shares without Sharename [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
 Originally Posted By: Mart
 Quote:

....
they only get names if they are manually labelled once
....


Not completely true imho.

A mapped drive always gets a name like "pdrive on server01" where pdrive is the name of the share.
Your example sets a user friendly name to the drive.


Exactly, "pdrive on server01" you ALWAYS get that.

PeckMan: yeah basically after each Use command, although on slower networks I usually put that at the end of the loginscript.

Top
#176558 - 2007-05-29 05:12 PM Re: Mapped Shares without Sharename [Re: Arend_]
PeckMan Offline
Fresh Scripter

Registered: 2007-05-18
Posts: 8
Loc: Austria
Thank you very much.
I'll check this to see how it works.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.073 seconds in which 0.034 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org