Jump to content

Recommended Posts

Posted

Here is my question, and I hope someone with wisdom can answer this:

You have a windows print server.

There are 200 printers installed on the server

They are all shared

To be able to print, you can do one of 2 methods:

1. Logged on as the user: Start>Run>\\printserver\printer1

This will connect to the share on a PROFILE level. In other words, if someone else logs in, they will not be connected to the printer. It doesn't even show up in the list of printers. Only the user who did this will be connected, and see the printer listed in the printers folder.

2. Use command line like this: RunWait("rundll32 printui.dll,PrintUIEntry /in /q /n" & $ret)

This installs the printer on a MACHINE level. In other words, no matter who logs in, you get connected to the share.

My question is this: If you are logged on as a admin, how do you delete any printer shares that the user is connected to on a PROFILE level? I want to make a tool that does this. I currently have a tool that will detect any printers installed, but only under the user name I'm currently logged on as. I suspect (though have no idea how) the registry is involved.

Thoughts?

Posted

Thats the problem. If they are not logged in, how do I get it? I need to be able to delete the connection to the share so that when they log in again, the printers are mapped where I need them to be. I can't do anything with login scripts. I'm not allowed.

Well, from AutoIt, I'm not sure you can. In RegEdt32.exe you can load the hive (the user's NTUser.DAT file), edit, and then unload the hive.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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...