Pech
(Getting the hang of it)
2002-11-21 03:45 AM
I got Error code : 1208 when I run my script to map drive

I got an error code: 1208 when I run script to map drive. but I wait a few minute and try to run script by manual it works-no any error.
An error occurred with Windows XP, 2000 client only. In Windows 9X doesn't error.

----------------------------------------
PLogon.bat
----------------------------------------
rem ::SETLOCAL
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

GOTO unknown_os

:win_NT
@TITLE Company A / Company B NT Logon Script
ECHO HELLO %USERNAME%!
Echo Welcome to %USERDOMAIN%, Inc. NT Domain Environment

%LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\PLogonNT.kix

goto end

:win_9X

%LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\PLogon9x.kix
exit
------------------------------------------

PLogon9X.kix
------------------------------------------
? "Setting Win9x variables...please, wait."
SHELL "winset.exe USERNAME=@USERID"

use "*" /delete
? "Map Network drive (User)..."
use h: "\\bstl_svr3\@USERID$"

IF Ingroup ("MK11") = 1
use i: "\\bstl_svr3\DocMK11$ /no"
use j: "\\bstl_svr3\ShareDoc /no"
ENDIF
exit
-----------------------------------------------

PLogonNT.kix
------------------------------------------
? @kix
? @dos
? @ldrive
use "*" /delete
? "delete persistent mappings: " @error
use h: "\\bstl_svr3\%username%$"? "mapping h: to homeshare: " @error
IF Ingroup ("EDPADMIN") = 1
use i: "\\bstl_svr3\DocEDP$"? "mapping i: to groupshare: " @error
shell "\\bstl_svr1\ofcscan\autopcc.exe"
ENDIF
? "logonscript ran"
?? "press any key to close window"
get $
-----------------------------------------------

Please help me again.

Pech


Howard Bullock
(KiX Supporter)
2002-11-21 03:48 AM
Re: I got Error code : 1208 when I run my script to map drive

What's this:

use i: "\\bstl_svr3\DocMK11$ /no"
use j: "\\bstl_svr3\ShareDoc /no"

Please chack the docs on proper syntax. If that is not the issue please post again.

use i: "\\bstl_svr3\DocMK11$"

[ 21. November 2002, 03:48: Message edited by: Howard Bullock ]


Sealeopard
(KiX Master)
2002-11-21 03:52 AM
Re: I got Error code : 1208 when I run my script to map drive

You might also need to double up those '$' signs, depending on KiXtart version.

Howard Bullock
(KiX Supporter)
2002-11-21 03:54 AM
Re: I got Error code : 1208 when I run my script to map drive

Try this UDF. Unless you grab WriteLog() from the UDF Collection, you will need to comment out that line.

code:
Function MapDrive($Drive, $Server, $Share)
Dim $Drive, $Server, $Share
Color c+/n
If $Drive<>"" and $Server<>"" and $Share<>""
$LogText="Connecting $Drive to \\$Server\$Share"
? $LogText
USE $Drive /Delete /Persistent
USE $Drive "\\$Server\$Share"
If @error=0
color g+/n
$x=" - Success"
"$x"
Else
color r+/n
$x=" - Failed: Error @error"
"$x"
$ErrorState=1
Endif
WriteLog ($LogText + $x)
Color w+/n
Else
WriteLog ("Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'")
Endif
Endfunction



Pech
(Getting the hang of it)
2002-11-21 04:11 AM
Re: I got Error code : 1208 when I run my script to map drive

No Any problem When client is Windows 9x
use i: "\\bstl_svr3\DocMK11$ /no"
use j: "\\bstl_svr3\ShareDoc /no"
This is a share name on my network. It works!

Please see only PLogonNT.kix.. (Client is XP, 2000)
I got an error code : 1208 when I logon and run script at first time. If I wait a few minute and run script by manual It works.

Thanks
Pech


Howard Bullock
(KiX Supporter)
2002-11-21 04:13 AM
Re: I got Error code : 1208 when I run my script to map drive

Try the UDF. Does it work?

Pech
(Getting the hang of it)
2002-11-21 04:18 AM
Re: I got Error code : 1208 when I run my script to map drive

No It does not work. I still has an error occurred with Code : 1208 when I run script at first time logon.

Pech


Howard Bullock
(KiX Supporter)
2002-11-21 04:20 AM
Re: I got Error code : 1208 when I run my script to map drive

which drive fails?

Les
(KiX Master)
2002-11-21 04:23 AM
Re: I got Error code : 1208 when I run my script to map drive

Instead of %USERNAME% try @USERID

Pech
(Getting the hang of it)
2002-11-21 04:42 AM
Re: I got Error code : 1208 when I run my script to map drive

