#33101 - 2002-11-26 03:21 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Before you do something special for Windows ME, tell us what error you get when the USE statement executes. It is better to understand the error and resolve it than attempt to generate more code that may or may not get around the error. [ 26. November 2002, 03:22: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#33103 - 2002-11-26 03:25 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Damn, I hate those batch files.
Lonkero is correct you do not have a case that FINDs Windows ME. The code sends a WinME client to the bit butcket. [ 26. November 2002, 03:25: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#33104 - 2002-11-26 03:25 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Pech
Getting the hang of it
Registered: 2002-10-16
Posts: 61
Loc: Thailand
|
code:
IF "%OS%" == "Windows_NT" MapDrive("h:", "bstl_svr3", "%username%$") ? "mapping h: to homeshare: " else MapDrive("h:", "bstl_svr3", "@USERID$") ? "mapping h: to homeshare: "
--------------------------------
^But Windows ME cann't map any drive! How to do? Pech [ 26. November 2002, 03:27: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#33106 - 2002-11-26 03:28 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Your batch file is wrong. See above. A WIndows ME computer never executes your KiXtart script.
|
Top
|
|
|
|
#33109 - 2002-11-26 03:33 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
On the outside chance that this does not confuse the issue more.
I find that for starting up the KiXtart script I only need to determine if the client computer is Win9x (Win95, Win98, WinME) or NT (NT4, W2K, XP). The reason one needs to make this determination is so that the proper KiXtart file(s) can be copied to the client.
The following code has served me well and does not need to be updated when a new operating system name comes out.
code:
:: Determine OS IF '%OS%'=='Windows_NT' GOTO WinNT
SET windir= SET windir= IF '%windir%'=='' SET OS=DOS IF '%OS%'=='' IF '%windir%'=='' SET OS=Windows_3.x IF '%OS%'=='' SET OS=Win9x IF '%OS%'=='Win9x' GOTO Cont
echo DOS and Windows 3.x are not supported! pause goto End
The code works based on protected environment variable of each type of operating system. [ 26. November 2002, 03:38: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#33112 - 2002-11-26 03:47 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Pech, I have written this batch file for you to try. It should do everything you need and launch your KiXtart script file.
We find that copying the KiXtart files to the client improves performance and increases stability on Win9x computers.
code:
echo off
:: Determine OS IF '%OS%'=='Windows_NT' GOTO WinNT
SET windir= IF '%windir%'=='' SET OS=DOS IF '%OS%'=='' IF '%windir%'=='' SET OS=Windows_3.x IF '%OS%'=='' SET OS=Win9x IF '%OS%'=='Win9x' GOTO Cont
echo DOS and Windows 3.x are not supported! pause goto End
:WinNT Xcopy /D %LOGONSERVER%\NETLOGON\kix32.exe %TEMP%\Kix32.exe %TEMP%\kix32.exe %LOGONSERVER%\NETLOGON\RunScript.kix
goto end
:Win9X Xcopy /D %0\..\kix32.exe %windir%\Kix32.exe Xcopy /D %0\..\kx32.dll %windir%\kx32.dll Xcopy /D %0\..\kx16.dll %windir%\kx16.dll Xcopy /D %0\..\kx95.dll %windir%\kx95.dll
%windir%\kix32.exe %0\..\RunScript.kix
:end exit
[ 26. November 2002, 03:55: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#33113 - 2002-11-26 05:02 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
Top
|
|
|
|
#33114 - 2002-11-26 05:09 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Pech
Getting the hang of it
Registered: 2002-10-16
Posts: 61
Loc: Thailand
|
Windows ME use and run same as Windows 9x But Windows ME cann't map any drive!
Pech
|
Top
|
|
|
|
#33116 - 2002-11-26 05:13 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
1) Did you change your batch file to find Windows ME?
2) Did you try my batch file that was posted?
3) Does the KiXtart script execute at all for a Windows ME computer?
4) If the script does execute, what error is shown when MapDrive executes?
Answer these questions before you do anything else.
|
Top
|
|
|
|
#33117 - 2002-11-26 05:21 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Pech
Getting the hang of it
Registered: 2002-10-16
Posts: 61
Loc: Thailand
|
How to? check ME
PEch
|
Top
|
|
|
|
#33118 - 2002-11-26 05:30 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
This is your code that checks for each operating system:
code:
VER | find "NT" > nul IF not errorlevel 1 GOTO Win_NT
VER | find "2000" > nul IF not errorlevel 1 GOTO Win_NT
VER | find "XP" > nul IF not errorlevel 1 GOTO Win_NT
VER | find "98" > nul IF not errorlevel 1 GOTO Win_9X
VER | find "95" > nul IF not errorlevel 1 GOTO Win_9X
You will need to execute VER on a Windows ME computer to see what is displayed and add code similar to that above for Windows ME.
OR
You can use the batch file code I posted a few messages ago.
|
Top
|
|
|
|
#33119 - 2002-11-26 05:40 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Pech
Getting the hang of it
Registered: 2002-10-16
Posts: 61
Loc: Thailand
|
Can I use this or not? for check Windows ME
VER | find "ME" > nul IF not errorlevel 1 GOTO Win_9X
Pech
|
Top
|
|
|
|
#33120 - 2002-11-26 05:41 AM
Re: I got Error code : 1208 when I run my script to map drive
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Pech,
Here are two ways to do this...
JSI Tip 4995. Logon scripts that run in Windows XP may not work if %0 or %0\..\ is used in the script?
Otherwise: code:
VER | find "NT" > nul IF not errorlevel 1 GOTO Win_NT
VER | find "2000" > nul IF not errorlevel 1 GOTO Win_NT
VER | find "XP" > nul IF not errorlevel 1 GOTO Win_NT
VER | find "Me" > nul IF not errorlevel 1 GOTO Win_9X
VER | find "98" > nul IF not errorlevel 1 GOTO Win_9X
VER | find "95" > nul IF not errorlevel 1 GOTO Win_9X
HTH,
Kent
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 382 anonymous users online.
|
|
|