(view source code of login_connect_network_drives_with_logging.kix as plain text)
; It doesn't hurt to make sure the C:\temp folder existsMD "C:\temp"
; Redirect messages to a log file, display; a message dialog if redirection failsIf RedirectOutput( "C:\temp\login.log", 1 ) <> 0
$Msg = "Error logging the results.@CRLF"
$Msg = $Msg + "Please notify the helpdesk.@CRLF"
$Msg = $Msg + "For now, results will be displayed on screen."
$RC = MessageBox( $Msg, "Log File Error", 64, 300 )
EndIf
$Error = 0
; Map drive G: to the department shareUSE G: "\\CompanyServer\Dept"
If @ERROR <> 0
"Error @ERROR while trying to map drive G:@CRLF"$Error = $Error + 1
EndIf
; Map drive H: to the user's home shareUSE H: "\\CompanyServer\@HOMESHR"
If @ERROR <> 0
"Error @ERROR while trying to map drive H: to the homedir@CRLF"$Error = $Error + 1
EndIf
; List all mappingsUSE List
; End redirection$RC = RedirectOutput( "" )
; Warn the user if (an) error(s) occurredIf $Error > 0
$Msg = "$Error error(s) occurred during login.@CRLF"
$Msg = $Msg + "The errors are logged to be "
$Msg = $Msg + "reviewed by the helpdesk staff.@CRLF"
$Msg = $Msg + "Please notify the helpdesk.@CRLF"
$RC = MessageBox( $Msg, "Login Error", 64 )
EndIf
page last modified: 2025-10-11; loaded in 0.0078 seconds