Help writing a batch file to capture network printers and mapped drives

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

lexvegas

Thread Starter
Joined
Nov 9, 2011
Messages
1
I was trying to write a batch file that while logged into a users account in Win7 or WinXP, I could capture network printers and network mapped drives. Then the captured details of the network printers and mapped drives could be put in a .txt file on my thumb drive.

Any help?!?
 

Squashman

Retired Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
The Net Use command will show you all the mapped drives on the computer. I am not sure how to get a list of the network printers. Will try and look into that for you.
 

Squashman

Retired Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
This following command will get you all printers installed on the system. I am not sure how to just get the Networked printers.

Code:
cscript c:\windows\system32\prnmngr.vbs -l
 

valis

Moderator
Joined
Sep 24, 2004
Messages
78,206
wouldn't that require prnmgr.vbs? I don't have that on my W7 rig.......at least, I don't think I do.
 

valis

Moderator
Joined
Sep 24, 2004
Messages
78,206
whups, yes I do.....it's in the printing_admin_scripts subfolder.....my error, Squashman.......
 

Squashman

Retired Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
Thanks for checking that it is there on Windows 7. I assumed it was but wasn't sure.
 

valis

Moderator
Joined
Sep 24, 2004
Messages
78,206
i just changed it to

Code:
C:\Users\user.name>cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prn
mngr.vbs -l
worked like a charm.

Thanks, Squashman. Didn't even know that one was there.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top