Jump to content

How to map user/application drives Unattended


Recommended Posts

:hello: everyone!!

I'm getting ready to redo my Unattended files and was wondering how to go about setting up mapped drives with letters for the users in our workgroup. I use the useraccounts.cmd for adding users, but how can I get the drives that they have permissions for to get mapped during the install and stay connected. I searched the board but couldn't find anything on this topic.

I know about this

[Commands]
".\net use s: \\server\share /user:Domainname\Username password /persistent:no"

But how would I map each users drive with letter and also have the applications from the application drive install. Example on the applications: Application drive=H MS Office is on H: with an administrative share. Install and still leave H: as the application drive. These drives would need to reconnect each time the user logs in.

Thanks

jd

Edited by 03GrandAmGT
Link to comment
Share on other sites


Use this guide and create a line in your command lines file.

http://support.microsoft.com/default.aspx?...kb;en-us;308582

OK the problem I see with this though is I need to map certain drives with certain users.

Here's how I think it should be, pease correct me if I'm wrong.

User.cmd

net user user1 123456 /add
net localgroup users user1 /add
net accounts /maxpwage:unlimited
REGEDIT /S autologon.reg
EXIT

net user user2 123456 /add
net localgroup users user2 /add
net accounts /maxpwage:unlimited
REGEDIT /S autologon.reg
EXIT

net user user3 123456 /add
net localgroup users user3 /add
net accounts /maxpwage:unlimited
REGEDIT /S autologon.reg
EXIT

Mapdrive.cmd

NET USE H \\computername\sharename\applications /user:workgroup\user1 123456

NET USE H \\computername\sharename\applications /user:workgroup\user2 123456

NET USE H \\computername\sharename\applications /user:workgroup\user3 123456

NET USE J \\computername\sharename\user1 /user:workgroup\user1 123456

NET USE J \\computername\sharename\user2 /user:workgroup\user2 123456

NET USE J \\computername\sharename\user3 /user:workgroup\user3 123456

The H drive will have the applications on it Office, Adobe,etc. The J drive is for each users personal

folder which the other users can't see. If there is something I'am missing please inform.

Thanks

jd

Link to comment
Share on other sites

* What's in your 'autologon.reg' so that you have to import it for each user?

REGEDIT /S autologon.reg

* NET ACCOUNTS affects all users (type net help accounts for more infos) so for sure, this one doesn't need the repetition of the command:

net accounts /maxpwage:unlimited

* The /user: in NET USE is a user on the server, not on the workstation you're setting up accounts on. So again, no need to repeat the commands. Just have one line for each drive, using a user VALID ON THE SERVER. And don't forget the colon ( : ) after the drive letter.

OK, more complicated now: you want to map to different shares for different users. So just use the environment variable %USERNAME%:

NET USE H: \\computername\applications /user:workgroup\%USERNAME% 123456
NET USE J: \\computername\%USERNAME% /user:workgroup\%USERNAME% 123456

- The above syntax is only valid if you have shares named 'applications', 'user1', etc. on the server.

If what you have on 'computername' is just one share 'sharename' and folders in it, the syntax you used ('\\computername\sharename\applications') may not work. AFAIK, NET USE just map a drive letter to a shared resource, not to content in it.

In that case you may want to map one drive letter to the share and then use the 'SUBST' command to map other drive letters to specific folders:

NET USE Z: \\computername\sharename /user:%USERNAME% 123456 /persistent:yes
SUBST H: Z:\applications
::remove any previous mapping to the J: drive letter
SUBST J: /d
SUBST J: Z:\%USERNAME%

-Also the /user:domain\username syntax is valid for a domain but nothing in the help about a workgroup. If you have no domain, just use /user:username (I'm using it that way)

-As for the passwords, which I suppose are different from 123456, I don't know of a simple solution. But keep in mind that it is a password (of an account) on the server.

You may just want to have a special account on the server having only access to sharename, and use it instead of the individual users. I'm not a specialist of this and use only XP home, so no room for customizing too much here.

Now if you want to succeed quickly, I would advice to experiment with your Mapdrive.cmd before using it in your CD. Try the different things, see how they work and adapt it to your need. Finally, tell us about so other users can benefit from it.

Link to comment
Share on other sites

Hey Djé, :hello:

Thanks for the info. Will give that a try in the next couple of days and let ya know how it works. Just by looking at it, it appears that will work for me so with fingers crossed and a 12 pack I might get it done. :P

Thanks Again :):)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...