The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Attn Win2k UFies: Win2k and batch files by talon07202004-12-14 11:23:14
  alternate script with some error handling by areilly 2004-12-14 12:16:49
heres a distilled version of what I've used for user login scripts - this one will spit out the error codes/descriptions as well, so it might help

save it as a *.vbs file
<starting from here 'till the end>

Option Explicit

Dim objNetwork

Set objWSHShell = CreateObject("WScript.Shell")

MsgBox "Mapping Drives..."
On Error Resume Next
Set objNetwork = CreateObject("WScript.Network")
Err.Clear
objNetwork.MapNetworkDrive "G:", "\\excell\sys\shared\group"
If Err.Number <> 0 Then
MsgBox ("Error # " & CStr(Err.Number) & " " & Err.Description)
End If
[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)