Solved

Mapping drives in windows server 2003.

Posted on 2004-08-22
9
211 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copy an entire Active Directory Domain to a dev environment 4 204
AD Replications issues 12 120
Connecting two servers 30 90
Migration of AD user accounts from Server 2003 to 2012R2 5 117
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 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