%Username% or USERID is the same problem.
I can't map drive at first logon. Error code is 1208.

IF I WAIT A FEW MINUTE AND RUN SCRIPT BY MANUAL IT WORKS-NO ERROR, WHY NOT.

PECH


Howard Bullock
(KiX Supporter)
2002-11-21 04:47 AM
Re: I got Error code : 1208 when I run my script to map drive

Your code states that it is trying to map H: and I:.

You still have not confirmed which drive or both cause an error.


Pech
(Getting the hang of it)
2002-11-21 04:55 AM
Re: I got Error code : 1208 when I run my script to map drive

H: is error : 1208
I: is error : 1208

I can't map any drive with first time logon.

Pech


Howard Bullock
(KiX Supporter)
2002-11-21 04:57 AM
Re: I got Error code : 1208 when I run my script to map drive

On one or more than computer.

What version of KiXtart?


Kdyer
(KiX Supporter)
2002-11-21 05:43 AM
Re: I got Error code : 1208 when I run my script to map drive

This sounded vaguely familiar -

I got error when I run kix script at first time.

use i: "\\bstl_svr3\DocMK11$"
use j: "\\bstl_svr3\ShareDoc"

It looks like the /no is a "left-over" from DOS -
quote:

C:\>net use /?
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]

If we look at the manual, we see:
quote:

USE LIST
USE <* | "device" | "resource"> /DELETE [/PERSISTENT]
USE ["device"] <"resource"> [/USER:user] [/PASSWORD:password] [/PERSISTENT]

Per Howard's comments: The switch /no is not valid.

Note:Jens recommendation for KiXtart versions < 4.x holds true.
Note 2:When using a $ in a share, you MUST have permissions applied appropriately.

To summarize your issue -
"All Windows 9x/Me users login fine with no errors."
"All Windows NT/2k users generate the 1208 errors, but once you login you can re-run the script and all is well."

Questions
  • Is this a new domain?
  • Do any of your users attach via W2k on the initial login?
  • Are the permissions applied properly to the "Administrative" or $ share?
  • Do your user's Logins generate entries into the Event Log?
Kent

[ 21. November 2002, 05:45: Message edited by: kdyer ]


Kdyer
(KiX Supporter)
2002-11-21 05:54 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech,

You mention "delete persistent mappings."

In your code, there is no persistent nor /delete /persistent used except where Howard points that out.

If you use /persistent you may need to have your users have rights to do so on the machine too.

Kent


Pech
(Getting the hang of it)
2002-11-21 07:35 AM
Re: I got Error code : 1208 when I run my script to map drive

Is this a new domain?
>No, This is a current domain (Windows 2000 Server)

Do any of your users attach via W2k on the initial login?
>Any User WIN2K use same as logon script to login

Are the permissions applied properly to
the "Administrative" or $ share?
>Yes, use has permissions to access the share folders, I don't have any problem with the permission with folder

Do your user's Logins generate entries into the Event Log?
No, no any user generate the login.

I just change the command to map drive
---------------------------------------------
? @kix
? @dos
? @ldrive
use "*" /delete
? "delete persistent mappings: " @error
use h: "\\bstl_svr3\%username%$"? "mapping h: to homeshare: " @error

IF Ingroup ("EDPADMIN") = 1
use i: "\\bstl_svr3\DocEDP$" ? "mapping i: to groupshare: " @error
use j: "\\bstl_svr3\dept$" ? "mapping i: to groupshare: " @error
use k: "\\bstl_svr3\users$" ? "mapping i: to groupshare: " @error
use l: "\\bstl_svr3\Software$" ? "mapping i: to groupshare: " @error
shell "\\bstl_svr1\ofcscan\autopcc.exe"

ENDIF

? "logonscript ran"
?? "press any key to close window"
get $
-------------------------------------

I got all error when i try to map drive at first logon : 1208

Pech


Kdyer
(KiX Supporter)
2002-11-21 02:32 PM
Re: I got Error code : 1208 when I run my script to map drive

Pech,

Let's go back and look at Howard's code..

Can you post the results of - "%temp%\logon.log" back here please?

If we take what you have and combine it with Howard's code, it should be something like:
code:
 ? @kix
? @dos
? @ldrive
;;USE "*" /delete ;-- commented this out as the MapDrive function takes this into account
;;? "delete persistent mappings: "
MapDrive("h:", "\\bstl_svr3", "@userid$")
? "mapping h: to homeshare: "

