Page 1 of 2 12>
Topic Options
#65635 - 2002-05-22 08:03 PM bat file to start my kix file
kennyboy5 Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 11
G'day. I'm just looking for a simple bat file to start my kix script. My kix script works fine but I dont think this initial line in my bat file is:

IF "%OS%" == "Windows_NT" GOTO WinNT

if its win9x then it does this stuff which it is doing.

:WinNT
%WINDIR%\system32\kix32.exe %0\..\start2.kix

The reason I say this is because when I watch the bat file run from the client it shows

IF "" == "Windows_NT" GOTO WinNT

I don't think the first line is working and its going right to the win9x part. It's not grabbing the OS

Thanks Kenny
_________________________
Kennyboy Systems Administrator A+,MCP,CNA, soon CLP

Top
#65636 - 2002-05-22 08:11 PM Re: bat file to start my kix file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It look OK to me. When you do

"%OS%" == "Windows_NT"

it expands %OS% inside the quotes where %OS% doesn't exist and then compares it (==) to "Windows_NT" so you get

"" == "Windows_NT"

which means they are not equal. If it were NT, you'd see

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

Top
#65637 - 2002-05-22 08:12 PM Re: bat file to start my kix file
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Are you getting this result on an NT/W2K/XP client or is it a Win9x client?

%OS% is an environment variable automatically set for computer running NT or higher.

Seeing your whole batch file and a slightly better (more detail) description of what is happening would make it easier for us to understand an potentially result your issue.

{edit} Beat out by Les again. [Roll Eyes]

