#23616 - 2002-06-20 04:44 PM
Several Problems with my script
|
Julia
Lurker
Registered: 2002-06-19
Posts: 3
Loc: Kansas
|
I have several problems with my script (below) and unfortunately the reason why is apparently beyond me at this point.
I get the drives to map and that is about it.
Single W2K domain, User for testing has Admin on local W2K Pro PC
Time, drive delete, file copy, and printer mapping are not working.....
Any help at all would be greatly appreciated..I am lost (obviously)!!
Julia
-----start login script------
@echo off
CLS
SETTIME \\obc4
BEEP
ECHO Verifying / Updating Script Software Installation, Please Wait...
IF "%OS% == "Windows_NT" GoTO Winnt
C:\Windows\command\xcopy\ %0\..\kix32.exe %windir%\system\ /d /h /i /r /v >nul C:\Windows\command\xcopy\ %0\..\kx16.dll %windir%\system\ /d /h /i /r /v >nul C:\Windows\command\xcopy\ %0\..\kx32.dll %windir%\system\ /d /h /i /r /v >nul C:\Windows\command\xcopy\ %0\..\kx95.dll %windir%\system\ /d /h /i /r /v >nul ECHO Loading logon script, Please Wait... %Windir%\systemkix32.exe %0\..\logon.kix GOTO Drives
:WinNT xcopy %0\..\kix32.exe %WINDIR%\System32\ /d /h /i /r /v > nul ECHO Loading Logon Script, Please Wait... %WINDIR%\System32\kix32.exe %0\..\logon.kix GOTO Drives
:Drives use * /delete /PERSISTENT SLEEP 10
use h: /home use p: \\obc4\public GOTO Printers
:Printers addprinterconnection("\\obc4\hplaserjet5")
:End
-----End Login script------
|
|
Top
|
|
|
|
#23617 - 2002-06-20 05:38 PM
Re: Several Problems with my script
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Could you show where your logon.bat ends and your logon.kix begins? I'm a bit confused.
{edit} is that because you aren't using a logon.bat? The stuff up until :drives won't work in .kix ... unless you rewrite it.. and even then you can't expect to copy kix files while kix is in use...
Brian [ 20 June 2002, 17:40: Message edited by: BrianTX ]
|
|
Top
|
|
|
|
#23619 - 2002-06-20 06:08 PM
Re: Several Problems with my script
|
Julia
Lurker
Registered: 2002-06-19
Posts: 3
Loc: Kansas
|
So Brian...you are saying that I should use a .bat to copy the kix files and then use kix to execute the other stuff?
How do you tell a .bat to proceed onto the .kix when it is done?
Maciep: I am only using the addprinterconnection in NT, but somehting else is not right...do you know if the syntax is correct?
Thank you both for your help...I am fairly confused!
|
|
Top
|
|
|
|
#23620 - 2002-06-20 06:44 PM
Re: Several Problems with my script
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
Welcome to the board.
In next reaction we will return your complete script and logon.bat file.
Information for setup your server/client environment:
For an easy upgrade of your clients with f.e. kixtart 4.02 you can use our installation package kix402update.exe. Always the correct files will be installed on your clients.
At the moment there are six releases:
- kix362update.exe
- kix363update.exe
- kix400update.exe
- kix401update.exe
- kix402update.exe (final release)
- kix410update.exe (beta)
Each time it will verify the correctness of your release. Incorrect files will be replaced and missing files will be added. Regardless of file attributes. To prevent running more times weare using a control files. You can easily upgrade it with our iexpress package. Questions: how?
A way of installing/updating kixtart of your clients: with only one additional statement
For the installation of kixtart at your local workstation we see many version of doing it. Most statements in your BATch file are using for this duty. But there is also a way of doing it with a single statement, which doesn't only copy the required files, but also compare file version information. After completion a logfile will be created at your local workstation.
Another way of installing/updating kixtart on your clients:
For installing or updating of your clients you can download our packages kix363update.exe, kix400update.exe or kix401update.exe from our site http:\\home.wanadoo.nl\scripting.
Possible calls in your logon procedure can be:
As first line of your logon procedure you can use one of following formats:
- x:\kixtart\kix402update.exe /q
- %0\..\kix402update.exe /q
- if not exist c:\kix402.ok %0\..\kix402update.exe /q
- \\server\NETLOGON\kix402update.exe /q
Second line can be something like:
- kix32 %0\..\your_script.kix
- kix32 \\server\netlogon\your_script.kix
Results of your BATCH can be: for network environments (= update package will transfer during each logging on)code:
@echo off %0\..\kix402update.exe /q kix32 %0\..\your_script.kix @echo off
or for dial-up environments (= update package will transfer only once)
code:
@echo off if not exist c:\kix402.ok %0\..\kix402update.exe /q kix32 %0\..\your_script.kix @echo off
or
code:
@echo off if not exist %windir%\kix402.ok %0\..\kix402update.exe /q kix32 %0\..\your_script.kix @echo off
After using above programs there will be created a control file c:\kix363.ok, c:\kix400.ok, c:\kix401.ok, c:\kix401.ok or c:\kix402.ok. So it isn't necessary to run the installation process again, but we advise to update (or better: verify) kixtart files always. Also those control files will put in the %windir% directory.
Reason: a security leak for running kixtart from clients.
remarks: SECURITY LEAK for running kixtart from clients
running kix32.exe from a local workstation can have also unwanted effects. An user can modify or replace your kix32.exe file. f.e. not to run your script but for reading your script. For RAS users it is interesting not to download each time the kixtart required files, but for other users we advise: always check the kixtart files and update them when necessary before running your KIX scripts.
FIX for SECURITY LEAK:
In our case the first statement of our default logon procedure for network users is always: %0\..\kix363update.exe /q and it will guarantee that kix32.exe file will always the correct one.
remarks: performance
- only 150 KBytes will be transfered to your workstation. the package has been compressed.
- always the correct set of kixtart files will be used. during the execution of scripts
the user can already starts working. - during installation or updating kixtart you will not get share violation error or busy file
error. the install.kix scripts runs with his own kixtart version. - for RAS users we create additional authorizations which will run minimum set of script code.
for them the logon procedure containts as statement: if not exist c:\kix363.ok %0\..\kix363update.exe /q greetings.
btw: related kixtart topic http://kixtart.org/board/Forum2/HTML/000583.html
btw: be sure no other kix32.exe and DLLs are active on your clients.
|
|
Top
|
|
|
|
#23621 - 2002-06-20 06:54 PM
Re: Several Problems with my script
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
code:
@echo off if not exist %windir%\kix402.ok %0\..\kix402update.exe /q if not exist %windir%\kix402.ok goto net kix32 %0\..\login.kix goto end :net %0\..\kix32 %0\..\login.kix :end @echo off
Your kixtart script login.kix
code:
cls settime "\\obc4" ? "Verifying / Updating Script Software Installation, Please Wait..." USE * /delete /persistent IF (Len(@homedir) <> "") USE H: @homedir ELSE $null=Message("Your home drive can be mapped. please call your helpdesk","KiXtart @kix") ENDIF USE P: "\\obc4\public"
:printers IF (AddPrinterConnection("\\obc4\hplaserjet5") <> 0) ? "Warning KIX: error during printer installation. error @error (@error)" ENDIF :end
Put both files in your NETLOGON directory. greetings.
|
|
Top
|
|
|
|
#23622 - 2002-06-20 11:02 PM
Re: Several Problems with my script
|
Julia
Lurker
Registered: 2002-06-19
Posts: 3
Loc: Kansas
|
Thank you so much for the help.
There is one thing that I have a question about.
The following line is not working:
use * /delete /persistent
Any suggestions?
Again, thank you so much.
Julia [ 20 June 2002, 23:24: Message edited by: Julia ]
|
|
Top
|
|
|
|
#23623 - 2002-06-21 12:24 AM
Re: Several Problems with my script
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
We have replace your USE statement with individual ones. New version:
code:
cls settime "\\obc4" ? "Verifying / Updating Script Software Installation, Please Wait..." IF (Len(@homedir) <> "") IF (Exist("H:\.") = 1) USE H: /delete /persistent ENDIF USE H: @homedir ELSE $null=Message("Your home drive can be mapped. please call your helpdesk","KiXtart @kix") ENDIF IF (Exist("H:\.") = 1) USE P: /delete /persistent ENDIF USE P: "\\obc4\public" ; :printers IF (AddPrinterConnection("\\obc4\hplaserjet5") <> 0) ? "Warning KIX: error during printer installation. error @error (@error)" ENDIF :end
greetings.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1188 anonymous users online.
|
|
|