Petri IT Knowledgebase Forums
 

Petri.co.il forums Home Forums Start Page Forums Frequently Asked Questions FAQ Member List Members List
Go Back   Petri IT Knowledgebase Forums > Windows Scripting > General Scripting
Petri.co.il is happy to award auglan the title of Most Valuable Member !!!
Register Calendar Calendar Search Petri IT Knowledgebase Forums Search Todays Posts Today's Posts Mark Forums Read

Notices

Scripting help needed

Scripting help needed

this thread has 4 replies and has been viewed 415 times

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th September 2012, 18:18
awiborn awiborn is offline
Casual
Casual
 
 Join Date: Sep 2012
  6 month star
 Posts: 3
 Reputation: awiborn is on a distinguished road (10)
Default Scripting help needed

I work at a community college and was asked to script something to change every user's default printer in a single room from the color printer to black and white. We just got PaperCut, so it makes it a little more confusing, since I'm not sure if the virtual print queue affects it or not. The printer we have in said room (an open lab) only has a B&W printer, so doesn't recognize anything from the color queue.

I've never scripted in my life before, but I hobbled one together yesterday, and it seemed to work a little bit, but then stopped working. I've used it as a .vb and a .bat, to no avail.

This is the script:
Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnmngr.vbs -t -p "B&W Queue on print"

Would someone be willing to TEACH me how to make the script or a new script work? I'd rather not be told what to do; learning would be much nicer, so I can alter it if needed, etc.

Thanks,
Ariel
  #2  
Old 6th September 2012, 19:20
Ossian Ossian is offline
Administrator
 
 Join Date: Nov 2003
  6 month star 12 month star
 Location: Bonnie Scotland
 Posts: 15,138
  Send a message via Skype™ to Ossian
 Reputation: Ossian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud of (1300)
Default Re: Scripting help needed

Hi Ariel
It is good that you want to learn -- so many here just want a solution on a plate.
You are trying to run a built in script provided by Microsoft and appear to be using it with the correct syntax (based on the examples for the script)
When you run it, do you get any sort of error message, if so, what?
The script requires the printer already exists on the client (see the help http://technet.microsoft.com/en-us/l...(v=ws.10).aspx) so you could verify that first
Also, what server OS is the shared printer on, and what OS is on your domain controllers, as there may be easier ways than using a script
__________________
Tom Jones
MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
PhD, MSc, FIAP, MIITT
IT Trainer / Consultant
Ossian Ltd
Scotland

** Remember to give credit where credit is due and leave reputation points where appropriate **
  #3  
Old 6th September 2012, 22:52
awiborn awiborn is offline
Casual
Casual
 
 Join Date: Sep 2012
  6 month star
 Posts: 3
 Reputation: awiborn is on a distinguished road (10)
Default Re: Scripting help needed

I don't receive an error message; it just doesn't do what I want it to. When I run it in a .vb file, Visual Basic opens up and shows me what I wrote, and the same thing happens when I wrote it in a .bat file except it opened in the cmd box.

The printers are already established and exist on the computers, they float on our office fileshare.

We use a 2008 Server for the printers, I believe and our domain is an AD.
  #4  
Old 7th September 2012, 09:55
Ossian Ossian is offline
Administrator
 
 Join Date: Nov 2003
  6 month star 12 month star
 Location: Bonnie Scotland
 Posts: 15,138
  Send a message via Skype™ to Ossian
 Reputation: Ossian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud of (1300)
Default Re: Scripting help needed

Thanks
Can you post a screenshot of the exact output when you run the script in a cmd prompt -- open one and paste in the exact command you posted originally please

What OS is on the client computers?
Also are your AD domain controllers Server 2008?
__________________
Tom Jones
MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
PhD, MSc, FIAP, MIITT
IT Trainer / Consultant
Ossian Ltd
Scotland

** Remember to give credit where credit is due and leave reputation points where appropriate **
  #5  
Old 7th September 2012, 21:56
awiborn awiborn is offline
Casual
Casual
 
 Join Date: Sep 2012
  6 month star
 Posts: 3
 Reputation: awiborn is on a distinguished road (10)
Default Re: Scripting help needed

I have some sad news to report. I figured out how to fix it on my own. You see, I had been given an old script that didn't work anymore. Since I didn't know how to use it or anything, I wrote my own in hopes of being about to know and/or learn what I was doing. Because of that, when I looked back at the old one I thought I had figured out the problem. Turns out the problem was a little lamer than that, though.

But the old script works again! Huzzah! It just wanted the printer's port name which had been changed thanks to our new printing virtual server PaperCut.

Thank you so much for helping me. It was really nice that you were going to teach me what to do!

-Ariel
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HP ProLiant Smart Array 532 32bit driver needed (was: driver needed!) itian Windows Server 2008 / 2008 R2 2 20th May 2009 09:51
New to Scripting - What to use tssizemore82 General Scripting 4 30th July 2008 23:22
VB Scripting within an MSI JLMILLER General Scripting 0 12th December 2007 00:50
Scripting zafar General Scripting 3 13th May 2007 04:02
Ldap Scripting papirous Windows Server 2000 / 2003 1 22nd March 2007 22:08


All times are GMT +3. The time now is 02:46.

Steel Blue 3.5.4 vBulletin Style ©2006 vBEnhanced
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
 

Valid XHTML 1.0!   Valid CSS!

Copyright 2005 Daniel Petri