Scripting

Status
Not open for further replies.

mikesx4911

In Runtime
Messages
356
Location
chicago, IL
Not sure if this goes in the forum but Im starting to get more into scripting and Im having a hard time trying to peform this one task. I want to run the prnmnger.vbs script and than take it to the root of the c: but I dont understand the FIND command to well here is what I have so far

@net use Find "prnmngr.vbs" prnmngr.vbs > "C:\printer"

also if anyone has any good resources for learning this that would be great thanks.
 
Im trying to have the computer search for vbs first and run it than do the command to show the list of printers and than take the output to a notepad to the root of C. It seems ornmgr is in a different location from xp and windows 7 and I think it be much easier just to have the machine search for it.
 
searching from the command lin is not going to be easy. geez, ok try this.

first, confirm how to id the file path. prolly using find or dir /s and find.

then pipe that output into a set command. this will store the file path in a environmental variable. (possible? i dunno)

then run your vbs using the env var. **good luck**
 
Well I know off the top of my head you should be able to search for it using this line:

dir /s /a /b "prnmgr.vbs"

That'll return the full path to the file.
I'll have a go at knocking up a batch script for you now.
edit: hm, can't figure out how to pass the output to Cscript. Also, on the XP machine it finds two prnmngr files :facepalm: sigh.
 
Status
Not open for further replies.
Back
Top Bottom