Page 1 of 1 1
Topic Options
#42691 - 2003-07-11 12:19 AM script doesn't run everytime in win 98
dsjk Offline
Fresh Scripter

Registered: 2003-07-10
Posts: 6
Loc: DK
Hi

I use the same script for all the computers (winxp / win98 / win95. I am not running on a domain, but have a win xp mashine as server.
On the machines with win xp I have used the profil in Computer management to run scripts, which is working fine, but on win98 I have created a bat file - dropped a shortcut into start:
@ECHO OFF
%0\..\kix32.exe script

which is located at c:\netlogon where alle the files are.
When I log in I can see it runs the script but it does not map any drives, if I then run the bat file again, the drives are mapped?

Script:
IF @WUserID="SIMON" or @WUserID="SS"
SET "BRUGER=SIMON"
use f: "\\server-fil\home\simon"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
use lpt1: "\\server-fil\hp8100"
ENDIF
IF @WUserID="KENNETH" or @WUserID="KL"
SET "BRUGER=KL"
use f: "\\server-fil\home\kl"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
use lpt1: "\\server-fil\hp8100"
ENDIF
IF @WUserID="MOGENS" or @WUserID="MK"
SET "BRUGER=MOGENS"
use f: "\\server-fil\home\mogens"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
use lpt1: "\\server-fil\hp8100"
ENDIF
IF @WUserID="LOTTE" or @WUserID="LB"
SET "BRUGER=LOTTE"
use f: "\\server-fil\home\lotte"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
use lpt1: "\\server-fil\hp8100"
ENDIF
IF @WUserID="JOAN" or @WUserID="JW"
SET "BRUGER=JOAN"
use f: "\\server-fil\home\joan"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
use lpt1: "\\server-fil\hp8100"
ENDIF
IF @WUserID="LØN" @WUserID="LON"
SET "BRUGER=LON"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
use lpt1: "\\server-fil\hp8100"
ENDIF
IF @WUserID="KUV"
SET "BRUGER=KUV"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
ENDIF
IF @WUserID="ADMIN"
SET "BRUGER=KL"
use f: "\\server-fil\home"
use t: "\\server-fil\mailing"
use z: "\\server-fil\sys"
use lpt1: "\\server-fil\hp8100"
ENDIF

What is wrong?

regards
Kenneth

Top
#42692 - 2003-07-11 12:44 AM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
now, how you run the bat-file?
do you click on the shortcut in the startmenu or do you run it directly?
_________________________
!

download KiXnet

Top
#42693 - 2003-07-11 12:46 AM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and how you know that the script runs?
it has no output so knowing that the bat runs does not mean that the script is running.

as a matter of fact, I would recommend you skip the bat totally and create a shortcut to startup pointing directly to kixtart.
_________________________
!

download KiXnet

Top
#42694 - 2003-07-10 03:08 PM Re: script doesn't run everytime in win 98
dsjk Offline
Fresh Scripter

Registered: 2003-07-10
Posts: 6
Loc: DK
The bat file has a shortcut in the start menu, and when I run it again, the drives are mapped.

I have tried to run "kix32.exe script" direcly in the start menu.

I am sure it runs the script, because it opens a dospromt, with the name kix32.

Can I stop the script in the middle with a command?

Kenneth

Top
#42695 - 2003-07-10 03:14 PM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sure you can.
ctrl+c

anyway, I see indications that your script is not actually ready yet:
code:
IF @WUserID="LØN" @WUserID="LON"

once you make it ready, you could add something as output so the script will indicate what it is doing at what point.
code:
  ? "script started"
...
? "this user: @wuserid detected"
use g: ...
? "drive g mapped to ..."
...
...
? "script ended"

this way you see what it is doing and does it hang or does it execute properly.
_________________________
!

download KiXnet

Top
#42696 - 2003-07-10 03:29 PM Re: script doesn't run everytime in win 98
dsjk Offline
Fresh Scripter

Registered: 2003-07-10
Posts: 6
Loc: DK
ok, I'll try it tomorrow.

Instéad og ctrl+c can I type something in the script, that pause the script?

Kenneth

Top
#42697 - 2003-07-10 03:37 PM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes, if you have build the routine to do so.
something like:
code:
"doing script execution... type any char"
sleep 5 ;faked execution
if kbhit
get $in
"you typed:" $in
else
"no input"
endif

get $

_________________________
!

download KiXnet

Top
#42698 - 2003-07-10 11:21 PM Re: script doesn't run everytime in win 98
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I think you're looking more for a DEBUG ON, put this into the first line of your script and you can step through the manual. This is also covered in the KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#42699 - 2003-07-12 01:29 PM Re: script doesn't run everytime in win 98
dsjk Offline
Fresh Scripter

Registered: 2003-07-10
Posts: 6
Loc: DK
Still, doesn't work [Confused]

I have added :

? "script started"
? "this user: @wuserid detected"
And can see that it enters the right "if ..."

There is one thing more though.

On the server, I have shared a folder "f" as home, in the home folder I have 5 folders so far:
joan, simon, kl and so on.
On win98, I have a problem with this line:
use f: "\\server-fil\home\joan"

it is mapping drive f to \\server-fil\home instead.

The debugger doesn't says anything.

regards
Kenneth

Top
#42700 - 2003-07-12 01:59 PM Re: script doesn't run everytime in win 98
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Wintendos cannot deep map. This has been discussed a gazilion times.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#42701 - 2003-07-12 03:23 PM Re: script doesn't run everytime in win 98
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Adn it is even mentioned in the KiXtart Manual.

And you should also be aware of the fact that workstation operating systems are limited to a maximum of 10 connections at a time.

As I said before, put a DEBUG ON into the first line of your code.

Also, I hope you realize that your users will need identical user accounst on all computers, meaning bot username and password must be identical on all machines.

And you should ratehr use ADDPRINTERCONNECTION instead of USE to add the printers. However, Windows 9x does not support automatic printer installs, thus you will have to add the drivers manually anyway. You cna also move the statement to outside the IF-ENDIFs as you do it anyway for all users.

Finally, convert the IF-ENDIFs into a single SELECT-CASE-ENDSELECT and read the KiXtart Manual to under stand the diffeence between those two.
_________________________
There are two types of vessels, submarines and targets.

Top
#42702 - 2003-07-12 04:28 PM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
winxp as server...
I think I suggest you something.
in your situation you have always ability to buy NTserver license [Big Grin]

or, either buy a cheep 1000$ server with linux and samba preinstalled.
or even pre-configured.
or even do it yourself.

you get it all with a price of hardware and kixtart scripts there and free nt-domain if you want.

but your current setup is far from easy maintenance and reliability.
_________________________
!

download KiXnet

Top
#42703 - 2003-07-16 08:32 AM Re: script doesn't run everytime in win 98
dsjk Offline
Fresh Scripter

Registered: 2003-07-10
Posts: 6
Loc: DK
In the long run, we are planning to buy a "real" server.

Thing it is working now.

Can I run a check that if use list is empty then do something?

regards
Kenneth

Top
#42704 - 2003-07-16 08:38 AM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
could you tell what you mean if use list is empty?

is it like, if any of the if's does not match?
_________________________
!

download KiXnet

Top
#42705 - 2003-07-17 12:43 AM Re: script doesn't run everytime in win 98
dsjk Offline
Fresh Scripter

Registered: 2003-07-10
Posts: 6
Loc: DK
Hi

I mean that if I run a use list at the end, end is haven't mapped any drives, then is should run the script again.

It is not if it hasn't been into any of the if, just general.

Top
#42706 - 2003-07-17 12:56 AM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
uh?
now, may I ask what for is that?
if your script is ran and it should map, it also maps.
if it doesn't, there is error.
you can trap errors.
but checking if any network mapping has occured...
well, it's harder and the info does not help you.
as, if the user would need 3 maps and gets only 1, the mapping is unsuccesfull.
_________________________
!

download KiXnet

Top
#42707 - 2003-07-16 03:55 PM Re: script doesn't run everytime in win 98
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You can alwasy evaluate error codes after each mapping, e.g.
code:
use x: '\server\share'
if @ERROR
$rc=sendmessage(@WKSTA,'Error '+@ERROR+' - '+@SERROR')
endif

_________________________
There are two types of vessels, submarines and targets.

Top
#42708 - 2003-07-16 09:29 PM Re: script doesn't run everytime in win 98
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
thanks jens for being there.
I couldn't bring out that part properly.
_________________________
!

download KiXnet

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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.145 seconds in which 0.076 seconds were spent on a total of 12 queries. Zlib compression enabled.

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