Hi , is it possible to add a printer through vb i am on a LAN and my account does not have admin rights the adminstrator made a mistake and blocked the add a printer and he cant unblock it so if its possible to be done please post the code
Printable View
Hi , is it possible to add a printer through vb i am on a LAN and my account does not have admin rights the adminstrator made a mistake and blocked the add a printer and he cant unblock it so if its possible to be done please post the code
I'm pretty sure I've seen examples of how to do this (although I've not an example handy), however, even adding a printer through code requires the proper permissions be set.
Goggle "add printer vb6" and see what you come up with.
like he kinda hid the add a printer its only blocked of you directly try to access it ( like if you make a shortcut to it it wont work he did the same with command prompt her blocked cmd.exe so we just used the shell statment with command.com btw if you know whats the diffent between the two (cmd.exe and command.com)
Command.com is used by Win95/98 - cmd.exe is used by NT/2000/XPQuote:
Originally Posted by dark_shadow
See my code example in CodeBank on Globally Add or Delete Network Printer to All Profiles on a Computer.
It uses Rundll32 instead. :thumb:
:thumb: Cool.Quote:
Originally Posted by RobDog888
Does this work regardless of administrative or policy settings regardings adding printers?
Thanks! Not too sure. I have an Admin account and we dont have any policies so I cant test it.
We just have user/group permissions here.
Yeah, same here, thats why I was wondering. I've tried a number of times to bypass policies and admin settings through code, but so far I've not been successful. For me, that isn't an issue, but sometimes it can be for customer's.Quote:
Originally Posted by RobDog888
dark shadow: Give RobDog888's code a shot, and let us know how you make out.
Good one, RobDog888. I am quite sure it requires access to the server and
printer, but it might work also withoud admin rights, as long as you have enough priviledges. Matter is: does he has at least power user access?
:thumb:
Cool! Thanks guys for the props ;) This may be the first time my codebank code will be used after being
posted for over 5 months. :(
Rundll32 can do sooo many different things. I wish there was more documentation on it.
Your network admin cant or wont unblock the add new printer?