Func MakingSureNetworkIsUp() AutoItSetOption('MouseCoordMode', 0) AutoItSetOption('SendKeyDelay', 300) ; SplashText Message $sMessage = $xMessageAIP & @LF & $xMessagePRF & @LF & $xMessageDU1 & @LF & "Checking Access to HPDI Dir." SplashTextOn($xMessageBoxTitle, $sMessage, 300, 125, 1, 1, 0, "") $xScriptName = "MakingSureNetworkIsUp" ; Setting $sScriptName $ecode = 404 ; Setting error code to 404 in the event of a failure. ; Open Start Menu Click. Run("explorer") Sleep(1000) WinWait("File Explorer") WinActivate("File Explorer") Send("{TAB 3}{ENTER}") $CopyPaste1 = $NetDrivePath ClipPut($CopyPaste1) Sleep(500) Send('^v{ENTER}') WinWait("HPDI", "Address: \\NOAMSNYW024\Servicedesk\Field Service Repository 2018\HPDI") WinActivate("HPDI", "Address: \\NOAMSNYW024\Servicedesk\Field Service Repository 2018\HPDI") $xLogFileMessage = "It appears that we can see the network repository" & @CRLF & $NetDrivePath & @CRLF & " -- Phase 1 -- Script completed Successfully! -- " ScriptLogging() ; Writing out to the script logging file. $ecode = "411" ; Setting error code to 411 EventLog() ; Write to Application log in Event Viewer file. InfoMessageBox4() ; Confirm to Installer that this function has successfully completed. WinWait("HPDI", "Address: \\NOAMSNYW024\Servicedesk\Field Service Repository 2018\HPDI") WinActivate("HPDI", "Address: \\NOAMSNYW024\Servicedesk\Field Service Repository 2018\HPDI") Send("{TAB 6}{ENTER}") $CopyPaste1 = $HPDI_Dir ClipPut($CopyPaste1) Sleep(500) Send('^v{ENTER}') WinWait("HPDI_Dir", "Address: C:\Windows\HPDI_Dir") WinActivate("HPDI_Dir", "Address: C:\Windows\HPDI_Dir") $xLogFileMessage = "It appears that we can see the local repository" & @CRLF & $NetDrivePath & @CRLF & " -- Phase 2 -- Script completed Successfully! -- " ScriptLogging() ; Writing out to the script logging file. $ecode = "411" ; Setting error code to 411 EventLog() ; Write to Application log in Event Viewer file. InfoMessageBox4() ; Confirm to Installer that this function has successfully completed. WinWait("HPDI_Dir", "Address: C:\Windows\HPDI_Dir") WinActivate("HPDI_Dir", "Address: C:\Windows\HPDI_Dir") ; ControlClick("HPDI_Dir", "Address: C:\Windows\HPDI_Dir", "", "Right", 1, 744, 43) ; Send("w{ENTER}{ENTER}{DEL}Y{ENTER}") $xLogFileMessage = " -- Continuing with automation -- " & @CRLF & $NetDrivePath & @CRLF & " -- Phase 3 -- Script completed Successfully! -- " ScriptLogging() ; Writing out to the script logging file. $ecode = "411" ; Setting error code to 411 EventLog() ; Write to Application log in Event Viewer file. InfoMessageBox4() ; Confirm to Installer that this function has successfully completed. WinWait("HPDI_Dir", "Address: C:\Windows\HPDI_Dir") WinActivate("HPDI_Dir", "Address: C:\Windows\HPDI_Dir") Send("!{F4}") Sleep(2000) SplashOff() EndFunc ;==>MakingSureNetworkIsUp