Page 1 of 1 1
Topic Options
#16871 - 2002-01-30 04:47 PM Compatibility with Windows XP/NT4
David West Offline
Fresh Scripter

Registered: 2002-01-30
Posts: 8
Loc: Croydon, England
Kix 2001 ver 4.02

The Netlogon share on my NT4 DC's contain a user logon script batch file containing the following:

start /b %0\..\wkix32.exe profile.kix


The script runs OK on the NT4 workstations,

but on the XP ones it displays the message:

"Windows cannot open this file"
"File: profile.kix"
"To open this file Windows needs to know which program created it"

Can anyone explain this and tell we the work around?


David West

Top
#16872 - 2002-01-30 04:59 PM Re: Compatibility with Windows XP/NT4
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Try this:

start /b %0\..\wkix32.exe %0\..\profile.kix

Which assumes that both WKIX32.EXE and PROFILE.KIX are in the same \NETLOGON directory

[ 19 July 2002, 17:51: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#16873 - 2002-01-31 02:27 PM Re: Compatibility with Windows XP/NT4
David West Offline
Fresh Scripter

Registered: 2002-01-30
Posts: 8
Loc: Croydon, England
Thanks for the suggestion, but it still gives the same message.

I have found that it will work if you remove the "start /b" from the beginning of the line.

But you then get two command prompt windows open, one for the batch file and another for wkix32 in which you see the script file running, particularly the part where I run robocopy to update files on the local pc.

This is what I am trying to avoid. I want the script to run in the background apart from on screen messages using the AT(x,y) function.

It's strange that the original batch file runs OK on an NT4 workstation, but not on an XP.

I have also tried sending the output of the batchb file to the nul device, i.e

%0\..\wkix32 test.kix >nul but then you don't see anything!

The same thing happens if I try to put the following in the the script:

Run "robocopy x: y: /Mir" >nul

or

Run "robocopy x: y: /mir >nul"

More advice please!

David

Top
#16874 - 2002-01-31 03:56 PM Re: Compatibility with Windows XP/NT4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
david,

could you try (glad you are using wkix!) call wkix32 wit switch /i
it prevents window opening.

cheers,

_________________________
!

download KiXnet

Top
#16875 - 2002-01-31 04:06 PM Re: Compatibility with Windows XP/NT4
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
According to Ruud, WKiX should be launched with start /w to hold it till the script finishes (probably more of a Wintendo compatability thing). But then I have to ask why, if you output to the console, do you use the consoleless WKiX?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#16876 - 2002-01-31 09:22 PM Re: Compatibility with Windows XP/NT4
David West Offline
Fresh Scripter

Registered: 2002-01-30
Posts: 8
Loc: Croydon, England
Thanks for all the suggestions

I'm confused!!

1. Call in a batch file is used to call another batch file, not an exe file. Call in WKIX32 is used to call another script.

Neither call seems to have a /i switch.

Which one is meant?

2. If wkix32.exe is a console-less version why do you need to use Start /B to prevent the creation of another window (page 17 of manual)

The (edited) script I am trying to run is as follows:

color n/n
run "Robocopy.exe \\server\share\directory c:\directory /MIR /sec /r:1 /w:5"
sleep 5
COLOR N/Y+
AT(12,15) "Files Downloaded OK"
SLEEP 10
COLOR N/N

I want the download using robocopy to happen without the file names being displayed on the screen. All the user should see is the AT message, displayed in black on a yellow background, when the download has finished.

Is there a better way?

David

Top
#16877 - 2002-01-31 09:34 PM Re: Compatibility with Windows XP/NT4
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
shell "%COMSPEC% /e:1024 /c start /min /wait Robocopy.exe \\server\share\directory c:\directory /MIR /sec /r:1 /w:5 >NUL"

will copy the file without anything displayed on the screen. Additionally, the script will wait for ROBOCOPY to finish before contimuing with the script, thereofre you won't need the SLEEP 5 command.

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

Top
#16878 - 2002-02-01 03:55 AM Re: Compatibility with Windows XP/NT4
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Jens' last SHELL example will suppress the output, but I would suggest that single quotes be used on the outside and double quotes around the robocopy parameters if there's any chance the parameters could include spaces.

In so far as the consoleless WKiX, as long as there's no output to the console, it should not bring up a DOS box. You do however output to the console so there's no point in running the consoless version. Also, you launch from a batch file , so a DOS box is already generated. I did not suggest you not use /b but rather that you use KiX32 so as to avoid the /w.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#16879 - 2002-07-18 07:03 PM Re: Compatibility with Windows XP/NT4
RDMMI Offline
Fresh Scripter

Registered: 2002-06-20
Posts: 7
Loc: Alabama, USA
Since running a script with kix32, wkix32, and wkix32 /i
have difference reactions, wouldn't it be a good idea
to have different file extensions and associations for
each? E.g., *.kix for kix32, *.kiw for wkix32, and
*.kii for wkix32 /i.

That way we could be sure the script is being run in
the way it was intended.

Top
#16880 - 2002-07-18 07:25 PM Re: Compatibility with Windows XP/NT4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mmm...
actually wkix does not open any console window unless your script says so.
this means that if you have output in your script like "hello everyone!" , it will create a console.
this can be overriden with the I-switch.
it's more like helper for such a coder who does not want to spend time removing the function output values.

what comes to extensions, you can call them what you like, as they are your scripts, right?
but I'm a dreamer and I dream that I will see a day when *.dll and kix32.exe is removed from kix package as needless (usable maybe though).
that's also why I will also keep calling my scripts *.kix -wkix-scripts

cheers,
_________________________
!

download KiXnet

Top
#16881 - 2002-07-18 09:03 PM Re: Compatibility with Windows XP/NT4
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Back to the original problem:
code:
start /b %0\..\wkix32.exe profile.kix

%0 is translated differently in Windows XP and cannot be used this way. For Windows NT/2000/XP, you could use
code:
start /b wkix32.exe profile.kix

since only Windows 9x requires %0\..\.

[ 18 July 2002, 21:18: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#16882 - 2002-07-18 09:12 PM Re: Compatibility with Windows XP/NT4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
goody jens!

and you can use z:\ for win9x too...

this was good info.
_________________________
!

download KiXnet

Top
#16883 - 2002-07-23 09:45 PM Re: Compatibility with Windows XP/NT4
RDMMI Offline
Fresh Scripter

Registered: 2002-06-20
Posts: 7
Loc: Alabama, USA
> actually wkix does not open any console window
> unless your script says so.
> this means that if you have output in your script
>like "hello everyone!" , it will create a console.
> this can be overriden with the I-switch.

I had the .kiw extension associated with:

\WINNT\WKIX32.EXE "%1"

and when used with a script run from a shortcut on the desktop consisting only of a messagebox() I got the flash of a console when the script ended.

Adding the /I to it via:

\WINNT\WKIX32.EXE "%1" /I

got it to run with no flash.

Top
#16884 - 2002-07-23 09:49 PM Re: Compatibility with Windows XP/NT4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it did do that with older versions of wkix...
but making $=messagebox(...)
does not produce a console with them either
_________________________
!

download KiXnet

Top
#16885 - 2002-07-23 09:52 PM Re: Compatibility with Windows XP/NT4
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well then you did in fact output to the console. Otherwise, the DOS box wouldn't of flashed. Probably the return code of the MessageBox() function.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#16886 - 2002-07-23 10:22 PM Re: Compatibility with Windows XP/NT4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
to be more specific, all versions priop 4.11 produce console window if not function output is set to variable...

in 4.11 the empty output handling is changed to be the same as with no output at all.
_________________________
!

download KiXnet

Top
#16887 - 2002-07-23 10:23 PM Re: Compatibility with Windows XP/NT4
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
This change of behavior has been documented in the KiXtart 4.11 Beta manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#16888 - 2002-07-23 11:09 PM Re: Compatibility with Windows XP/NT4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
obviously...
_________________________
!

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 323 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.068 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