Kix script default printer
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Kix script default printer

 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming
Author Message
Alan
Guest





Posted: Sun Dec 19, 2004 4:12 pm    Post subject: Kix script default printer Reply with quote

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 Reply with 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
Alan
Guest





Posted: Mon Dec 20, 2004 12:48 pm    Post subject: Re: Kix script default printer Reply with quote

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
 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB