Solved

How to stop a printer from being shared

Posted on 2003-12-05
6
178 Views
Last Modified: 2013-12-03
Hello

I set up a virual printer in my program.
I only want this printer to be available on the machine it was installed.
I do not want the printer to be shared accross the network. Is there any way to prevent this

Regards
0
Comment
Question by:auk_ie
  • 3
  • 2
6 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 9891722
It won't be shared unless somebody shares it, will it?   After your program sets it up, right-click it in the Printers Control Panel and examine the "Sharing..." options.  It should be set as "not shared" by default....  

Can you try that and let me know what you have found?

If you want to prevent people from messing around with your settings and sharing it when you are not looking, then you probably have to limit acess to only admin users or something like that.

-- Dan
0
 

Author Comment

by:auk_ie
ID: 9892424
Hello Dan, Yes ofcourse I know how to share a printer. My Installer sets up a virtual printer. I basically need to limit this number of clients that can connect to this printer (I would be happy to award you an additional 500 points if you could tell me how to do this) or as the above question says I need to prevent my users (Administrators included) to come in and share this printer from the printers property sheet.

0
 
LVL 15

Expert Comment

by:Raisor
ID: 9893707
Hi,

What OS are we talking about?
How are resources set up?
What priviledges do you have?


Best regards, Raisor
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:auk_ie
ID: 9894146
I am working with windows 98 and 2000. The virtual printer is setup using the default microsoft postscript drivers. I have written a port monitor the printer uses to accomplish its task. The install program has administrator rights so I can programtically execute any windows administration task.
0
 

Author Comment

by:auk_ie
ID: 9894152
I suppose one possible solution might be to get the devmode structure when the dll is called and disble the network sharing if it is enabled. But what I really want to know is if there is any way to share the printer out to say a maximum of ten clients.

0
 
LVL 49

Accepted Solution

by:
DanRollins earned 500 total points
ID: 9894986
If you can find a way to disable it, then it should be easy to track a counter  -- say in the registry -- of the number of users who are currently using it.  It would be more difficult to disallow *potential* access.  Probably the best way would be to keep track of each user that tired to use it.  Compare that user name to a list.  If the name is not yet on the list, add it -- unless the list already has 10 users on it.  

With that scheme you would also need an administration facility to allow a network administrator the ability to delete users from the list etc.

In general, it is best to do everything possible to make using your printer EASIER, so IMHO, any such scheme would be a step in the wrong direction.

-- Dan
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now