Giáo Trình How To Use AutoIt A Professional Manner part 23 pptx

8 218 0
Giáo Trình How To Use AutoIt A Professional Manner part 23 pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

Function Reference DriveGetFileSystem trả lại kiểu file của ổ đĩa DriveGetFileSystem ( "path" ) Parameters path ổ đĩa muốn kiểm tra Return Value Success: trả lại chuỗi kí tự (xem bảng dưới) Failure: Sets @error to 1. Return Value Interpretation 1 (số) ổ đĩa không thể chứa dữ liệu (CD, Floppy, Zip) hoặc (RAW). "FAT" các ổ đĩa ~500 MB như Floppy, RAM disks, USB "FAT32" các ổ đĩa dùng cho Windows 9x/Me hard drives. "NTFS" các ổ đĩa dùng cho Windows NT/2000/XP hard drives. "NWFS" các ổ đĩa dùng cho Novell Netware file servers. "CDFS" các ổ đĩa như CD (hay ổ ảo) "UDF" các ổ đĩa như VCD Remarks The list of possible return values might be incomplete. Related DriveGetDrive, DriveGetLabel, DriveGetSerial, DriveGetType, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, DriveStatus Example $var = DriveGetFileSystem( "c:\" ) MsgBox(4096,"File System Type:", $var) Function Reference DriveGetLabel Trả lại tên của ổ đĩa DriveGetLabel ( "path" ) Parameters path ổ đĩa Return Value Success: trả lại chuỗi Failure: Sets @error = 1. Remarks None. Related DriveGetDrive, DriveGetFileSystem, DriveGetSerial, DriveGetType, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, DriveStatus Example $var = DriveGetLabel( "c:\" ) MsgBox(4096,"Volume Label: ",$var) Function Reference DriveGetSerial trả lại số Serial của ổ đĩa DriveGetSerial ( "path" ) Parameters path ổ đĩa Return Value Success: trả lại chuỗi Failure: Sets @error = 1. Remarks None. Related DriveGetDrive, DriveGetFileSystem, DriveGetLabel, DriveGetType, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, DriveStatus Example $var = DriveGetSerial( "c:\" ) MsgBox(4096, "Serial Number: ", $var) Function Reference DriveGetType Trả lại kiểu của ổ đĩa DriveGetType ( "path" ) Parameters path ổ đĩa Return Value Success: trả lại chuỗi như: "Unknown", "Removable", "Fixed", "Network", "CDROM", "RAMDisk" Failure: trả lại "" và đặt @error = 1. Remarks Danh sách các giá trị có thể trả lại ở trên có thể không đầy đủ. Related DriveGetDrive, DriveGetFileSystem, DriveGetLabel, DriveGetSerial, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, DriveStatus Example $var = DriveGetType( "c:\" ) MsgBox(4096, "Drive Type:", $var) Function Reference DriveMapAdd Maps a network drive. DriveMapAdd ( "device", "remote share" [, flags [, "user" [, "password"]]] ) Parameters device The device to map, for example "O:" or "LPT1:". If you pass a blank string for this parameter a connection is made but not mapped to a specific drive. If you specify "*" an unused drive letter will be automatically selected. remote share The remote share to connect to in the form "\\server\share". flags [optional] A combination of the following: 0 = default 1 = Persistent mapping 8 = Show authentication dialog if required user [optional] The username to use to connect. In the form "username" or "domain\username". password [optional] The password to use to connect. Return Value Success: Returns 1. (See Remarks) Failure: Returns 0 if a new mapping could not be created and sets @error (see below). (See Remarks) Remarks When the function fails (returns 0) @error contains extended information: 1 = Undefined / Other error. @extended set with Windows API return 2 = Access to the remote share was denied 3 = The device is already assigned 4 = Invalid device name 5 = Invalid remote share 6 = Invalid password Note: When using "*" for the device parameter the drive letter selected will be returned instead of 1 or 0, e.g. "U:". If there was an error using "*" then a blank string "" will be returned. If defined the user/password will be presented to the remote computer that will validate the credential. Related DriveMapDel, DriveMapGet Example ; Map X drive to \\myserver\stuff using current user DriveMapAdd("X:", "\\myserver\stuff") ; Map X drive to \\myserver2\stuff2 using the user "jon" from "domainx" with password "tickle" DriveMapAdd("X:", "\\myserver2\stuff2", 0, "domainx\jon", "tickle") Function Reference DriveMapDel Disconnects a network drive. DriveMapDel ( "device" ) Parameters drive The device to disconnect, e.g. "O:" or "LPT1:". Return Value Success: Returns 1. Failure: Returns 0 if the disconnection was unsuccessful. Remarks If a connection has no drive letter mapped you may use the connection name to disconnect, e.g. \\server\share Related DriveMapAdd, DriveMapGet Example . Persistent mapping 8 = Show authentication dialog if required user [optional] The username to use to connect. In the form "username" or "domainusername". password [optional]. DriveMapAdd Maps a network drive. DriveMapAdd ( "device", "remote share" [, flags [, "user" [, "password"]]] ) Parameters device The device to map,. letter will be automatically selected. remote share The remote share to connect to in the form "\servershare". flags [optional] A combination of the following: 0 = default 1 =

Ngày đăng: 08/07/2014, 20:20

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan