| Author |
Message |
Alan
Guest
|
Posted:
Sun Dec 19, 2004 4:12 pm Post subject:
Kix script default printer |
|
|
Hi
Trying to set default printer in kix script by name of workstation
I can achive this no problems by using the exact workstation name for MS99
for example.....
IF @WkSTA="MS99"
IF SetDefaultPrinter ("\\ml350\hp black laser") = 0
ENDIF
I want to be able to say "any computer name that starts with MSXXXXX where x
is workstation number....
does any one know how to define xxxx as a variable? I have tried using MS??
MS$ MS, all to no avail..
Any help or pointer would be great ....
Cheers.... |
|
| Back to top |
|
 |
David H. Lipman
Guest
|
Posted:
Sun Dec 19, 2004 8:34 pm Post subject:
Re: Kix script default printer |
|
|
Alan, why not use LEFT("string", length)
IF "MS" = LEFT(@WkSTA, 2)
IF SetDefaultPrinter ("\\ml350\hp black laser") = 0
ENDIF
Dave
"Alan" <adthomas@westnet.com.au> wrote in message news:41c554ef@quokka.wn.com.au...
| Hi
|
| Trying to set default printer in kix script by name of workstation
|
| I can achive this no problems by using the exact workstation name for MS99
| for example.....
|
| IF @WkSTA="MS99"
| IF SetDefaultPrinter ("\\ml350\hp black laser") = 0
| ENDIF
|
| I want to be able to say "any computer name that starts with MSXXXXX where x
| is workstation number....
|
| does any one know how to define xxxx as a variable? I have tried using MS??
| MS$ MS, all to no avail..
|
| Any help or pointer would be great ....
|
| Cheers....
|
| |
|
| Back to top |
|
 |
Alan
Guest
|
Posted:
Mon Dec 20, 2004 12:48 pm Post subject:
Re: Kix script default printer |
|
|
Gave this ago today....but had no success...
can you please provide some working sample code for me to use as my kix
skills arnt great...
Thanks a lot...
"David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
news:evLpSfd5EHA.2676@TK2MSFTNGP12.phx.gbl...
| Quote: | Alan, why not use LEFT("string", length)
IF "MS" = LEFT(@WkSTA, 2)
IF SetDefaultPrinter ("\\ml350\hp black laser") = 0
ENDIF
Dave
"Alan" <adthomas@westnet.com.au> wrote in message
news:41c554ef@quokka.wn.com.au...
| Hi
|
| Trying to set default printer in kix script by name of workstation
|
| I can achive this no problems by using the exact workstation name for
MS99
| for example.....
|
| IF @WkSTA="MS99"
| IF SetDefaultPrinter ("\\ml350\hp black laser") = 0
| ENDIF
|
| I want to be able to say "any computer name that starts with MSXXXXX
where x
| is workstation number....
|
| does any one know how to define xxxx as a variable? I have tried using
MS??
| MS$ MS, all to no avail..
|
| Any help or pointer would be great ....
|
| Cheers....
|
|
|
|
|
| Back to top |
|
 |
|
|
|
|