Page 1 of 5 12345>
Topic Options
#33041 - 2002-11-21 03:45 AM I got Error code : 1208 when I run my script to map drive
Pech Offline
Getting the hang of it

Registered: 2002-10-16
Posts: 61
Loc: Thailand
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

Top
#33042 - 2002-11-21 03:48 AM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#33043 - 2002-11-21 03:52 AM Re: I got Error code : 1208 when I run my script to map drive
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
You might also need to double up those '$' signs, depending on KiXtart version.
_________________________
There are two types of vessels, submarines and targets.

Top
#33044 - 2002-11-21 03:54 AM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
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

_________________________
Home page: http://www.kixhelp.com/hb/

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

Registered: 2002-10-16
Posts: 61
Loc: Thailand
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

Top
#33046 - 2002-11-21 04:13 AM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Try the UDF. Does it work?
_________________________
Home page: http://www.kixhelp.com/hb/

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

Registered: 2002-10-16
Posts: 61
Loc: Thailand
No It does not work. I still has an error occurred with Code : 1208 when I run script at first time logon.

Pech

Top
#33048 - 2002-11-21 04:20 AM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
which drive fails?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#33049 - 2002-11-21 04:23 AM Re: I got Error code : 1208 when I run my script to map drive
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Instead of %USERNAME% try @USERID
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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

Registered: 2002-10-16
Posts: 61
Loc: Thailand
%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

Top
#33051 - 2002-11-21 04:47 AM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Your code states that it is trying to map H: and I:.

You still have not confirmed which drive or both cause an error.
_________________________
Home page: http://www.kixhelp.com/hb/

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

Registered: 2002-10-16
Posts: 61
Loc: Thailand
H: is error : 1208
I: is error : 1208

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

Pech

Top
#33053 - 2002-11-21 04:57 AM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
On one or more than computer.

What version of KiXtart?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#33054 - 2002-11-21 05:43 AM Re: I got Error code : 1208 when I run my script to map drive
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
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 ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#33055 - 2002-11-21 05:54 AM Re: I got Error code : 1208 when I run my script to map drive
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
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
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

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

Registered: 2002-10-16
Posts: 61
Loc: Thailand
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

Top
#33057 - 2002-11-21 02:32 PM Re: I got Error code : 1208 when I run my script to map drive
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
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
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#33058 - 2002-11-21 09:45 PM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

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

Registered: 2002-10-16
Posts: 61
Loc: Thailand
To Kent

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

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

Pech

Top
#33060 - 2002-11-22 04:26 AM Re: I got Error code : 1208 when I run my script to map drive
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
net helpmsg 67

The network name cannot be found.

the logon.log is in the %temp% directory.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 5 12345>


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

Who's Online
0 registered and 326 anonymous users online.
Newest Members
Thechadpma, CestMoi, MeMyselfAndI, Praveer, Ollero
17745 Registered Users

Generated in 0.044 seconds in which 0.013 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