#118625 - 2004-04-27 05:39 AM
I got error code 1208 when mapping
|
Pech
Getting the hang of it
Registered: 2002-10-16
Posts: 61
Loc: Thailand
|
I got error 1208 when mapping network. If wait a moment and try to run script again, It worked. Why not? what a problem with my server (DC and File Server not sync?)
|
|
Top
|
|
|
|
#118627 - 2004-04-27 07:09 AM
Re: I got error code 1208 when mapping
|
Pech
Getting the hang of it
Registered: 2002-10-16
Posts: 61
Loc: Thailand
|
Kix Ver 4.11 What Network type NT4 or Active Directory? : Windows 2000 (DC is Active directory and File Server is member server) What client does this happen on 9X/NT/2000/XP ? NT/2000/XP only My Code Logon.bat ---------------------- echo off 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 "Millennium" > 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
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 rem \\BSTL_SVR1\NETLOGON\kix32.exe \\BSTL_SVR1\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
REM %LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\RunScript.kix \\BSTL_SVR1\NETLOGON\kix32.exe \\BSTL_SVR1\NETLOGON\RunScript.kix
goto end
:unknown_os :end exit -----------------------------------------
RunScript.kix
------------------------------------------ ? @kix ? @dos ? @ldrive ;;USE "*" /delete ;-- commented this out as the MapDrive function takes this into account ;;? "delete persistent mappings: "
IF "%OS%" == "Windows_NT" ? "mapping h: to homeshare: " MapDrive("h:", "bstl_svr3", "%username%$") ELSE ? "mapping h: to homeshare: " MapDrive("h:", "bstl_svr3", "@USERID$") ENDIF
SELECT
CASE Ingroup ("MK00") = 1 MapDrive("i:", "bstl_svr3", "DocMK11$") MapDrive("j:", "bstl_svr3", "DocMK12$") MapDrive("k:", "bstl_svr3", "DocMK13$") MapDrive("l:", "bstl_svr3", "DocMK21$") MapDrive("m:", "bstl_svr3", "DocMK32$") MapDrive("n:", "bstl_svr3", "DocOE11$") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("MK10") = 1 MapDrive("i:", "bstl_svr3", "DocMK11$") MapDrive("j:", "bstl_svr3", "DocMK12$") MapDrive("k:", "bstl_svr3", "DocMK13$") MapDrive("l:", "bstl_svr3", "DocMKPublic$") MapDrive("m:", "bstl_svr3", "DocMK11$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK1") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK2") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK3") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK6") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("MK11") = 1 MapDrive("i:", "bstl_svr3", "DocMK11$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("l:", "bstl_svr3", "DocMKPublic$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK1") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK2") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK3") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK6") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("MK12") = 1 MapDrive("i:", "bstl_svr3", "DocMK12$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocMKPublic$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK1") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK2") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK3") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK6") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("MK13") = 1 MapDrive("i:", "bstl_svr3", "DocMK13$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocRD11$") MapDrive("l:", "bstl_svr3", "Lindav$") MapDrive("m:", "bstl_svr3", "DocMKPublic$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK1") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK2") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK3") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK6") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("MK21") = 1 MapDrive("i:", "bstl_svr3", "DocMK21$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocMKPublic$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK1") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK2") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK3") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK6") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("MK32") = 1 MapDrive("i:", "bstl_svr3", "DocMK32$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocMKPublic$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK1") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK2") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK3") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK6") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("S01") = 1 MapDrive("i:", "bstl_svr3", "DocOE11$") MapDrive("j:", "bstl_svr3", "DocMK21$")
CASE Ingroup ("OE11") = 1 MapDrive("i:", "bstl_svr3", "DocOE11$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSMK4") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL01") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SL00") = 1 ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL11") = 1 MapDrive("i:", "bstl_svr3", "DocSL11$") MapDrive("j:", "bstl_svr3", "Winsurvey") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL12") = 1 MapDrive("i:", "bstl_svr3", "DocSL12$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SL13") = 1 MapDrive("i:", "bstl_svr3", "DocSL13$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL14") = 1 MapDrive("i:", "bstl_svr3", "DocSL14$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SL15") = 1 MapDrive("i:", "bstl_svr3", "DocSL15$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SL16") = 1 MapDrive("i:", "bstl_svr3", "DocSL16$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SL17") = 1 MapDrive("i:", "bstl_svr3", "DocSL17$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SL18") = 1 MapDrive("i:", "bstl_svr3", "DocSL18$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SL41") = 1 MapDrive("i:", "bstl_svr3", "DocSL41$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("XA11") = 1 MapDrive("i:", "bstl_svr3", "DocXA11A$") MapDrive("j:", "bstl_svr3", "DocXA11B$") MapDrive("k:", "bstl_svr3", "DocXA11C$") MapDrive("l:", "bstl_svr3", "DocXA11D$") MapDrive("M:", "bstl_svr3", "DocXA11$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSAC2") MapDrive("n:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("o:", "bstl_svr3", "SAP$") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11A") = 1 MapDrive("i:", "bstl_svr3", "DocXA11A$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSAC2") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11B") = 1 MapDrive("i:", "bstl_svr3", "DocXA11B$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSAC2") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11C") = 1 MapDrive("i:", "bstl_svr3", "DocXA11C$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSAC2") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("XA11D") = 1 MapDrive("i:", "bstl_svr3", "DocXA11D$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSAC2") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA12") = 1 MapDrive("i:", "bstl_svr3", "DocXA12$") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("EDP") = 1 MapDrive("i:", "bstl_svr3", "DocEDP$") MapDrive("j:", "bstl_svr3", "Software$") MapDrive("k:", "bstl_svr3", "DocXA12$") MapDrive("l:", "bstl_svr3", "SAP$") MapDrive("m:", "bstl_svr3", "TRASDoc$") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("EDP1") = 1 MapDrive("i:", "bstl_svr3", "DocEDP$") MapDrive("j:", "bstl_svr3", "dept$") MapDrive("k:", "bstl_svr3", "users$") MapDrive("l:", "bstl_svr3", "Software$") MapDrive("m:", "bstl_svr3", "SAP$") MapDrive("n:", "bstl_svr3", "TRASDoc$") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("EDPADMIN") = 1 MapDrive("i:", "bstl_svr3", "DocEDP$") MapDrive("j:", "bstl_svr3", "dept$") MapDrive("k:", "bstl_svr3", "users$") MapDrive("l:", "bstl_svr3", "Software$") MapDrive("m:", "bstl_svr3", "SAP$") MapDrive("n:", "bstl_svr3", "TRASDoc$") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("RD11") = 1 MapDrive("i:", "bstl_svr3", "DocRD11$") MapDrive("j:", "bstl_svr3", "Lindav$") ADDPRINTERCONNECTION("\\BSTL_SVR1\PRTLSSL4") ADDPRINTERCONNECTION("\\BSTL_SVR1\Deskjet5550") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("TS") = 1 MapDrive("i:", "bstl_svr3", "DocTS$") SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
CASE Ingroup ("SALESDEPT") = 1 MapDrive("m:", "bstl_svr3", "ShareDoc")
CASE Ingroup ("SAPGROUP") = 1 MapDrive("i:", "bstl_svr3", "SAP$") MapDrive("j:", "bstl_svr3", "TRASDoc$")
ENDSELECT
REM 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
EXIT --------------------------------------------------------- In User Property/Profile Logon Script : logon.bat
Please check for me. Thanks for your help Pech
|
|
Top
|
|
|
|
#118629 - 2004-04-27 08:50 AM
Re: I got error code 1208 when mapping
|
Pech
Getting the hang of it
Registered: 2002-10-16
Posts: 61
Loc: Thailand
|
Can you edit my code or make new for me.? I don't understand what wrong? Pech
|
|
Top
|
|
|
|
#118630 - 2004-04-27 05:58 PM
Re: I got error code 1208 when mapping
|
ShaneEP
MM club member
   
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
|
Try this out...I just made a few changes.
1. Turned on the NoVarsInStrings setting so that you wont have to change all of the drives that end with $. $ is a special char in kix and should be doubled up if you want them included in a string (unless of course you set NoVarsInStrings).
2. Removed the first IF statement since it wasnt really needed. All the client OSs you mentioned (nt,2k,xp) should be able to handle the @UserID macro and that was the only difference I noticed.
3. Indented all of the code to make it easier to understand/read. Please post any code in between code tags to preserve and indenting in the future.
4. Removed a REM statement towards the bottom. That is a DOS command not a kix command. Use the ; to comment lines in a kix script.
5. Removed any variables from quotes so that the NoVarsInStrings does not break them. Hopefully I didn't miss any.
I couldnt really test it any since all of the drive mappings would fail for me anyways. So let us know how it works.
Code:
$null = SetOption("NoVarsInStrings","On") ? @kix ? @dos ? @ldrive ;;USE "*" /delete ;-- commented this out as the MapDrive function takes this into account ;;? "delete persistent mappings: "
? "mapping h: to homeshare: " MapDrive("h:", "bstl_svr3", @UserID+"$")
SELECT CASE Ingroup ("MK00") MapDrive("i:", "bstl_svr3", "DocMK11$") MapDrive("j:", "bstl_svr3", "DocMK12$") MapDrive("k:", "bstl_svr3", "DocMK13$") MapDrive("l:", "bstl_svr3", "DocMK21$") MapDrive("m:", "bstl_svr3", "DocMK32$") MapDrive("n:", "bstl_svr3", "DocOE11$") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("MK10") MapDrive("i:", "bstl_svr3", "DocMK11$") MapDrive("j:", "bstl_svr3", "DocMK12$") MapDrive("k:", "bstl_svr3", "DocMK13$") MapDrive("l:", "bstl_svr3", "DocMKPublic$") MapDrive("m:", "bstl_svr3", "DocMK11$") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK1") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK2") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK3") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK6") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("MK11") MapDrive("i:", "bstl_svr3", "DocMK11$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("l:", "bstl_svr3", "DocMKPublic$") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK1") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK2") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK3") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK6") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("MK12") MapDrive("i:", "bstl_svr3", "DocMK12$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocMKPublic$") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK1") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK2") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK3") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK6") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("MK13") MapDrive("i:", "bstl_svr3", "DocMK13$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocRD11$") MapDrive("l:", "bstl_svr3", "Lindav$") MapDrive("m:", "bstl_svr3", "DocMKPublic$") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK1") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK2") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK3") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK6") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("MK21") MapDrive("i:", "bstl_svr3", "DocMK21$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocMKPublic$") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK1") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK2") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK3") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK6") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("MK32") MapDrive("i:", "bstl_svr3", "DocMK32$") MapDrive("j:", "bstl_svr3", "Winsurvey") MapDrive("k:", "bstl_svr3", "DocMKPublic$") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK1") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK2") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK3") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK6") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("S01") MapDrive("i:", "bstl_svr3", "DocOE11$") MapDrive("j:", "bstl_svr3", "DocMK21$") CASE Ingroup ("OE11") MapDrive("i:", "bstl_svr3", "DocOE11$") AddPrinterConnection("\\BSTL_SVR1\PRTLSMK4") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL01") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL00") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL11") MapDrive("i:", "bstl_svr3", "DocSL11$") MapDrive("j:", "bstl_svr3", "Winsurvey") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL12") MapDrive("i:", "bstl_svr3", "DocSL12$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL13") MapDrive("i:", "bstl_svr3", "DocSL13$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL14") MapDrive("i:", "bstl_svr3", "DocSL14$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL15") MapDrive("i:", "bstl_svr3", "DocSL15$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL16") MapDrive("i:", "bstl_svr3", "DocSL16$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL17") MapDrive("i:", "bstl_svr3", "DocSL17$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL18") MapDrive("i:", "bstl_svr3", "DocSL18$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SL41") MapDrive("i:", "bstl_svr3", "DocSL41$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11") MapDrive("i:", "bstl_svr3", "DocXA11A$") MapDrive("j:", "bstl_svr3", "DocXA11B$") MapDrive("k:", "bstl_svr3", "DocXA11C$") MapDrive("l:", "bstl_svr3", "DocXA11D$") MapDrive("M:", "bstl_svr3", "DocXA11$") AddPrinterConnection("\\BSTL_SVR1\PRTLSAC2") MapDrive("n:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("o:", "bstl_svr3", "SAP$") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11A") MapDrive("i:", "bstl_svr3", "DocXA11A$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") AddPrinterConnection("\\BSTL_SVR1\PRTLSAC2") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11B") MapDrive("i:", "bstl_svr3", "DocXA11B$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") AddPrinterConnection("\\BSTL_SVR1\PRTLSAC2") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11C") MapDrive("i:", "bstl_svr3", "DocXA11C$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") AddPrinterConnection("\\BSTL_SVR1\PRTLSAC2") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA11D") MapDrive("i:", "bstl_svr3", "DocXA11D$") MapDrive("j:", "bstl_svr3", "DocXA11$") MapDrive("k:", "bstl_svr3", "SAP_BSTLAC$") MapDrive("l:", "bstl_svr3", "SAP$") AddPrinterConnection("\\BSTL_SVR1\PRTLSAC2") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("XA12") MapDrive("i:", "bstl_svr3", "DocXA12$") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("EDP") MapDrive("i:", "bstl_svr3", "DocEDP$") MapDrive("j:", "bstl_svr3", "Software$") MapDrive("k:", "bstl_svr3", "DocXA12$") MapDrive("l:", "bstl_svr3", "SAP$") MapDrive("m:", "bstl_svr3", "TRASDoc$") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("EDP1") MapDrive("i:", "bstl_svr3", "DocEDP$") MapDrive("j:", "bstl_svr3", "dept$") MapDrive("k:", "bstl_svr3", "users$") MapDrive("l:", "bstl_svr3", "Software$") MapDrive("m:", "bstl_svr3", "SAP$") MapDrive("n:", "bstl_svr3", "TRASDoc$") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("EDPADMIN") MapDrive("i:", "bstl_svr3", "DocEDP$") MapDrive("j:", "bstl_svr3", "dept$") MapDrive("k:", "bstl_svr3", "users$") MapDrive("l:", "bstl_svr3", "Software$") MapDrive("m:", "bstl_svr3", "SAP$") MapDrive("n:", "bstl_svr3", "TRASDoc$") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("RD11") MapDrive("i:", "bstl_svr3", "DocRD11$") MapDrive("j:", "bstl_svr3", "Lindav$") AddPrinterConnection("\\BSTL_SVR1\PRTLSSL4") AddPrinterConnection("\\BSTL_SVR1\Deskjet5550") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("TS") MapDrive("i:", "bstl_svr3", "DocTS$") Shell "\\bstl_svr1\ofcscan\autopcc.exe" CASE Ingroup ("SALESDEPT") MapDrive("m:", "bstl_svr3", "ShareDoc") CASE Ingroup ("SAPGROUP") MapDrive("i:", "bstl_svr3", "SAP$") MapDrive("j:", "bstl_svr3", "TRASDoc$") ENDSELECT
; 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
|
|
Top
|
|
|
|
#118631 - 2004-04-27 06:05 PM
Re: I got error code 1208 when mapping
|
Les
KiX Master
   
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
Quote:
(unless of course you set NoVarsInStrings).
... or use a newer version of KiX. Quote:
Fixes/enhancements in 4.10: - Added support for floating point math, including math functions: Abs, Int, Fix, Round, Cstr, CInt, CDbl, FormatNumber
- Added mod operator
- Added @LOGONMODE, @CPU, @MHZ, @SCRIPTNAME
- Enhanced Sleep command to accept milliseconds
- Enhanced KX32.DLL to load KX16.DLL in same directory
- Added restore of console attributes after runtime error
- Fixed Exception error when enumerating WinInstaller objects
- Variable with zero-length name ('$') is no longer resolved when used inside strings.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.
|
|
Top
|
|
|
|
#118632 - 2004-04-27 06:08 PM
Re: I got error code 1208 when mapping
|
ShaneEP
MM club member
   
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
|
Ahhh nice. I never noticed that. Oh well it should have been set anyways...
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 837 anonymous users online.
|
|
|