Solved

How to stop a printer from being shared

Posted on 2003-12-05
6
176 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
Comment Utility
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
Comment Utility
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
Comment Utility
Hi,

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


Best regards, Raisor
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:auk_ie
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

9 Experts available now in Live!

Get 1:1 Help Now