Page 1 of 1 1
Topic Options
#212408 - 2017-04-04 04:22 PM con2prt.exe
Snickers Offline
Fresh Scripter

Registered: 2017-03-28
Posts: 15
Loc: uk
Hi

is it possible to run con2prt.exe to install a printer if the client IP is in a specific range ?

Top
#212411 - 2017-04-05 10:41 AM Re: con2prt.exe [Re: Snickers]
Snickers Offline
Fresh Scripter

Registered: 2017-03-28
Posts: 15
Loc: uk
Hi,

I want to share this because I have received a lot of help from this forum. I solved my problem with this script:

;--------Start IF_ELSE.kix--------
If Left(@WKSTA, 1) = "e"

SHELL "c2pe9.bat"

endif


;-------- end IF_ELSE.kix--------

If the first character of the workstation hostname begins with an "e" a batch file is executed which uses the con2prt.exe to map a specific printer.

PS, i couldn't find how to put my code into code tags. Sorry.

Top
#212412 - 2017-04-05 12:06 PM Re: con2prt.exe [Re: Snickers]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
You can type [ code ] type or copy in your code and end with [/ code ] (without the spaces) to put the code between code tags so the formatting gets preserved and if there are long lines they do not stretch the page width that much.

What do you so indie the bat file? Does it elevate the permissions or is con2prt.exe able to do this without elevating permissions? Great that it is working now.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#212413 - 2017-04-05 03:21 PM Re: con2prt.exe [Re: Mart]
Snickers Offline
Fresh Scripter

Registered: 2017-03-28
Posts: 15
Loc: uk
con2prt works without elevating permissions and works even if point and print is not configured.

Thanks to Bruce Lee chuck norris got noticed in the film and media world.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 687 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.051 seconds in which 0.022 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org