IF Ingroup ("EDPADMIN") = 1
MapDrive("i:", "\\bstl_svr3", "DocEDP$")
? "mapping i: to groupshare: "
MapDrive("j:", "\\bstl_svr3", "dept$")
? "mapping j: to groupshare: "
MapDrive("k:", "\\bstl_svr3", "users$")
? "mapping i: to groupshare: "
MapDrive("l:", "\\bstl_svr3", "Software$")
? "mapping i: to groupshare: "
SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
ENDIF

? "logonscript ran"
? "press any key to close window"
GET $

FUNCTION MapDrive($drive, $server, $share)
DIM $drive, $server, $share
COLOR c+/n
IF $drive<>"" AND $server<>"" AND $share<>""
$logtext="Connecting $Drive to \\$Server\$Share"
? $logtext
USE $drive /delete /persistent
USE $drive "\\$Server\$Share"
IF @error=0
COLOR g+/n
$x=" - Success"
"$x"
ELSE
COLOR r+/n
$x=" - Failed: Error @error"
"$x"
$errorstate=1
ENDIF
WriteLog ($logtext + $x)
COLOR w+/n
ELSE
WriteLog ("Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'")
ENDIF
ENDFUNCTION


FUNCTION WriteLog($text)
DIM $rc, $text, $logfile, $filehandle
$filehandle = 1
$logfile = "%temp%\logon.log"
$rc=Writeline ($filehandle, "@Date @Time - $Text" + Chr(13) + Chr(10))
IF $rc<0
$rc=Close ($filehandle)
$rc=Open ($filehandle, "$LogFile", 5)
SELECT
CASE
$rc=-1
$rc=MessageBox ("Invalid file name ($LogFile) specified for log file.","Logon Script Error",48)
CASE
$rc=0
WriteLog ($text)
CASE
$rc=>0
$rc=MessageBox ("Error($RC) while attempting to open log file ($LogFile).","Logon Script Error",48)
ENDSELECT
ENDIF
ENDFUNCTION

Thank you,

Kent


Howard Bullock
(KiX Supporter)
2002-11-21 09:45 PM
Re: I got Error code : 1208 when I run my script to map drive

Is this the same problem that you posted previously in thread: I got error when I run kix script at first time.

We need to start at square one.
  • Have you ever not had this problem on NT/W2K/XP?
  • Have you inspected the EventLogs of a computer experiencing this issue?
  • Do you see any "RED STOP Sign" critical alerts that might be of interest?
  • Do you see any interesting events in the server's eventlog?
This seems more like a client/server/network configuration issue.
Please read this KB article and let us know if you have the problem mentioned in it.
Microsoft Knowledge Base Article - 267309

[ 21. November 2002, 21:49: Message edited by: Howard Bullock ]


Pech
(Getting the hang of it)
2002-11-22 04:24 AM
Re: I got Error code : 1208 when I run my script to map drive

To Kent

I got an error Failed Error :67
on command map drive

What does it means?
How to find Logon.log?

Pech


Howard Bullock
(KiX Supporter)
2002-11-22 04:26 AM
Re: I got Error code : 1208 when I run my script to map drive

net helpmsg 67

The network name cannot be found.

the logon.log is in the %temp% directory.


Howard Bullock
(KiX Supporter)
2002-11-22 04:28 AM
Re: I got Error code : 1208 when I run my script to map drive

Kent made an error using MapDrive, there should not be any "\\"'s with the server name.

Should be like:

MapDrive("k:", "bstl_svr3", "users$")

[ 22. November 2002, 04:43: Message edited by: Howard Bullock ]


Kdyer
(KiX Supporter)
2002-11-22 04:29 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech,

To be honest, we should look at what Howard asks in the Microsoft Article. I think he is 100% correct in the sense that:
You can connect to the drive, even though delayed. If you couldn't, it would be a permissions issue.

HTH,

Kent


Pech
(Getting the hang of it)
2002-11-22 04:50 AM
Re: I got Error code : 1208 when I run my script to map drive

To Kent

I just change mapdrive command line as follow;

MapDrive("k:", "bstl_svr3", "users$")

MapDrive("i:", "bstl_svr3", "DocEDP$")
? "mapping i: to groupshare: "
MapDrive("j:", "bstl_svr3", "dept$")
? "mapping j: to groupshare: "
MapDrive("k:", "bstl_svr3", "users$")
? "mapping i: to groupshare: "
MapDrive("l:", "bstl_svr3", "Software$")
? "mapping i: to groupshare: "
SHELL "\\bstl_svr1\ofcscan\autopcc.exe"

BUT
I still got an error in Map drive line command
Failed Error 1208
Not found logon.log on %temp%

Pech


Kdyer
(KiX Supporter)
2002-11-22 04:53 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech,

Please go back to Howard's Message.

>> We need to start at square one.

And review - 267309

Kent


Pech
(Getting the hang of it)
2002-11-22 11:28 AM
Re: I got Error code : 1208 when I run my script to map drive

