Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Only Map Drive When It's Not Already Mapped

Keywords:   detect map drive mapped drive

Question:

I want to connect a drive only if that drive is not connected. It's for a NT mapping.

Answer:


AddExtender('WWW9534I.DLL')

sDrive = 'S:' ; the drive
sShare = '\\server\Sharename'; its sharename
sUNC = StrCat(sServer,'\',sShare);Uniform Naming Convention

If w95GetDrive(sUNC) != sDrive Then
	w95AddDrive@default,@default,sUNC,sDrive,@True)
endif

Article ID:   W14116
Filename:   Only Map Drive when It's Not.txt