Windows Scripting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationWindows Scripting

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 28th, 2009, 12:31 PM
whatsys whatsys is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 6 whatsys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 6 sec
Reputation Power: 0
VBScript (VBS) - Printer Script Not Working

Hey folks, cool forum. I cant write my question beacause I cant stop reading

I need to solve a printing script problem real bad. I didnt set it up and that person is unavailable. Windows Server 2003 domain, the DC is the file server and print server. Instead of installing printers on users XP machines, it is handled by the server with a 'simple' vbs script. Instead of users seeing just the printer(s) right there in their office, they see all the printers in the building. Id like to change that, but thats not the primary problem. Theyre still getting used to it, sometimes they print to printers 3 floors away. They'll get it.

The problem is printing gets fouled up. When they see no printers at all, the local print spooling service has stopped. I think it was being caused by a particular printer. Even after restarting it, they have to log off/on again or reboot. This printer was giving errors all around the place, something in the driver. I added a

objNetwork.RemoveWindowsPrinterConnection


line to the script, uninstallled it from the server, I thought that worked but it still comes up - sometimes. Here is the script:

On Error Resume Next
Err.Clear

Set objNetwork = CreateObject("WScript.Network")


objNetwork.AddWindowsPrinterConnection "\\server1\ACME-2nd"
objNetwork.AddWindowsPrinterConnection "\\server1\ACME-1st"
objNetwork.AddWindowsPrinterConnection "\\server1\ACME-Marketing"
objNetwork.AddWindowsPrinterConnection "\\server1\StoreroomBlack"
objNetwork.AddWindowsPrinterConnection "\\server1\StoreroomColor"
objNetwork.AddWindowsPrinterConnection "\\server1\ACME-LJ3500"
objNetwork.AddWindowsPrinterConnection "\\server1\ACME-2ndFl-4250"
objNetwork.AddWindowsPrinterConnection "\\server1\center6122"

Some other symptoms: The LaserJet 3800 was in the storeroom, which was moved to the Opportunity office is still shared as 'storeroom' but it is correct in users printers folder as 'opportunity'. The LJ3500 is really a 3005, it is shared on the server as a 3500 and is in the users printers folder as a 3005. On the Terminal Server, we use ThinPrint. In TS sessions, the printers folder show every "local" printer from every session in the past, 53 of them at the moment.

I hope Ive included all the pertinent info. Thanks for taking a look.

Reply With Quote
  #2  
Old July 29th, 2009, 01:57 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,905 Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)  Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Week 2 Days 11 h 13 m 12 sec
Reputation Power: 969
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Hi whatsys,

Your issue doesn't sound as though it's script related. I don't think the problem is in your script.

It sounds to me like you have a domain logon script that populates a list of printers. When of these is temporarily unavailable, or some kind of error occurs, the local print spooler service is disabled. After restarting the service, your users need to log off and then on again because that's what starts the printer script again.

There is no way to avoid this since you are using a domain logon script. I'd recommend setting up the domain properly and eliminating a need for the script to begin with. You might even consider sharing the printers on the DC and making them always available. Each workstation could then have a default printer that is closest to them.
__________________
Don't like me? Click it.

Scripting problems? Windows questions? Ask the Windows Guru!

Stay up to date with all of my latest content. Follow me on Twitter!

Help us help you! Post your exact error message with these easy tips!

Reply With Quote
  #3  
Old July 31st, 2009, 03:30 AM
whatsys whatsys is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 6 whatsys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by Nilpo
I'd recommend setting up the domain properly and eliminating a need for the script to begin with.
Can you elaborate?

Quote:
Originally Posted by Nilpo
I'd recommend setting up the domain properly and eliminating a need for the script to begin with. You might even consider sharing the printers on the DC and making them always available. Each workstation could then have a default printer that is closest to them.
All the printers are shared and always available. Im gonna try editing the logon script (which maps user drives, among other things) and remove any reference to the printers script. Then, like you said, set up default printers on each workstation.

Reply With Quote
  #4  
Old July 31st, 2009, 12:55 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,905 Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)  Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Week 2 Days 11 h 13 m 12 sec
Reputation Power: 969
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Quote:
Originally Posted by whatsys
Can you elaborate?
Sure. I would eliminate any scripts and place users in groups based on their location in the building. Then apply share permissions for each printer based on that grouping. This way, users will only be able to access printers in their area.

Reply With Quote
  #5  
Old August 3rd, 2009, 09:38 AM
whatsys whatsys is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 6 whatsys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 6 sec
Reputation Power: 0
If I do not use scripts, what do I do for drive mapping?

Reply With Quote
  #6  
Old August 3rd, 2009, 10:21 AM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,905 Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)  Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Week 2 Days 11 h 13 m 12 sec
Reputation Power: 969
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Quote:
Originally Posted by whatsys
If I do not use scripts, what do I do for drive mapping?
If you do not use scripts, you can map a drive letter (to a local folder or a network location) from Windows Explorer or My Computer by choosing Map Network Drive... from the Tools menu.

Reply With Quote
  #7  
Old August 3rd, 2009, 10:29 AM
whatsys whatsys is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 6 whatsys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by Nilpo
If you do not use scripts, you can map a drive letter (to a local folder or a network location) from Windows Explorer or My Computer by choosing Map Network Drive... from the Tools menu.


Yes, I know that. But we're talking about 100+ users, with multiple drives, that occasionally change, almost half are Terminal Server users.

Reply With Quote
  #8  
Old August 3rd, 2009, 12:02 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,905 Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)  Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Week 2 Days 11 h 13 m 12 sec
Reputation Power: 969
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Quote:
Originally Posted by whatsys
Yes, I know that. But we're talking about 100+ users, with multiple drives, that occasionally change, almost half are Terminal Server users.
Then you'll want to use a logon script. That's not a static setting so there's no way to set it via Group Policy that I'm aware of.

Reply With Quote
  #9  
Old August 3rd, 2009, 12:15 PM
whatsys whatsys is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 6 whatsys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 6 sec
Reputation Power: 0
So Im back to where I started.

Another detail that may be a clue-originally there was an spson R380 in the script. Something in the driver kept loading a printer monitor (ink level etc) to local machines. Turn it off and it reinstalled itself. That printer has been removed from the script and the server. But I suspect that there is a connection between it and the spooling error. Something from that printer is cached somewhere on local machines.

Reply With Quote
  #10  
Old August 4th, 2009, 08:17 AM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,905 Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)Nilpo User rank is General (90000 - 100000 Reputation Level)  Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1Folding Points: 214558 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Week 2 Days 11 h 13 m 12 sec
Reputation Power: 969
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
I imagine that the printer and associated drivers are still installed. Disconnecting it will not remove those. Roll out an uninstall for it.

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationWindows Scripting > VBScript (VBS) - Printer Script Not Working


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek