TAILIEUCHUNG - Microsoft WSH and VBScript Programming for the Absolute Beginner Part 47

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 47. If you are new to programming with Microsoft WSH and VBScript and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical WSH and VBScript programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book,. | 440 Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition use the objWshNetwork object s MapNetworkDrive method to map to drive DriveLetter NetworkPath End Sub Disconnecting Mapped Drives You can use the WshNetwork objects RemoveNetworkDrive method to disconnect a mapped drive when it s no longer needed. For example you might want to do this at the end of the script that created the drive mapping after it has completed its assigned task. The syntax of the RemoveNetworkDrive method is as follows letter kill persistent Letter is the drive that has been assigned to the mapped drive. Kill is an optional setting with a value of either True or False. Setting it to True disconnects a mapped drive even if it is currently in use. Persistent is also optional. Set it to True to disconnect a permanently mapped drive. The following VBScript demonstrates how to disconnect the network drive that was mapped by the previous script Script Name Author Jerry Ford Created 12 07 02 Description This script demonstrates how to add logic to VBScripts in order to terminate a network drive mapping. Initialization Section Option Explicit On Error Resume Next Dim objWshNet Instantiate the objWshNetwork object Set objWshNet Appendix A WSH Administrative Scripting Main Processing Section Call procedure that deletes network drive connections passing it the the drive letter to be removed MapNetworkDrive z Terminate script execution Procedure Section This subroutine disconnects the specified network drive connection Sub MapNetworkDrive DriveLetter Use the objWshNetwork object s RemoteNetworkDrive method to disconnect the specified network drive DriveLetter End Sub Printer Administration Printer administration involves many tasks. One task is setting up network printer connections. Other tasks include managing print jobs and

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.