How I can config my server for give user sync clock with my PDC...

I don't know why If I wait a few a minute and run script by manual It works. But At first time failed!

PEch


Howard Bullock
(KiX Supporter)
2002-11-23 12:54 AM
Re: I got Error code : 1208 when I run my script to map drive

Yes we know that:
quote:
I don't know why If I wait a few a minute and run script by manual It works. But At first time failed!
You have to start displaying that you understand the basics of troubleshooting a problem for us to assist you. Restating the symptom of your problem is of no value at this time.

I, along with others, have spent a great deal of time attempting to assist you, but you appear to be very uncooperative in that you do not answer our questions or provide any detailed information about your environment. Trying to get anything of value from you is like pulling teeth. [Frown]

You have a problem with the interaction of your clients and server(s). You need to learn more about the operating systems and network configuration. We can not begin to understand the problem without your help.

The KiXtart code you executed to good there is no problem there.

Again, I have asked specific questions above for which you have not provided answers. If you do not want to help yourself, please don't waste our time.

You can research the configuration of time on the Microsoft web site by starting with a search for 'w32time', 'time', or just reading the KB article I posted above and then following the links.

[ 22. November 2002, 12:57: Message edited by: Howard Bullock ]


Sealeopard
(KiX Master)
2002-11-22 03:33 PM
Re: I got Error code : 1208 when I run my script to map drive

You might also want to set up a little test-lab with e.g. just two computers and experiment if you have the resources/time.

Pech
(Getting the hang of it)
2002-11-23 08:55 AM
Re: I got Error code : 1208 when I run my script to map drive

To: Kent


rem ::SETLOCAL
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

GOTO unknown_os

:win_NT
@TITLE Company A / Company B NT Logon Script
ECHO HELLO %USERNAME%!
Echo Welcome to %USERDOMAIN%, Inc. NT Domain Environment

%LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\PLogonNT.kix

goto end

:win_9X

%WINDIR%\PUTINENV.EXE L
%WINDIR%\winset computername=%COMPUTERNAME%
%WINDIR%\winset username=%USERNAME%
%WINDIR%\winset LANGROUP=%LANGROUP%
%WINDIR%\winset LOGONSERVER=%LOGONSERVER%

:: --- DISPLAY THE USER NAME/DOMAIN
ECHO HELLO %USERNAME%!
ECHO Welcome to %LANGROUP%, Inc. Windows 9x Domain Environment

%LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\PLogon9X.kix <<<<<< Cannot run >>>>>>

goto end

:unknown_os
:end
exit

--------------------
Now I found and fixed the problem with W32Time but I have some question about those command line ...

Why That command cannot run.. %LogonServer% cannot find? What happen on Window9X parameter.

But In Windows2000 no error.

Thanks
Pech


Pech
(Getting the hang of it)
2002-11-23 09:49 AM
Re: I got Error code : 1208 when I run my script to map drive

Why, the command windows doesn't disappear when script run finished? When use click and enter the windows will be disappear!

PEch


Pech
(Getting the hang of it)
2002-11-23 11:09 AM
Re: I got Error code : 1208 when I run my script to map drive

How to set automatic close windows command run script when run script finished.

I use : EXIT but windows has still untill press enter. Why?

Pech


JochenAdministrator
(KiX Supporter)
2002-11-23 11:20 AM
Re: I got Error code : 1208 when I run my script to map drive

Quit() will stop script execution ... tried this ?

Sealeopard
(KiX Master)
2002-11-23 01:35 PM
Re: I got Error code : 1208 when I run my script to map drive

As outlined in the KiXtart Manual, the NETLOGON share is redirected to the Z: drive under Windows 9x. The Manual also contains an example login.bat that works with Windows 9x/NT/2000. Please note that the '%0..\' moniker is not necessary under Windows NT\2000\XP and actually breaks under Windows XP.

Thus the Windows 9x call would be either of the next two lines with the first one the preferred one:
code:
%0\..\kix32.exe %0\..\PLogon9X.kix 
z:\kix32.exe z:\PLogon9X.kix

Why do you use two different login scripts instead of differentiating between OS versions within the same script?

[ 23. November 2002, 13:38: Message edited by: sealeopard ]


Pech
(Getting the hang of it)
2002-11-24 06:56 AM
Re: I got Error code : 1208 when I run my script to map drive

Ok I'll follow as your advice. One Script for any OS.
But I don't know why script running windows is not automatic close when script run finished.
It still open , user must press enter to close it! why not?

Pech


LonkeroAdministrator
(KiX Master Guru)
2002-11-24 06:59 AM
Re: I got Error code : 1208 when I run my script to map drive

