Page 1 of 1 1
Topic Options
#50101 - 2000-05-30 10:07 PM Someone want to test this for me
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I don't have any 95 machines to test this on, and NT doesn't return an error on this.

this is the batchfile that call the kix script. NT machines do not display the %os% variable error but 95 clients do.

this is the original version

@echo off
cls
xcopy \\Server\Share\kix32.exe %windir% /d >nul
If %os%==Windows_NT goto script
xcopy \\Server\Share\kx32.dll %windir% /d >nul
xcopy \\Server\Share\kx16.dll %windir% /d >nul
:script
%windir%\kix32.exe \\Server\Share\logon.kix

this is what I would like to test:

@echo off
cls
xcopy \\Server\Share\kix32.exe %windir% /d >nul
If %os%==Windows_NT goto script 2>nul
xcopy \\Server\Share\kx32.dll %windir% /d >nul
xcopy \\Server\Share\kx16.dll %windir% /d >nul
:script
%windir%\kix32.exe \\Server\Share\logon.kix

Notice the 2>nul in the above script. I'm hoping that this would suppress the syntax error message that 95 displays

Thanks for your help

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#50102 - 2000-05-31 02:50 AM Re: Someone want to test this for me
Anonymous
Unregistered


Hi Radimus,

You better can use the following macro:

If @InWin = 1 ; it's WinNT alright
Goto "NT code"
Endif.


GoodLuck,

Jos.

Top
#50103 - 2000-05-31 05:41 AM Re: Someone want to test this for me
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Yes I know all about @inwin, but I need something on the batchfile side BEFORE kixtart runs.

The batchfile works fine and does what it is supposed to do, but it generates a syntax error on the 95 clients (before Kix runs). I am trying to suppress that error message

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#50104 - 2000-05-31 06:31 AM Re: Someone want to test this for me
Anonymous
Unregistered


Hi,

That is because Win9X clients don't have a variable like %os% unless it is defined in the autoexec.bat. Maybe you can do something with the DOS variable %TEMP%. For Win9X clients is the default path C:\Windows\Temp while de default NT %TEMP% variable = C:\Temp.

Hope's this helps.

Jos.

Top
#50105 - 2000-05-31 07:13 AM Re: Someone want to test this for me
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Radimus,

ever thought of :
IF ver=="Windows NT Version 4.0" GOTO NT
.
.
Code for Win95

:NT

_________________________



Top
#50106 - 2000-05-31 07:55 AM Re: Someone want to test this for me
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
@Echo Off
If "%os%"=="Windows_NT" goto NT
Echo 95
GoTo End
:NT
Echo NT
:End

This will branch correctly in both NT and 95, and do not produce a syntax error in 95

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 373 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.052 seconds in which 0.024 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