Page 1 of 1 1
Topic Options
#133995 - 2005-02-17 06:26 PM Replacement or augmentation to a script
cybercast Offline
Lurker

Registered: 2005-02-17
Posts: 1
I am new to this kind of scripting and I could really use your help. I have attached a couple of kixtart files.

What I want to do is replace this line in the script: Use T: "\\CCPAMAIN\APPS\TAX_ROLL" with: Use T: " \\NEWMAIN\APPS\TAX_ROLL "

However when I do this and log out and log back on to my client workstation, the same mapping to ccpamain continues to show up.

We use a Win2k Active Directory with logon.bat as the logon script. I've attached both.

Can you help me? I would be most grateful! I look forward to hearing back from you.

Best Regards,
Jon Levin - Naples, Florida - USA
support@cybercastmedia.com

Here is the Kixtart script that I need to modify.....


If ENumIpInfo(0,0) = "28.0.0.3"
Quit
EndIf

SetTime "\\CCPAMAIN"

Use * /Delete

Use H: "\\CCPAMAIN\APPS"
Use L: "\\CCPAMAIN\MAPPING\LIBRARY"
Use P: "\\CCPAMAIN\DATA"
Use S: "\\CCPAMAIN\MAPPING\MRSID"
Use T: "\\CCPAMAIN\APPS\TAX_ROLL"
Use U: "\\CCPAMAIN\USERS\@USERID"
Use V: "\\CCPAMAIN\MAPPING\CCPA_GIS"

If InGroup("Mapping_Group") = 1
Use M: "\\CCPAMAIN\MAPPING\MAPPING"
EndIf

Dim $File_Local, $File_Netwk, $File_Compr

$File_Local = "C:\Program Files\AIT\ADE\Ade2Papr.ebx"
$File_Netwk = "H:\PcUpdate\Paperles\Ade2Papr.ebx"

If Exist($File_Netwk) = 1
If Exist($File_Local) = 0
Copy "$File_Netwk" "$File_Local"
Else
$File_Compr = CompareFileTimes("$File_Netwk","$File_Local")
If $File_Compr = 1
Copy "$File_Netwk" "$File_Local"
EndIf
EndIf
EndIf

Top
#133996 - 2005-02-17 08:49 PM Re: Replacement or augmentation to a script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Most likely you have manually mapped a "persistent" drive connection.

When mapping drives you should always execute "use $drive /delete /persistent" to free up the drive letter before attempting to map the drive.

Also you need to check @error and @serror after issuing the command as these would have told you why the map attempt failed.

Example Code:
 Function MapDrive($Drive, $Server, $Share)
Dim $Drive, $Server, $Share, $shell
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"
If val($DOS) >= 5
$shell=createobject("shell.application")
$shell.namespace($Drive+"\").self.name=$Share + " on '" + $Server + "'"
$shell = 0
Endif
Else
color r+/n
$x=" - Failed: Error @error"
"$x"
$ErrorState=1
Endif
WriteLog ($LogText + $x)
WriteLog2("%temp%\MapDrive.log",$LogText + $x,1)
Color w+/n
Else
WriteLog ("Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'")
Endif
Endfunction

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

Top
#133997 - 2005-02-18 03:50 AM Re: Replacement or augmentation to a script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Also, some prior versions of KiX had a bug in USE and the * asterisk.

Use * /Delete

Use "*" /Delete /Persistent
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#133998 - 2005-02-18 04:51 PM Re: Replacement or augmentation to a script
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Also supply a parameter to QUIT - it is not optional.
Top
Page 1 of 1 1


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

Who's Online
0 registered and 1363 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.16 seconds in which 0.133 seconds were spent on a total of 12 queries. Zlib compression enabled.

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