Page 1 of 1 1
Topic Options
#154278 - 2005-12-30 04:57 PM USE Command Questions.
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
I have just few questions on the use command. When I map a drive with the logon script all of my drives show up in My Computer in the following format: sharename on 'servername' (drive letter). Example var_rpt on 'Paragonrpt' (R:). However, one of our drives consistently maps correctly, BUT shows up as 'Network Drive (T:)' in My Computer. Sometimes it will show up correctly in My Computer. Could this be caused by the way I map the drive?

Here's how I map:
Code:
 
;Drive Mappings For Paragon
IF InGroup("WinTermParagon", "ParagonUsers")
USE R: "\\Paragonrpt\var_rpt"
USE T: "\\Paragonrpt\var_test"
USE V: "\\Paragondb\vardata"
IF InGroup("ParagonForms")
SHELL '%comspec% /c "net use z: /delete" 1>nul 2>nul'
USE Z: /delete
USE Y: "\\parntier\PrintForms"
ENDIF
ENDIF



Is that a good way, or should I be mapping persistent? Also, I have noticed that in some examples people delete the drive first, then re-map it. Does it make a difference in the way you map?

Top
#154279 - 2005-12-30 06:26 PM Re: USE Command Questions.
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Just curious...Are you running SymantecAV?
Top
#154280 - 2005-12-30 06:48 PM Re: USE Command Questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
does this behavior only affect the T drive?
and the T drive is a similar share on same server as R: and V: which do not have this effect?
_________________________
!

download KiXnet

Top
#154281 - 2005-12-30 06:56 PM Re: USE Command Questions.
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
No to symantec. We're running Panda.

T seems to be the only drive with this effect.

Top
#154282 - 2005-12-31 12:09 AM Re: USE Command Questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
also, is this on one wksta or multiple?
it looks like windows sees the drive different.

one could try to fix this by deleting the label keys from the registry...
say:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints

Remove the T key and reconnect the drive.

not sure does this help.
what more I think about this, it smells like a server thing.
_________________________
!

download KiXnet

Top
#154283 - 2005-12-31 12:15 AM Re: USE Command Questions.
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
The reason I brought up Symantec is most of my customers have Symantec Corp Ed on their pcs. One of them has been experiencing the same thing you are describing, but it never causes any issues, so we just let it be. However, one of my other customers had a similar problem, except we could not remove the mapped drive, nor could we re-add it. It was like it was deleted, but still existed. Anyway, it turns out it was a bad install of SAV. Once we removed SAV, we were able to remap the drive, and then reinstalled SAV and everything worked properly again.
Top
#154284 - 2005-12-31 02:39 AM Re: USE Command Questions.
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
This issue occurs on multiple workstations. It doesn't really effect anything, I was just wondering why. So, does it have anything to do with my original question? Does it matter how you map a drive? Is one way better than the other? Persistent or Not Persistent? Delete or No delete before the mapping?
Top
#154285 - 2005-12-31 02:48 AM Re: USE Command Questions.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You should delete before you map or else you cannot be sure of what is mapped. No point in mapping persistent if it is mapped on every logon.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#154286 - 2005-12-31 02:58 AM Re: USE Command Questions.
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Agreed. Never did understand why people do persistent mapping when they map during logon with a script.

Either map it once and be done with it and don't do it in your script, or don't persistent map it.

Yes, you should ALWAYS unmap or at least test if it's mapped or not. Maybe a user mapped it in which case your mapping would probably fail.

Top
#154287 - 2005-12-31 03:06 AM Re: USE Command Questions.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Your code is overly optimistic. You don't check if any fail. You sould always use the /persistent switch on delete and why do you both shell out to NET to delete and also delete with the KiX USE command?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#154288 - 2005-12-31 03:45 AM Re: USE Command Questions.
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
I set up the kix delete command, and it didn't seem to delete the Z drive. That's what I shelled to the net use. I thought that I read that kix use can only delete drives it makes. Does 'use z: /delete /persistent' do something special?

If the mapping does fail, what can you do about it during the logon? I can understand un-mapping before you attempt the map. That protects you from the dumb users, but how does catching an @error help? Go check through logs? I think I'm missing something.

Top
#154289 - 2005-12-31 04:04 AM Re: USE Command Questions.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I guess the action would be commensurate with the error. If there is no consequence to the error, then no point in checking.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#154290 - 2005-12-31 04:30 AM Re: USE Command Questions.
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
Does 'use z: /delete /persistent' do something special?
Top
#154291 - 2005-12-31 05:02 AM Re: USE Command Questions.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It will delete the Z: drive. Beware that is you have Win9x machines, deleting the Z: drive in the logon script is not advised.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#154292 - 2005-12-31 05:29 AM Re: USE Command Questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, this is not your script but you got some relic from a previous admin.
k, then I can say my first thoughts...

it's really silly (if not worse) to go messing with Z: drive.
as silly is also using the command line version of use when you are inside kixtart script.
_________________________
!

download KiXnet

Top
#154293 - 2005-12-31 06:41 AM Re: USE Command Questions.
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
Basically Z got moved to Y. They had mapped Z on the PCs from within windows. I did the 'use z: /delete' but it had no effect - the drive wouldn't disconnect. That's why I added in the shell to the dos net use. It's only temporary.

However, I guess a 'use /delete /persistent' is different than just a 'use /delete'.

Top
#154294 - 2005-12-31 06:53 AM Re: USE Command Questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes, persistent connections don't get disconnected without the persistent switch.
_________________________
!

download KiXnet

Top
#154295 - 2005-12-31 06:59 AM Re: USE Command Questions.
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
That seemed like a long way to go to get that answer! Thanks!

I'll try this, and see if the original problem goes away. (My Computer odd name)

Code:
  
;Drive Mappings For Paragon
IF InGroup("WinTermParagon", "ParagonUsers")
USE R: /delete /persistent
USE T: /delete /persistent
USE V: /delete /persistent
USE R: "\\Paragonrpt\var_rpt"
USE T: "\\Paragonrpt\var_test"
USE V: "\\Paragondb\vardata"
IF InGroup("ParagonForms")
USE Z: /delete /persistent
USE Y: /delete /persistent
USE Y: "\\parntier\PrintForms"
ENDIF
ENDIF



Maybe that'll help out.

Top
#154296 - 2005-12-31 04:07 PM Re: USE Command Questions.
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
BTW, there are a couple of MAPDRIVE() UDFs that allow you to apply a custom label to a mapped drive. Also, usrrs can change the label of the mapped drive as well.

Jens
_________________________
There are two types of vessels, submarines and targets.

Top
#154297 - 2005-12-31 04:42 PM Re: USE Command Questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mapdrive or even Label()
_________________________
!

download KiXnet

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 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.091 seconds in which 0.046 seconds were spent on a total of 12 queries. Zlib compression enabled.

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