one possibility is that you still got:
?? "press any key to close window"
get $

in there. we don't know your current code and I'm not sure if you know it either.

[ 24. November 2002, 07:00: Message edited by: Lonkero ]


Pech
(Getting the hang of it)
2002-11-24 09:44 AM
Re: I got Error code : 1208 when I run my script to map drive

OK I understand. I think ... $ is wait for reply from user to press any key.

Pech


Pech
(Getting the hang of it)
2002-11-24 09:48 AM
Re: I got Error code : 1208 when I run my script to map drive

OK I understood.
I delete Press any key but I forgot to delelet line..
$ <--is wait for reply from user to press any key.
Right?
Pech


LonkeroAdministrator
(KiX Master Guru)
2002-11-24 09:48 AM
Re: I got Error code : 1208 when I run my script to map drive

[Smile]

actually "$" is just like "$myvar"
it's variable with name of nothing.

if you see manual for get ( http://helpdesk.kixtart.org/KixManual2001/Commands/get.asp )
you see that it is command which says, dude hey wait for anykey. gets then is for line (which requires enter)

well, what more you meet these, more you learn, right?


Pech
(Getting the hang of it)
2002-11-24 09:49 AM
Re: I got Error code : 1208 when I run my script to map drive

OK I understood.
I delete "Press any key to close" but I forgot to delelet line..
get $ <--is wait for reply from user to press any key.
Right?
Pech


LonkeroAdministrator
(KiX Master Guru)
2002-11-24 09:51 AM
Re: I got Error code : 1208 when I run my script to map drive

now, I would ask you to learn forum also.
deleting your doubled (tribled actually) post happens by clicking the edit post button  - and once in, clicking the delete post checkbox.


Pech
(Getting the hang of it)
2002-11-25 03:08 AM
Re: I got Error code : 1208 when I run my script to map drive

PLogon.bat
--------------------------------------------------
echo off
rem ::SETLOCAL
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

GOTO unknown_os

echo on

:win_NT
@TITLE BRIDGESTONE SALES (THAILAND) CO.,LTD. Logon Script
ECHO HELLO %USERNAME%!
Echo Welcome to %USERDOMAIN%, Inc. NT Domain Environment

%LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\PLogonNT.kix

goto end

:win_9X

echo ON

REM %WINDIR%\PUTINENV.EXE L
\\BSTL_SVR1\NETLOGON\winset.exe computername=%COMPUTERNAME%
\\BSTL_SVR1\NETLOGON\winset.exe username=%USERNAME%
\\BSTL_SVR1\NETLOGON\winset.exe LANGROUP=%LANGROUP%
\\BSTL_SVR1\NETLOGON\winset.exe LOGONSERVER=%LOGONSERVER%

ECHO OFF
REM %WINDIR%\winset computername=%COMPUTERNAME%
REM %WINDIR%\winset username=%USERNAME%
REM %WINDIR%\winset LANGROUP=%LANGROUP%
REM %WINDIR%\winset LOGONSERVER=%LOGONSERVER%

echo on
:: --- DISPLAY THE USER NAME/DOMAIN
ECHO HELLO %USERNAME%!
ECHO Welcome to %LANGROUP%, Windows 9x Domain Environment

rem %LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\PLogon9X.kix

\\BSTL_SVR1\NETLOGON\kix32.exe \\BSTL_SVR1\NETLOGON\PLogonNT.kix

goto end

:unknown_os
:end
exit
--------------------------------------------

PLogonNT.kix
-------------------------------------------------

? @kix
? @dos
? @ldrive
;;USE "*" /delete ;-- commented this out as the MapDrive function takes this into account
;;? "delete persistent mappings: "
MapDrive("h:", "bstl_svr3", "%username%$")
? "mapping h: to homeshare: "
-------------------------------------------------

I can not map drive H: on Windows 9x..
Error code : 67
In Windows NT,2000 and XP no problem...

Pech


Les
(KiX Master)
2002-11-25 03:15 AM
Re: I got Error code : 1208 when I run my script to map drive

Try:

MapDrive("h:", "bstl_svr3", @UserID+"$$")


Howard Bullock
(KiX Supporter)
2002-11-25 03:15 AM
Re: I got Error code : 1208 when I run my script to map drive

It has been recommended that you do not use %username%. Instead you should be using @UserID macro.

Howard Bullock
(KiX Supporter)
2002-11-25 03:17 AM
Re: I got Error code : 1208 when I run my script to map drive

After all our previous input regarding your 1208 error, you never said what the real problem was or how you resolved it. Could you please state clearly was was wrong and how you fixed it?

Les
(KiX Master)
2002-11-25 03:17 AM
Re: I got Error code : 1208 when I run my script to map drive

What is the point of this?

\\BSTL_SVR1\NETLOGON\winset.exe computername=%COMPUTERNAME%
\\BSTL_SVR1\NETLOGON\winset.exe username=%USERNAME%
\\BSTL_SVR1\NETLOGON\winset.exe LANGROUP=%LANGROUP%
\\BSTL_SVR1\NETLOGON\winset.exe LOGONSERVER=%LOGONSERVER%

Makes no sense to me.


NTDOCAdministrator
(KiX Master)
2002-11-25 04:08 AM
Re: I got Error code : 1208 when I run my script to map drive

Hmmm... I'm lost here as well. I don't see him using any UDF So what is up with trying to use MapDrive.

I see Howard told him a LONG TIME AGO to try using MapDrive, but I don't see it here and I don't see from this thread that the user knows how to use a UDF in the first place.

For simplicity until the user learns UDFs he should probably stick with using the USE command that is built into KiXtart.


Howard Bullock
(KiX Supporter)
2002-11-25 04:13 AM
Re: I got Error code : 1208 when I run my script to map drive

DOC, Kent wrote him some code that uses MapDrive (somewhere in this thread).

The fact we never get complete feedback or code makes helping difficult.

[ 25. November 2002, 04:14: Message edited by: Howard Bullock ]


Les
(KiX Master)
2002-11-25 04:14 AM
Re: I got Error code : 1208 when I run my script to map drive

I suspect there is a UDF defined somewhere (not showing the entire script) since he claims it works on NT. His real problem is that he doesn't have a grasp of env vars.

If the %USERNAME% var does not exist on Wintendo, winset.exe username=%USERNAME% won't do squat.


Pech
(Getting the hang of it)
2002-11-25 04:14 AM
Re: I got Error code : 1208 when I run my script to map drive

OK I change the command line to check Version of Client

NT , 2000 use.. > %username%
9x use.. > @userid

How I can fixed the error code 1208 ?
> I reconfig my File Server
from member server (no AD) to
Windows with AD.. and join to Windows 2000 Server AD.

Now It can sync clock with PDC.

Thanks for every one

Pech


Howard Bullock
(KiX Supporter)
2002-11-25 04:19 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech, do you understand NT domains and domain architecture?

You should not be using %username% for any OS. Why do insist on continuing to use it? Use @userid for all OS's.

What account is used to logon? A workstation account or domain account?

[ 25. November 2002, 04:19: Message edited by: Howard Bullock ]


NTDOCAdministrator
(KiX Master)
2002-11-25 04:30 AM
Re: I got Error code : 1208 when I run my script to map drive

All right... I'm leaving this thread. I can see I have nothing to add that you guys can't already handle. [Wink]

Howard,

If you get bored, you could update the PERL code to grab and create another webpage for UDFs created in the last 5 days [Big Grin] [Big Grin] [Big Grin]


Howard Bullock
(KiX Supporter)
2002-11-25 04:31 AM
Re: I got Error code : 1208 when I run my script to map drive

Just a few post above you said the NT/W2K/XP was working...Now you have an error 1208 again. What does work and what does not work? On what OS's do you get the 1208 error? What are you attempting to do when it occurs?

Pech
(Getting the hang of it)
2002-11-25 04:34 AM
Re: I got Error code : 1208 when I run my script to map drive

%USERNAME% for Client is NT,2000 and XP only?

Logon to Server account AD!

Pech


Les
(KiX Master)
2002-11-25 04:35 AM
Re: I got Error code : 1208 when I run my script to map drive

HB,
I think you misunderstood. He said he fixed it by joining AD.

Doc,
What would be the point of the last 5 days. There are often existing UDFs that get updated in place. Those should then be reported on as well.

Also, isn't updating every 2 hours a bit of overkill? Once a day should do it.


Les
(KiX Master)
2002-11-25 04:39 AM
Re: I got Error code : 1208 when I run my script to map drive

Probably the Thai-English... [Confused]

Howard Bullock
(KiX Supporter)
2002-11-25 04:40 AM
Re: I got Error code : 1208 when I run my script to map drive

After re-reading, I think what I thought was a question was the answer. My confusion level is diminshing. I hope.

[ 25. November 2002, 04:40: Message edited by: Howard Bullock ]


Howard Bullock
(KiX Supporter)
2002-11-25 04:46 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech, I apologize for confusion and the last couple posts.

Please repost your current problems so that we can properly address them.

Remember that the KiXtart macros work on both Win9x and NT computer. Your code should try to use the same commands and macros where ever possible. The use of environment variable such as %username% should be avoided in your KiXtart scripts if possible.


Pech
(Getting the hang of it)
2002-11-26 03:10 AM
Re: I got Error code : 1208 when I run my script to map drive

code:
Logon.bat
----------------------------------------------
echo off
rem ::SETLOCAL
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

GOTO unknown_os

echo on

:win_NT
@TITLE BRIDGESTONE SALES (THAILAND) CO.,LTD. Logon Script
ECHO HELLO %USERNAME%!
Echo Welcome to %USERDOMAIN%, Inc. NT Domain Environment

%LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\RunScript.kix

goto end

:win_9X

echo ON

REM %WINDIR%\PUTINENV.EXE L
\\BSTL_SVR1\NETLOGON\winset.exe computername=%COMPUTERNAME%
\\BSTL_SVR1\NETLOGON\winset.exe username=@USERID
\\BSTL_SVR1\NETLOGON\winset.exe LANGROUP=%LANGROUP%
\\BSTL_SVR1\NETLOGON\winset.exe LOGONSERVER=%LOGONSERVER%

ECHO OFF
REM %WINDIR%\winset computername=%COMPUTERNAME%
REM %WINDIR%\winset username=%USERNAME%
REM %WINDIR%\winset LANGROUP=%LANGROUP%
REM %WINDIR%\winset LOGONSERVER=%LOGONSERVER%

echo on
:: --- DISPLAY THE USER NAME/DOMAIN
ECHO HELLO %USERNAME%!
ECHO Welcome to %LANGROUP%, Windows 9x Domain Environment

\\BSTL_SVR1\NETLOGON\kix32.exe \\BSTL_SVR1\NETLOGON\RunScript.kix

goto end

:unknown_os
:end
exit

-------------------------------------------------

RunScript.kix
-------------------------------------------------
code:
? @kix
? @dos
? @ldrive
;;USE "*" /delete ;-- commented this out as the MapDrive function takes this into account
;;? "delete persistent mappings: "

IF "%OS%" == "Windows_NT"
MapDrive("h:", "bstl_svr3", "%username%$")
? "mapping h: to homeshare: "
else
MapDrive("h:", "bstl_svr3", "@USERID$")
? "mapping h: to homeshare: "
endif

IF Ingroup ("EDPADMIN") = 1
MapDrive("i:", "bstl_svr3", "DocEDP$")
? "mapping i: to groupshare: "
MapDrive("j:", "bstl_svr3", "dept$")
? "mapping j: to groupshare: "
MapDrive("k:", "bstl_svr3", "users$")
? "mapping k: to groupshare: "
MapDrive("l:", "bstl_svr3", "Software$")
? "mapping l: to groupshare: "
SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
ENDIF

rem GET $

EXIT

--------------------------------------------------

Now I have an problem with Client is Windows ME!
Windows ME cann't map any drive from this scipt!

How I can detect when client is Windows ME?

Pech

{edit} added code tags - Bullock

[ 26. November 2002, 03:13: Message edited by: Howard Bullock ]


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 03:12 AM
Re: I got Error code : 1208 when I run my script to map drive

you should not even try in the first place to use network with me!

LonkeroAdministrator
(KiX Master Guru)
2002-11-26 03:16 AM
Re: I got Error code : 1208 when I run my script to map drive

anyway, you are starting kix with selecting the os...
you should in all cases if the os is not nt/xp/w2k start the win9x part.

currently, you are setting me as unknown and dropping it of.


Howard Bullock
(KiX Supporter)
2002-11-26 03:17 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech, let's start small first.

In the following code:
code:
IF "%OS%" == "Windows_NT"
MapDrive("h:", "bstl_svr3", "%username%$")
? "mapping h: to homeshare: "
else
MapDrive("h:", "bstl_svr3", "@USERID$")
? "mapping h: to homeshare: "
endif

The "IF" construct is not needed as both MapDrive statements are identical.

You should replace the above code with:
code:
MapDrive("h:", "bstl_svr3", @USERID + "$$")  



[ 26. November 2002, 03:17: Message edited by: Howard Bullock ]


Howard Bullock
(KiX Supporter)
2002-11-26 03:21 AM
Re: I got Error code : 1208 when I run my script to map drive

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 ]


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 03:23 AM
Re: I got Error code : 1208 when I run my script to map drive

