Solved

Mapping drives in windows server 2003.

Posted on 2004-08-22
9
210 Views
Last Modified: 2010-04-19
I know there is a lot of answers for mapping drives in expert-exchange. What I want to do is mapping drives only when logging on the client-computers, not when logging on the server.

Is that possible ??


Regards, Zoodiaq
0
Comment
Question by:Zoodiaq
  • 4
  • 3
9 Comments
 
LVL 16

Expert Comment

by:JamesDS
ID: 11867509
Zoodiaq
You could use a logon script that checks for the servername environment variable before executing:

if %COMPUTERNAME% = server goto end

net use * \\server\resource

:end

Cheers

JamesDS
0
 

Author Comment

by:Zoodiaq
ID: 11890568
I can't get it to work in a .bat file ?!?
0
 
LVL 16

Expert Comment

by:JamesDS
ID: 11890594
Zoodiaq
Post your BAT file and the hostname of your server here

Cheers

JamesDS
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Zoodiaq
ID: 11960746
Heres my bat,


\\SERVER\Clients\Setup\setup.exe /s STOHNSERVER

net use f: /Delete
net use g: /Delete
net use h: /Delete

net use f: \\server\programs
net use g: \\server\enkelt
net use h: \\server\faelles

net time /set /y
0
 

Author Comment

by:Zoodiaq
ID: 11960749
STOHNSERVER should have been server.
0
 
LVL 16

Accepted Solution

by:
JamesDS earned 250 total points
ID: 11960788
Try this (note double = sign):


\\SERVER\Clients\Setup\setup.exe /s STOHNSERVER

if %COMPUTERNAME% == yourserver goto end

net use f: /Delete
net use g: /Delete
net use h: /Delete

net use f: \\server\programs
net use g: \\server\enkelt
net use h: \\server\faelles

:end

net time /set /y

Cheers

JamesDS


0
 

Author Comment

by:Zoodiaq
ID: 11960803
I'll try, thx.


Zoodiaq
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question