?
Solved

create a script

Posted on 2006-06-07
7
Medium Priority
?
249 Views
Last Modified: 2012-05-05
Whats the syntax used to create a simple script that creates  the following

\\computername\share$\%username%
0
Comment
Question by:cogit
7 Comments
 
LVL 23

Expert Comment

by:TheCleaner
ID: 16856020
are you wanting to create that user's folder or what?
0
 
LVL 2

Expert Comment

by:krais99
ID: 16856256
mkdir \\computername\share$\%username%

That will create a folder under the network directory share$ with the user's name for the folder name.

Or if you're trying to map a network drive it would be:

net use h: \\computername\share$\%username%

Hope this helps.

Todd
0
 
LVL 23

Expert Comment

by:TheCleaner
ID: 16856294
Todd's answer is correct if you are talking about creating a simple folder based on the username of the currently logged on user (assuming that user has rights to create a folder on that share).

I'm still curious what you are trying to accomplish.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:cogit
ID: 16857561
Because I have 500 users in AD and instead of using the the profile tab for creating home folder path, I would use a .bat to the OU where the users reside.
0
 
LVL 51

Expert Comment

by:Netman66
ID: 16858354
All 500 Users can be changed/updated at one time.  Simple select ALL the users, then right-click them and select Properties.  All of the properties that are common to User accounts will be available to change - profile and home drive should be included here.

Simply add your line:  \\servername\share$\%username%
0
 
LVL 23

Accepted Solution

by:
TheCleaner earned 2000 total points
ID: 16861144
Yep, just as AOD has said...

Otherwise like Todd said, you can do:

@echo off
Net Use H: /del
Net Use H: \\server\users\%username% /persistent:no


Save that as the batch file for the login script.

That would make sure that the H drive is deleted if someone has mapped it to something else, then it maps the drive again.
0
 
LVL 23

Expert Comment

by:TheCleaner
ID: 16863619
Thanks for the points but....technically Todd answered it first, and AOD gave you a solution as well, so maybe a points split is in order?  Up to the author of course, but I don't feel right just adding to another answer.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

850 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