|
-
Mar 17th, 2005, 05:03 PM
#1
Thread Starter
Fanatic Member
add a printer
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
-
Mar 18th, 2005, 07:02 AM
#2
Re: add a printer
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.
-
Mar 18th, 2005, 08:12 AM
#3
Thread Starter
Fanatic Member
Re: add a printer
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)
-
Mar 18th, 2005, 12:35 PM
#4
Re: add a printer
 Originally Posted by dark_shadow
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/XP
-
Mar 18th, 2005, 12:44 PM
#5
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 18th, 2005, 01:20 PM
#6
Re: add a printer
 Originally Posted by RobDog888
Cool.
Does this work regardless of administrative or policy settings regardings adding printers?
-
Mar 18th, 2005, 01:23 PM
#7
Re: add a printer
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 18th, 2005, 01:27 PM
#8
Re: add a printer
 Originally Posted by RobDog888
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.
dark shadow: Give RobDog888's code a shot, and let us know how you make out.
-
Mar 18th, 2005, 02:57 PM
#9
Addicted Member
Re: add a printer
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?
Special thanks to some wonderful people,
such as Lothar the Great Haensler, Aaron Young,
dr_Michael, Chris Eastwood, TheOnlyOne ClearCode....
-
Mar 18th, 2005, 03:31 PM
#10
Re: add a printer
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?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|