mm...
but, first correct your logon bat.
ME can't execute if skipped as unknown.


Howard Bullock
(KiX Supporter)
2002-11-26 03:25 AM
Re: I got Error code : 1208 when I run my script to map drive

Damn, I hate those batch files. [Mad]

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 ]


Pech
(Getting the hang of it)
2002-11-26 03:25 AM
Re: I got Error code : 1208 when I run my script to map drive

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 ]


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 03:26 AM
Re: I got Error code : 1208 when I run my script to map drive

pech, do you listen?

Howard Bullock
(KiX Supporter)
2002-11-26 03:28 AM
Re: I got Error code : 1208 when I run my script to map drive

Your batch file is wrong. See above. A WIndows ME computer never executes your KiXtart script.

NTDOCAdministrator
(KiX Master)
2002-11-26 03:30 AM
Re: I got Error code : 1208 when I run my script to map drive

Huh! say what, I couldn't hear you Lonk

LonkeroAdministrator
(KiX Master Guru)
2002-11-26 03:32 AM
Re: I got Error code : 1208 when I run my script to map drive

doc, that's just because you don't have text2speech converter turned on [Razz]

Howard Bullock
(KiX Supporter)
2002-11-26 03:33 AM
Re: I got Error code : 1208 when I run my script to map drive

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 ]


