Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Script for network printer

Posted on 2006-06-29
6
Medium Priority
?
209 Views
Last Modified: 2013-12-03
There is a printer that is on the network and it keeps "pausing".  How do I code a script to "unpause" this printer?  I would like the script to run every 2 minutes.  

Thanks,
0
Comment
Question by:rgrguric
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:rgrguric
ID: 17010178
It is a windows network and all cpu's are running Windows XP.
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 800 total points
ID: 17010773
Does

net print \\server\printername /release

work if you do that manually?
0
 

Author Comment

by:rgrguric
ID: 17012209
I tried running that line of code and got this error...

NET PRINT
\\computername\sharename
          [\\computername] job# [/HOLD | /RELEASE | /DELETE]
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:rgrguric
ID: 17012444
Ok, so I used the correct syntax and it works for any print job... But how do I unpause the printer itself?
0
 
LVL 86

Expert Comment

by:jkr
ID: 17015046
Sorry, it seems that I missed the Job ID part...
0
 
LVL 25

Accepted Solution

by:
clockwatcher earned 1200 total points
ID: 17025715
If you've got XP, give this script a try:

   http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/prnqctl.mspx?mfr=true

cscript %SYSTEMROOT%\SYSTEM32\prnqctl.vbs -m [-s RemoteComputer] -p PrinterName [-u UserName -w Password]
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

730 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