can I create a batch file & run it on user's PC?

J

Jason Shohet

A user runs a .NET application that authenticates them against active
directory (they're coming in over VPN so they don't log on to the network
normally). Once they log in, I want to take their user id, & run a batch
file on their PC with that user id actually inside the batch file.

(The objective here is to map a user to a drive on the network when they
come in thru VPN -- and that can only be done with a batch file we have,
customized with their network user id in the file).

1. I'm not sure whether to do this in asp.net or C#.NET (c/s).
2. Actually the first thing I need to know is: how do I authenticate a
user against active directory? I mean, I give them a username & password.
They type it in. Can I somehow go against AD and verify if this is them.
3. How do I dynamically run a batch file on the user's PC ?

TY,
Jason Shohet
 
J

Jeremy Ames

That sounds do-able. What you are wanting to create is a
logon script. You should be able to create a generic
batch file that will find the user information. Once you
have your batch file working correctly, attach it the VPN
connection. There should be a section in it just for
logon scripts.
 
J

Jason Shohet

The first part i'm missing, is how to do a logon, that hits ActiveDirectory
on our network. Should I just search around the ng? (ie, its a common
thing)?

I wonder if .NET has a function, like.... callADlogon( ); that
automatically brings up the network logon control, validates against AD and
returns a boolean true or false :) ?? wishful thinking?
 
A

Andre Velloso

search MDSN or TechNet for:
longon script.
there is somewhere an example that does exactly what you want. I also have
it somewhere. If I find I will post it here.

To assing a longon script for a group of users the best way is to create a
group policy for that. Your network Admin must know how to do that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top