Page 2 of 2 <12
Topic Options
#27828 - 2002-12-03 02:53 PM Re: script error: failed to find/open script
Addict Offline
Getting the hang of it

Registered: 2002-08-22
Posts: 62
Loc: Ohio, US
sealeopard,
Your batch does work in Win9x as well as Win2k. I know because I based my batch file off of it. [Wink]

Seems like alot of older threads are getting dug up lately.

Top
#27829 - 2002-12-03 02:58 PM Re: script error: failed to find/open script
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear Lonkero,

Some things are on our TO-DO list about it. We are waiting for some feedback.

To stop a possible "security" problem script can be
code:
@echo off
%0\..\kix412update.exe /q
if exist %windir%\kix32.exe %windir%\kix32.exe %0\..\your_script.kix
if not exist %windir%\kix32.exe %0%\..\kix32.exe %0\..\your_script.kix
@echo off

For us it isn't a real problem when people are hacking the OK file.
Mostly the user doesn't get the right environment.
Don't forget that it is always possible for organizations to dictate how people
should use computers. So everybody knows what the DO's and DON'Ts are. So every-
body knows what can happen, when he is doing things agains company policy.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#27830 - 2002-12-03 03:07 PM Re: script error: failed to find/open script
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
MCA,

We see a potential issue with %0\..\ under XP.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318689

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#27831 - 2002-12-03 03:12 PM Re: script error: failed to find/open script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
My batch file has been slightly modified and works with Windows 9x/NT/2000/XP
code:
@ECHO OFF
CLS

ECHO Verifying / Updating Login Script

REM set KiXtart version
SET KIXVER=KIXTART.412

REM detect the operating system and go to the appropriate segment

VER | find "2000" > nul
IF not errorlevel 1 GOTO Win_2K

VER | find "NT" > nul
IF not errorlevel 1 GOTO Win_NT

VER | find "XP" > nul
IF not errorlevel 1 GOTO Win_XP

VER | find "98" > nul
IF not errorlevel 1 GOTO Win_98

VER | find "95" > nul
IF not errorlevel 1 GOTO Win_95

VER | find "Millennium" > nul
IF not errorlevel 1 GOTO WIN_ME

GOTO DOS

REM client is running DOS
:DOS
ECHO.
ECHO No Login Script Available For DOS Clients
ECHO.
GOTO End

REM client is running Windows 9x
:Win_95
:Win_98
:Win_ME
ECHO.
ECHO Checking KiXtart files for Windows 95/98/ME
ECHO.
REM the DEL command removes any KiXtart file from the %WINDIR%\SYSTEM directory

%WINDIR%\COMMAND\XCOPY %0\..\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL
%WINDIR%\COMMAND\XCOPY %0\..\WKIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL
%WINDIR%\COMMAND\XCOPY %0\..\KX*.DLL %WINDIR%\ /D /H /I /R /V /C >NUL
%WINDIR%\COMMAND\XCOPY %0\..\%KIXVER% %WINDIR%\ /D /H /I /R /V /C >NUL

GOTO Run9xScript

REM client is running Windows NT/2000/XP
:Win_NT
:Win_2K
:Win_XP
ECHO.
ECHO Checking KiXtart files for Windows NT/2000/XP
ECHO.
REM the DEL command removes any KiXtart file from the %WINDIR%\SYSTEM32 directory

ECHO y| XCOPY %LOGONSERVER%\NETLOGON\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL >NUL
ECHO y| XCOPY %LOGONSERVER%\NETLOGON\WKIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL >NUL
ECHO y| XCOPY %LOGONSERVER%\NETLOGON\%KIXVER% %WINDIR%\ /D /H /I /R /V /C >NUL >NUL

GOTO RunScript

REM run the logon script for Windows NT/2000/XP
:RunScript
ECHO Loading Logon Script for Windows NT/2000/XP, Please Wait...
ECHO.

REM check whether Kixtart is installed locally
IF EXIST %WINDIR%\%KIXVER% GOTO LocalExe
IF EXIST %LOGONSERVER%\NETLOGON\%KIXVER% GOTO RemoteExe
GOTO KiXtartError

REM Kixtart is installed locally
:LocalExe
%WINDIR%\KIX32.EXE %LOGONSERVER%\NETLOGON\LOGIN.KIX
GOTO End

REM Kixtart is not installed locally
:RemoteExe
%LOGONSERVER%\NETLOGON\KIX32.EXE %LOGONSERVER%\NETLOGON\LOGIN.KIX
GOTO End

REM run the logon script for Windows 95/98/ME
:Run9xScript
ECHO Loading Logon Script for Windows 95/98/ME, Please Wait...
ECHO.

REM check whether Kixtart is installed locally
IF EXIST %WINDIR%\%KIXVER% GOTO 9xLocalExe
IF EXIST %0\..\%KIXVER% GOTO 9xRemoteExe
GOTO KiXtartError

REM Kixtart is installed locally
:9xLocalExe
%WINDIR%\KIX32.EXE %0\..\LOGIN.KIX
GOTO End

REM Kixtart is not installed locally
:9xRemoteExe
%0\..\KIX32.EXE %0\..\LOGIN.KIX
GOTO End

:KiXtartError
REM Display an error message and notify the Systems Administrator since the user won't be doing it anyway
ECHO.
ECHO Error loading the NMRC-NT logon script
ECHO.
ECHO Please notify the Systems Administrator!
ECHO.
NET SEND REDPOINT "Error loading the NMRC-NT logon script for user "%USERNAME%" on computer "%COMPUTERNAME% >NUL >NUL
PAUSE
GOTO End

:End
REM remove KiXtart version
SET KIXVER=

ECHO.
ECHO.
ECHO Finishing Login...

@ECHO OFF
CLS
EXIT 0



[ 03. December 2002, 15:15: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#27832 - 2002-12-03 03:34 PM Re: script error: failed to find/open script
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear Kent,

Thanks for the info.

Actual our scripts were prepared with the great kixcrypt tool.
So our real BATch file is very short.
code:
@echo off
%0\..\kix412update.exe /q
%0\..\your_script.exe
@echo off

We had encrypt with kixcrypt our "your_script.kix" to "your_script.exe".
So Kent, we weren't confrontated with above XP info.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 2 of 2 <12


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

Who's Online
0 registered and 883 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.054 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

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