Page 1 of 1

Batch for automatic printer mapping between 2 rooms

Posted: 16 Mar 2012 03:49
by Hans
Hello @ all

1. I'm not very good in English ... and batches :S I hope you can unerstand it..

I need a batch, that can distinguish between 2 IP-Ranges and automatically selcet the correct standard printer. I have to distinguish in Ip Ranges and not computernames.

Details:


First Room Ip Range 10.65.8.x
Printer First Room Ip : 10.65.8.199

Second Room IP Range 10.65.10.x
Printer Second Room Ip : 10.65.10.199



Thanks !

Regards
Hans

Re: Batch for automatic printer mapping between 2 rooms

Posted: 16 Mar 2012 07:41
by jeb
Hi Hans,

I see two problems.

1. Determin the own IP
2. Change the default printer

1. Can be solved with parsing the results of ipconfig (with a FOR /F Loop)
2. Can be solved with reg.exe, but you need to find the correct registry-keys (Google or search with RegEdit)

jeb

Re: Batch for automatic printer mapping between 2 rooms

Posted: 16 Mar 2012 07:53
by Hans
Kannst du mir das nun noch auf Deutsch erklären? :D

Re: Batch for automatic printer mapping between 2 rooms

Posted: 16 Mar 2012 08:05
by jeb
Hallo Hans,

for question (and answers) in german you could try administrator.de
Für Fragen (und Antowrten) kannst du administrator.de ausprobieren.

jeb wrote:I see two problems.

1. Determin the own IP
2. Change the default printer

1. Can be solved with parsing the results of ipconfig (with a FOR /F Loop)
2. Can be solved with reg.exe, but you need to find the correct registry-keys (Google or search with RegEdit)


Du hast zwei Problem zu lösen
1. Die eigene IP Adresse bestimmen
- kann man mit IPConfig erhalten und mit einer FOR/F Schleife untersuchen

2. Den Standard-Drucker umstellen
- Wird man über die Registry lösen können, muss man halt nur den Registry-Schlüssel kennen (oder Google fragen)

jeb