PC Review


Reply
Thread Tools Rate Thread

How did I share a printer using vbscript in windows 2000?

 
 
feb
Guest
Posts: n/a
 
      16th Oct 2003
Hi,
How did I share a printer using vbscript in windows 2000?

I need to share a printer using vbscript in windows 2000, the script will
run in login domain script , only one time.
the script will reside in the server ( windows 2000), clients are windows
2000 Professional.
the printer is attached to client computer.
I try the following script, but it doesn't work, I think the problem is that
it is for windows xp and 2003.
*************** START OF SCRIPT *************************
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer")
For Each objPrinter in colInstalledPrinters
Wscript.Echo "Name: " & objPrinter.Name
wscript.echo "SHARED " & objPrinter.Shared
wscript.echo "SHARED AS " & objPrinter.ShareName
Next
********************** END OF SCRIPT **********************
I get the following error
Error: The object doesn't accept this property o method: 'objPrinter.Shared'
Code: 800A01B6
......

thanks
feb.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on How to share a printer on a Windows 2000 computer. Musicman50 Microsoft Windows 2000 Printing 1 30th Dec 2006 06:09 PM
Re: Share a Printer connected to Windows 2000 Denis Tringham Microsoft Access Form Coding 1 12th Apr 2005 02:53 PM
Share a Printer connected to Windows 2000 =?Utf-8?B?VGV4IEhlbWtl?= Microsoft Windows 2000 Networking 22 12th Apr 2005 02:53 PM
How to share a printer on a windows 2000 workgroup Shao Yong Microsoft Windows 2000 Printing 3 11th Feb 2004 01:59 PM
How to Share Hp USB Printer on a Windows 2000 Network Tech96 Microsoft Windows 2000 Networking 4 30th Sep 2003 01:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 AM.