Solved

Mapping drives in windows server 2003.

Posted on 2004-08-22
9
206 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
Comment Utility
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
Comment Utility
I can't get it to work in a .bat file ?!?
0
 
LVL 16

Expert Comment

by:JamesDS
Comment Utility
Zoodiaq
Post your BAT file and the hostname of your server here

Cheers

JamesDS
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:Zoodiaq
Comment Utility
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
Comment Utility
STOHNSERVER should have been server.
0
 
LVL 16

Accepted Solution

by:
JamesDS earned 250 total points
Comment Utility
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
Comment Utility
I'll try, thx.


Zoodiaq
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
Learn about cloud computing and its benefits for small business owners.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now