Sign in to follow this  
Followers 0
Harshmage

User Creation and Drive Map

3 posts in this topic

Okay, I'm just a bit new to this but I do have a question or two.

I've got an AutoIt script that asks for a username, password, and password confirmation, and creates a user account with those creds on the local machine. Great, works nice. Not an issue.

But what I'd like is to also create a script that maps the network drive for that user. Registry key, batch file...

User accounts are mapped to the SAN like this:

\\server.edu\home\<U>\<S>\<USERNAME>\

Even if I have to create a separate script to ask for username/password on their own login, automation is what I'm after. As these machines aren't going to be part of AD, they're going to not have anything related to standard roaming profile scripts.

Login scripting with AutoIt to ask for username/password to map the network drive as they're logging in? Exit out if the User Create account is the one logged in?

Sorry, I'm brainstorming, and posting so I don't forget.

Share this post


Link to post
Share on other sites



Okay, I'm just a bit new to this but I do have a question or two.

I've got an AutoIt script that asks for a username, password, and password confirmation, and creates a user account with those creds on the local machine. Great, works nice. Not an issue.

But what I'd like is to also create a script that maps the network drive for that user. Registry key, batch file...

User accounts are mapped to the SAN like this:

\\server.edu\home\<U>\<S>\<USERNAME>\

Even if I have to create a separate script to ask for username/password on their own login, automation is what I'm after. As these machines aren't going to be part of AD, they're going to not have anything related to standard roaming profile scripts.

Login scripting with AutoIt to ask for username/password to map the network drive as they're logging in? Exit out if the User Create account is the one logged in?

Sorry, I'm brainstorming, and posting so I don't forget.

Hi,

see helpfile DriveMapAdd and IsAdmin.

I would do it like this: Put the exe in All User Profile Autostart and exit script if user is admin.

;-))

Stefan

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

If everything fails you can use the good old command line tools

runaswait("user","domain","Password",1,@ComSpec & " /c net use x: \\server.edu\home\<U>\<S>\<USERNAME>\")

This should work on every windows computer w/o problems. I suggest to encrypt / decrypt the credentials if using account informations within a script.

Hope that helps.

D.

Edited by Dschingis

Share this post


Link to post
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
Sign in to follow this  
Followers 0