Connecting to a Printer in a Mandatory Profile



I have created a mandatory profile to be used when a user logs on. I also
wrote a simple batch file to automatically connect to a printer during logon.
In Active Directory I specified the batch file on the "Profiles" tab of the
user account.

When the user logs on, the mandatory profile appears to be in effect but no
printers were connected. The script looks like this:

rundll32 printui.dll,PrintUIEntry /in /n\\Antonelli01\HPLaserJ
rundll32 printui.dll,PrintUIEntry /y /n\\Antonelli01\HPLaserJ

I am connecting to this printer and setting it as the default.

Also, I tested this script from a client computer by running it directly and
it worked.

Finally, while testing the profile after logging on, I used the Add Printer
Wizard to try to connect to the printer and received the following message:

"You do not have sufficient access to the machine..."

So, how do I give the mandatory profile sufficient access so that the
printers are automatically connect during the logon process?

Thanks in advance.


Try calling a batch file form the netlogon share of the network to map
drives and printers. KIX is a pretty common script language also but
batch should work fine. KIX supports printer mapping natively but
batch does not, unless you make a system call to rundll32 (not
advised). Get con2prt.exe and plop it into your netlogon share.

con2prt /cd \servers\printer will connect the printer and make it
con2prt /c \\server\printer will simply connect it

Hope this helps...

-Mike M


Thanks for the reply.

I'm not sure if I know what you mean when you say call the batch file from
the netlogon share. Right now my batch file is located in a shared folder on
the server which contains the info for the mandatory profile. The batch file
is called from the default user account via the "profiles" tab in Active
Directory. Should I be calling from somewhere else?

Also, should I replace the line in my batch file with yours?


Did you ever find a resolution to this problem? If so, I would be glad to
hear how it turned out as I am facing a similar situation.


Brian J.

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