NTDOCAdministrator
(KiX Master)
2002-11-26 03:33 AM
Re: I got Error code : 1208 when I run my script to map drive

quit mixing batch and KiX in the same code.

For what you're doing you DO NOT NEED to check the client OS version.

Use the @USERID for everyone and it will work fine.

May only need a "special case" for XP OS when using a batch.


NTDOCAdministrator
(KiX Master)
2002-11-26 03:37 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech... I apologize, but if I may be so bold.

It would appear that there is some kind of "language barrier" going on here.

Is it possible for you to seek the assistance of another person that may have a better understanding of the English language to assist you? and or us to enable us to better help you?


Howard Bullock
(KiX Supporter)
2002-11-26 03:47 AM
Re: I got Error code : 1208 when I run my script to map drive

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 ]


Howard Bullock
(KiX Supporter)
2002-11-26 05:02 AM
Re: I got Error code : 1208 when I run my script to map drive

Pech, you there?

Pech
(Getting the hang of it)
2002-11-26 05:09 AM
Re: I got Error code : 1208 when I run my script to map drive

Windows ME use and run same as Windows 9x
But Windows ME cann't map any drive!

Pech


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 05:11 AM
Re: I got Error code : 1208 when I run my script to map drive

pech, have you changed your bat?
the one you posted here does not run ME at all.


