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
Solved

How to create login scripts that create network paths?

Posted on 2008-10-03
7
573 Views
Last Modified: 2012-06-21
I would like to use an application that will allow me to create login scripts.  The scripts should allow a user to authenticat to the small business server 2003 AD, and create network paths to the folders that the user has rights to (folders on the server that are shared).

Thanks!
0
Comment
Question by:compinfo
7 Comments
 
LVL 12

Expert Comment

by:bhnmi
ID: 22637478
You can write a batch script to map the drives using the net use commands.

net use (Drive letter you would like to use): \\servername\sharename /persistent:yes

0
 
LVL 8

Expert Comment

by:jtdebeer
ID: 22637500
Try using the following script and name as file.vbs

Then use Group Policy to run as a user logon script.
The script will check to see if the network name is already in use or not.
Set your access on the folder level

Hope this helps.
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
 
 
Dim fso
   Set fso = CreateObject("Scripting.FileSystemObject")
 
 
If fso.DriveExists("G:") Then
   Else
      WshNetwork.MapNetworkDrive "G:", "\\MyServer\data"
   End If
 
 
If fso.DriveExists("O:") Then
   Else
      WshNetwork.MapNetworkDrive "O:", "\\MyServer\AnyFolder"
   End If

Open in new window

0
 
LVL 3

Expert Comment

by:JJLost
ID: 22637508
Sounds like your looking to add something like this to a logon script, be it AD or local:

Net use DriveLetter: \\somecomputer\Somefolder

Sorta like:

Net Use U: \\fileZerver\users\john

If you have more variables such as username/password you need to pass in order to map take a look at the following site which outlines the Net use command
http://www.cezeo.com/tips-and-tricks/net-use-command/

Hope this helps!
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:compinfo
ID: 22637705
so, does each user use the one script?  if so, where do I put the script and how do I tell the computer to use it?
0
 
LVL 3

Expert Comment

by:JJLost
ID: 22637765
With Active directory Just goto  
Active directory Users & computers >
click on your Users Properties >
Click on the profile Tab >
Assign a logon script if not already assigned

Edit the login Script @  C:\WINDOWS\SYSVOL\domain\scripts

for instance, login.bat is the logon script
edit the file and include the following line
Net Use U: \\fileZerver\users\

now everyone who is on the domain will Map as there U: drive  \\filezerver\users accessible through each users 'my computer'
0
 
LVL 3

Expert Comment

by:JJLost
ID: 22637791
"the scripts should allow a user to authenticat to the small business server 2003 AD"

All of your workstations are joined to the domain correct?
0
 
LVL 74

Accepted Solution

by:
Jeffrey Kane - TechSoEasy earned 500 total points
ID: 22646409
Please be aware that there is already a default login script that is used by SBS.  You should only modify that script if you are going to do this.  See http://sbsurl.com/login for details.

However, I wonder why you are trying to map specific drives for each user.  Are you aware that you can just run the My Documents Folder Redirection Wizard to redirect all user's My Documents folders to the server?  Then, rather than using mapped drives which tend to slow down your workstations, you might want to consider using SharePoint Document Libraries in your http://companyweb site.

Jeff
TechSoEasy
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Suggested Solutions

Introduction At 19:33 (UST) on Tuesday 21st September the long awaited email arrived with the subject title of “ANNOUNCING THE AVAILABILITY OF WINDOWS SBS 7 PREVIEW”.  It was time to drop whatever I was doing and dedicate as much bandwidth as possi…
I work for a company that primarily works with small businesses as their outsourced IT vendor. As such the majority of these customers utilize some version of Small Business Server. Due to the economics of running a small business, many of these cus…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 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