Solved

Mapping drives in windows server 2003.

Posted on 2004-08-22
9
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 

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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

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…
The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 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