Howard Bullock
(KiX Supporter)
2002-11-26 05:13 AM
Re: I got Error code : 1208 when I run my script to map drive

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.


Pech
(Getting the hang of it)
2002-11-26 05:21 AM
Re: I got Error code : 1208 when I run my script to map drive

How to? check ME

PEch


Howard Bullock
(KiX Supporter)
2002-11-26 05:30 AM
Re: I got Error code : 1208 when I run my script to map drive

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.


Pech
(Getting the hang of it)
2002-11-26 05:40 AM
Re: I got Error code : 1208 when I run my script to map drive

Can I use this or not? for check Windows ME

VER | find "ME" > nul
IF not errorlevel 1 GOTO Win_9X

Pech


Kdyer
(KiX Supporter)
2002-11-26 05:41 AM
Re: I got Error code : 1208 when I run my script to map drive

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


Kdyer
(KiX Supporter)
2002-11-26 06:00 AM
Re: I got Error code : 1208 when I run my script to map drive

Dusted off an old Me Boot Disk..

Err mistake [Embarrassed] try -

VER | find "Millennium" > nul

If you need to find it..

Go to a DOS prompt and type in:

ver

HTH,

Kent

[ 26. November 2002, 06:25: Message edited by: kdyer ]


NTDOCAdministrator
(KiX Master)
2002-11-26 08:32 AM
Re: I got Error code : 1208 when I run my script to map drive

This should also work for every OS Microsoft makes, except Windows 3.1, but if you're running Windows 3.1 you have BIGGER PROBLEMS then trying to get KiXtart running.

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
ECHO You should see this on Windows ME
pause
REM Or what ever command you want to run.
GOTO END
:END

Pech... One of these postings HAS to work. If you copy and use the code above on an ME workstation you should see it as it pauses. Then try it as the only logon bat for a specific account for testing ME. If you don't see it then you have some other problem happening where perhaps the logon is being bypassed by the OS due to some other setting.


Pech
(Getting the hang of it)
2002-11-26 08:33 AM
Re: I got Error code : 1208 when I run my script to map drive

OK That's right!

Thank a lot Kent!

Pech


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 08:36 AM
Re: I got Error code : 1208 when I run my script to map drive

weirly pech knows only [Frown] as his face on posts...
sad, as whenever I get problems it's [Big Grin] [Mad] [Roll Eyes] [Eek!]


Pech
(Getting the hang of it)
2002-11-26 09:14 AM
Re: I got Error code : 1208 when I run my script to map drive

[Smile] [Wink] [Big Grin]

Thanks for every one to help me.

Pech