markz
(Fresh Scripter)
2004-01-19 02:53 PM
Getting started with NT 4.0

I'm a newbie to this site and software. I need to add printers to a pc name, not user, set default printer and launch netscape. This is what I have done so far but the setdefaultprinter command is not functioning and the run command is not functioning. Could someone fill me in on why? Keep in mind if I run the kix32.exe local it works fine except for the setdefaultprinter command, but when I add kix32.exe to the login script for the user it only gives me the printers. Any help is greatly appreciated.

$location=substr(@wksta,1,6)
RUN "c:\program files\netscape\communicator\program\netscape.exe"
Select
Case $location="pc3775"
ADDPRINTERCONNECTION("\\CCISIC\IMAGEPR1")
ADDPRINTERCONNECTION("\\CCISIC\AISLE7")
Case $location="pc3399"
ADDPRINTERCONNECTION("\\CCISIC\IMAGEPR1")
ADDPRINTERCONNECTION("\\CCISIC\AISLE7")
Case 1
ADDPRINTERCONNECTION("\\CCISIC\IMAGEPR1")
EndSelect
SETDEFAULTPRINTER("\\CCISIC\IMAGEPR1")

Mark


Les
(KiX Master)
2004-01-19 06:03 PM
Re: Getting started with NT 4.0

Hmmm... I can't help but remark on the title of your thread "Getting started with NT 4.0"...

Why would you be just starting on such an old OS?

As for your problem, is the printer name and the share name the same? the two functions do not use the same name.


markz
(Fresh Scripter)
2004-01-19 10:04 PM
Re: Getting started with NT 4.0

As for why starting on such an old os, the client is a bit behind the times due to funding. The reason we are using kixtart is for the flexibility we get as opposed to the nt scripts.

We are using the same names for printers and shares.
Thanks


NTDOCAdministrator
(KiX Master)
2004-01-19 10:11 PM
Re: Getting started with NT 4.0

Hi Mike and welcome to the board.

Can you please let us know what version of KiXtart you are using and what client versions need to be supported. i.e. Win9x/NT/2000/XP ?

If you can, please add some debugging type code to your script so that maybe you can see or log what the returned errors are.



markz
(Fresh Scripter)
2004-01-19 10:27 PM
Re: Getting started with NT 4.0

Of course the pdc and bdc are nt 4.0. The client machines unfortunately are running on nt 4.0 as well. The version of kixtart I believe is the latest. I will be on site early this week and able to add debugging functions.

Just a rundown of what I wanted to accomplish with kixtart.

The script will be applied to one user. This user is used by different vendors to do research on a certain database. They will be using multiple pcs to access this database and each pc has a different network printer that is located close to it. Hence I need to specify pc name rather than user. The database that they access is the reason for the run statement and the default printer is basically just to have the flexibility and ability to change which printer to print to. These pcs are pretty much locked down to nothing.

Thanks


Sealeopard
(KiX Master)
2004-01-19 11:44 PM
Re: Getting started with NT 4.0

Are you even sure that the script runs at all? How do you call the script?
Try the script below:
Code:

$location=substr(@wksta,1,6)
? 'Location: '+$location
? 'Press any key to continue...'
get $key
RUN "c:\program files\netscape\communicator\program\netscape.exe"
? 'Error '+@ERROR+' - '+@SERROR
Select
Case $location="pc3775"
$rc=ADDPRINTERCONNECTION("\\CCISIC\IMAGEPR1")
? 'Error '+@ERROR+' - '+@SERROR
$rc=ADDPRINTERCONNECTION("\\CCISIC\AISLE7")
? 'Error '+@ERROR+' - '+@SERROR
Case $location="pc3399"
$rc=ADDPRINTERCONNECTION("\\CCISIC\IMAGEPR1")
? 'Error '+@ERROR+' - '+@SERROR
$rc=ADDPRINTERCONNECTION("\\CCISIC\AISLE7")
? 'Error '+@ERROR+' - '+@SERROR
Case 1
$rc=ADDPRINTERCONNECTION("\\CCISIC\IMAGEPR1")
? 'Error '+@ERROR+' - '+@SERROR
EndSelect
$rc=SETDEFAULTPRINTER("\\CCISIC\IMAGEPR1")
? 'Error '+@ERROR+' - '+@SERROR




markz
(Fresh Scripter)
2004-01-20 04:11 AM
Re: Getting started with NT 4.0

I have taken the printers off of the pcs that I am testing with and the printers do get added. I am calling the script just by putting kix32.exe in the login script under win nt user manager.

markz
(Fresh Scripter)
2004-01-20 01:00 PM
Re: Getting started with NT 4.0

sealeopard,

How would I launch the script that you refer to. Can I do it just by putting kix32.exe in the login script?
thanks
mark


Kdyer
(KiX Supporter)
2004-01-20 02:49 PM
Re: Getting started with NT 4.0

Well.. You can look at the Doc that accompanies the KIX32/WKIX32 executables.. Or, right here in the FAQ Section addresses this question..

Kent


Sealeopard
(KiX Master)
2004-01-20 04:28 PM
Re: Getting started with NT 4.0

Quote:

How do you call the script?



Didn't I just ask the same with regard to how you call your script?


NTDOCAdministrator
(KiX Master)
2004-01-20 10:36 PM
Re: Getting started with NT 4.0

Inside User Manger

KIX32.EXE MYSCRIPT.KIX