[ 22 May 2002, 20:18: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#65638 - 2002-05-22 08:15 PM Re: bat file to start my kix file
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
kenny ... boy ...

Here's a standard sorta batch file that kix-off kix32 (ala Bryce) ...

@Echo Off
CLS
ECHO Verifying / Updating Script Software Installation, Please Wait...
IF "%OS%" == "Windows_NT" GOTO WinNT
%windir%\command\XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KX16.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KX32.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KX95.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
ECHO Loading Logon Script, Please Wait...
%windir%\system\kix32.exe %0\..\logon.kix
GOTO End
: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 end
:End


Les, I went looking in the FAQ for this - did I miss it ? If not - this would make a good FAQ me thinx.

-Shawn

[ 22 May 2002, 20:19: Message edited by: Shawn ]

Top
#65639 - 2002-05-22 08:26 PM Re: bat file to start my kix file
kennyboy5 Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 11
Thanks guys. I was using the script that shawn wrote and thats ok but what happens when the person logs in the next time. Isn't the XCOPY gonna try to copy the files again and you'll get a file exists or something cuz they're already there??

Kennyboy
_________________________
Kennyboy Systems Administrator A+,MCP,CNA, soon CLP

Top
#65640 - 2002-05-22 08:28 PM Re: bat file to start my kix file
kennyboy5 Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 11
BTW I'm logging in as a win98 client into 2000 server.

Kennyboy
_________________________
Kennyboy Systems Administrator A+,MCP,CNA, soon CLP

Top
#65641 - 2002-05-22 08:34 PM Re: bat file to start my kix file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Oh Boy! You may be opening a can of worms here...
There are nearly as many versions of this as there are board members. Did you catch Jens' rendition?

Actually it is in the FAQ.
Bryce's Kixtart Starter's Guide

I'm not a fan of copying the files on every logon. I use MCA's iexpress packages but cannot rely on his kix402.ok cookie. I found that even if the package failed, the cookie was dropped. Now I do:

IF NOT EXIST %windir%\kix32.exe GOTO 95_UPDATE
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#65642 - 2002-05-22 08:40 PM Re: bat file to start my kix file
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
The /D switch on XCOPY only copies those files whose source time is newer than the destination time.

We should standardize on an approach.

-Shawn

oh boy les - one more to go !

[ 22 May 2002, 20:42: Message edited by: Shawn ]

Top
#65643 - 2002-05-22 08:47 PM Re: bat file to start my kix file
kennyboy5 Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 11
Most of our clients here are win98 and a couple of 95's and a couple of 2000pro. My kix script is a basic CASE SELECT that checks the OS and then runs IF statements to map drives using INGROUP. The bat file resides on the server and all I want it to do is to go start the kix file. All clients are logging on through the server so the copying of the dll's and the kix32.exe I don't think is necessary on the client computers but correct me if I'm wrong. All I want the bat file is to start the kix file or am I missing a whole lot here??

Kennyboy

Thanks guys
_________________________
Kennyboy Systems Administrator A+,MCP,CNA, soon CLP

Top
#65644 - 2002-05-22 08:58 PM Re: bat file to start my kix file
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Les, wait... save it for a good one [Big Grin]

Kennyboy - no your not missing it.

You can run everything from the NETLOGON without a problem. The reason some members copy to the machine locally is that the .EXE and .DLL functions can respond a little faster (not all that much though on a high speed LAN)

If you don't have any XP systems to worry about you can do it this way.

%0\..\kix32.exe %0..\logon.kix

That should work for your clients.

If you want or need to get fancy with checking the OS type you can use this type of bat file I wrote a while back.

code:
@ECHO OFF
IF NOT "%OS%" == "Windows_NT" GOTO WIN9X
VER|FIND /I "XP" >NUL && IF %ERRORLEVEL% EQU 0 GOTO XP
IF not "%ALLUSERSPROFILE%" == "" GOTO WIN2K
IF "%OS%" == "Windows_NT" GOTO NT4
GOTO END
:XP
ECHO Found Windows XP
REM Or what ever command you want to run.
GOTO END
:WIN2K
ECHO Found Windows 2000
REM Or what ever command you want to run.
GOTO END
:NT4
ECHO Found Windows NT 4
REM Or what ever command you want to run.
GOTO END
:WIN9X
ECHO Found Windows 9x
REM Or what ever command you want to run.
GOTO END
:END




[ 22 May 2002, 21:01: Message edited by: NTDOC ]

Top
#65645 - 2002-05-22 08:59 PM Re: bat file to start my kix file
kennyboy5 Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 11
Quote from Shawn..."oh boy les - one more to go !"

I'm really hoping from this comment that you're not insinuating myself as a 'dumb ass' when it comes to login scripts. I am new at kixtart so sorry for not being a freakin' braniac like yourself. Yes I did read the kix study guide!!DUHH

Never mind shawn (Mr. I know everything) I figure it out on my own. And I'm actually being calm right now. Don't know how a site like this has a guy like you who seem to getoff shuttin' down newbies like myself.

Kennyboy
_________________________
Kennyboy Systems Administrator A+,MCP,CNA, soon CLP

Top
#65646 - 2002-05-22 09:01 PM Re: bat file to start my kix file
kennyboy5 Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 11
Thanks NTDOC, appreciate it

Kennyboy
_________________________
Kennyboy Systems Administrator A+,MCP,CNA, soon CLP

Top
#65647 - 2002-05-22 09:04 PM Re: bat file to start my kix file
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Kenny, you mis-understood, I was refering to Les reaching the 2000th post milestone [Frown]
Top
#65648 - 2002-05-22 09:04 PM Re: bat file to start my kix file
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Whoa! hold on there COWBOY...

Shawn is not bagging on you. He is meaning that if you look at the post count. Les will hit number 2,000 post on his next post. It has nothing to do with you.

I would appologize if I were you. Otherwise you may have a difficult time getting any help here again from this board. Shawn, Les, Myself, Bryce, Radimus, MCA, etc... are among the most helpful here. There are other new guys that are quite helpful as well, but not if you go insulting our Old Fart. [Big Grin]

Top
#65649 - 2002-05-22 09:09 PM Re: bat file to start my kix file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Kenny boy,
NO NO NO! No insinuation. Slow down before you give yourself a wedgee. Shawn was refering to this post being my 2000th.

Sorry DOC,
Unlike you, I couldn't sit on this one for a week waiting for the opportunity to post a profound reply.

So Shawn,
We meet finally in the land of MM.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#65650 - 2002-05-22 09:14 PM Re: bat file to start my kix file
kennyboy5 Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 11
ok sorry for jumpin my sheep. Thanks for the replies and I'm goin' in

Kennyboy out
_________________________
Kennyboy Systems Administrator A+,MCP,CNA, soon CLP

Top
#65651 - 2002-05-22 09:14 PM Re: bat file to start my kix file
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
COOL Congrats Les...

You're a very dilegent poster. I see you got another vote as well today. Shawn has reached the outer limits for votes. a few months ago I thought he was around 24, now he is at 32.. [Eek!]

Well now that I'm around using KiXtart instead of VB for now, maybe I can join your club some day. Not as soon as you did though. You cut in line somewhere [Big Grin]

Thanks again guy for all your help and fun posts.

Top
#65652 - 2002-05-22 09:46 PM Re: bat file to start my kix file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Thanks DOC,
Go figure... I lobbied for you to get another vote so we'd be on par but it didn't happen. [Frown] If I could transfer it I would. You are the more deserving. [Cool]

I've given up on trying to catch Shawn on votes. He's way out of my league.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#65653 - 2002-05-22 10:49 PM Re: bat file to start my kix file
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Continuing the sidebar discussion on how best to ensure the proper KiX files are on the user's PC. I prefer the cookie method. We have a lot of user's who logon via dialup, so every little speed improvement helps.

I did a speed comparison once. The old batch logon scripts took an average of 3-4 minutes longer to run over dialup than my KiX script. w00t!

Top
#65654 - 2002-05-23 05:46 AM Re: bat file to start my kix file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The cookie method is fine, provided the cookie is dropped only on success. MCA's package will drop the cookie even if it fails to drop the binaries. KiXCheck will however, remove the cookie if it fails to find the binaries.
I tried talking MCA into updating KiXCheck to do a CRC to verify the version and/or detect trojans. I also thought a duplicate file checker would be nice. Guess he didn't like my ideas 'cause he stopped answering my emails.

KennyBoy,
Hope the taste of foot doesn't keep you away from our board. Let's have a good laugh and then carry on. NTDOC says you can run KiX from the NetLogon share. Many do, but others have reported that problems were mitigated if KiX is copied to %windir%.

BTW, Shawn really does know everything (almost) [Wink]

P.S. Welcome to the board.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 920 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.074 seconds in which 0.027 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