Page 1 of 1 1
Topic Options
#15402 - 2001-12-20 11:00 AM Win2000 and Win95 compatibility
Showdown Offline
Fresh Scripter

Registered: 2001-12-20
Posts: 7
Question:

On my domain I use a logon.bat with the following content;

@ECHO OFF
%0\..\kix32.exe file.kix

On Win95 it seems to work fine, but the scripts won't run properly on win2k.

What do I forgot or what do I have to do to make it run properly?

_________________________
[b]Why do it the easy way while you can do it the hard way?[/b]

Top
#15403 - 2001-12-20 11:06 AM Re: Win2000 and Win95 compatibility
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that syntax looks fine to me.
How you noticed that it won't run properly?
the simpliest difference between these two is that w2k runs logonscripts minimized by default.
is this the problem in your case?

cheers and wellcome on board.

_________________________
!

download KiXnet

Top
#15404 - 2001-12-20 11:35 AM Re: Win2000 and Win95 compatibility
Showdown Offline
Fresh Scripter

Registered: 2001-12-20
Posts: 7
Thx for the quick reply.

This is the script I run during my experiments!
----------------------
$result = SETCONSOLE("MAXIMIZE")

MESSAGEBOX ("text" , "text")

exit
----------------------

On W95 I get a very nice messagebox.
On W2k I see the following message:

"CMD.EXE was started with '\\athena\c$\WINNT\system32\Repl\Import\Scripts' as the
current directory path. UNC paths
are not supported. Defaulting to Windows directory.
Script error : failed to find/open script !

Somewhere I read about different kinds of using logonscripts. Something about running a batchscript for W95 and something about running kix32 directly as logonscript.

BUT! I want to use only one logon.bat which I can use for both W95 en W2k.

_________________________
[b]Why do it the easy way while you can do it the hard way?[/b]

Top
#15405 - 2001-12-21 12:31 AM Re: Win2000 and Win95 compatibility
Showdown Offline
Fresh Scripter

Registered: 2001-12-20
Posts: 7
Hehehe

I found the problem to my solution...urhm ...solution to my problem that is.

Somehow W95 is intelligent enough to work his way through UNC mappings (%0\..\) while W2k just loses his way.

For W95 I just entered the name for the logonscript in the usermanager.
Though....for W2k you also have to enter a path (user profile path) to a DC with your kix32 and logonscripts.

But still thx Lonkero also thx for ur welcome btw! I guess u will see me here again!

_________________________
[b]Why do it the easy way while you can do it the hard way?[/b]

Top
#15406 - 2001-12-20 01:02 PM Re: Win2000 and Win95 compatibility
Flavien Offline
Getting the hang of it

Registered: 1999-07-21
Posts: 95
Loc: Geneva, Switzerland
Try this:

code:

@Echo Off
If Not Exist %WinDir%\kix32.exe Goto Next
%WinDir%\kix32.exe %0\..\yourscript.kix
Goto End

:Next
%0\..\kix32.exe %0\..\yourscript.kix

:End


This is the must-have batch!

Top
#15407 - 2001-12-20 01:26 PM Re: Win2000 and Win95 compatibility
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
this error you got really is win2k related.
but I never got it with calling my script.

and what comes to my userprofile settings there is only:
pistal

which stands for pistal.bat on netlogon share and it works a charm too.

to that error. w2k command interpreter indeed does not support to be started at unc bath so that's why you should use %comspec% standard instead.

but, my pure quess is that you have written in the users logonscript field something like:
command /c my.bat

right?
or cmd?
then it tries to start the interpreter wherever you are at the time which is during logon process (unless you change directory) at netlogon share, which it does not allow.

are my quessings right or am I just shooting in the air???

_________________________
!

download KiXnet

Top
#15408 - 2001-12-20 01:39 PM Re: Win2000 and Win95 compatibility
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hello Showdown,

Please post your complete LOGON.BAT and LOGON.KIX script file. It will make it much easier to see what is going on.

Top
#15409 - 2001-12-20 01:58 PM Re: Win2000 and Win95 compatibility
Showdown Offline
Fresh Scripter

Registered: 2001-12-20
Posts: 7
Well, you may just Shoot me!!!

I kept everything the same, only I threw away my login path an NOW it seems to work fine. Everyscript I use now is working alright.

I don't get it!
Eventually nothing really changed BUT...it is working.

Thx for all your replies!
I still learned from it, 'cause I don't know that much of kix32 anyway.

_________________________
[b]Why do it the easy way while you can do it the hard way?[/b]

Top
#15410 - 2001-12-20 02:06 PM Re: Win2000 and Win95 compatibility
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yeah.
so understood/quessed right your situation.
nice to here that you found solution.
_________________________
!

download KiXnet

Top
#15411 - 2001-12-20 02:29 PM Re: Win2000 and Win95 compatibility
Showdown Offline
Fresh Scripter

Registered: 2001-12-20
Posts: 7
Lonkero What did u meant by
quote:
that's why you should use %comspec% standard
?

Flavien I'm using ur code now, but what does the part %WinDir% mean?

[b]NTDOC[b] I'll keep ur advice in mind!
Only for now it isn't neccesary anymore cause it's working!

_________________________
[b]Why do it the easy way while you can do it the hard way?[/b]

Top
#15412 - 2001-12-20 03:21 PM Re: Win2000 and Win95 compatibility
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
quote:
but, my pure quess is that you have written in the users logonscript field something like:
command /c my.bat


like you then said:
quote:
I kept everything the same, only I threw away my login path an NOW it seems to work fine.

anyway...
what comes to %comspec% it is environment variable existent in every windows version.
it points to command interpreter, wherever it is. and that way, when command.com or nt/w2k cmd.exe is called it is preferred to call %comspec%-variable.

flaviens code is then whole different and has no affect on your batch execution unless you have some machines that have kix32 in windows directory on local machine.
%windir% is also a pointer and it points to your workstations systemdirectory.
in nt and w2k there is also alias to this, %systemroot%

so as I've understood it, there was nothing wrong in the first place in your scripts, but the calling to the batch was wrong.

_________________________
!

download KiXnet

Top
#15413 - 2001-12-20 06:28 PM Re: Win2000 and Win95 compatibility
Showdown Offline
Fresh Scripter

Registered: 2001-12-20
Posts: 7
Yeps, you're absolutely right there.

Well??? Am I a newbie or a Newbie, or what?

_________________________
[b]Why do it the easy way while you can do it the hard way?[/b]

Top
#15414 - 2001-12-21 01:10 PM Re: Win2000 and Win95 compatibility
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
who knows...
maybe you're both
but time can change that.
_________________________
!

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

Generated in 0.062 seconds in which 0.023 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