zoukankan      html  css  js  c++  java
  • 使用vbs脚本添加域网络共享驱动器

    MapNetworkDrive Method

    Adds a shared network drive to your computer system.

                      object.MapNetworkDrive(strLocalName, strRemoteName, [bUpdateProfile], [strUser], [strPassword])
    

    Arguments

    object
    WshNetwork object.
    strLocalName
    String value indicating the name by which the mapped drive will be known locally.
    strRemoteName
    String value indicating the share's UNC name (xxxyyy).
    bUpdateProfile
    Optional. Boolean value indicating whether the mapping information is stored in the current user's profile. If bUpdateProfile is supplied and has a value of true, the mapping is stored in the user profile (the default is false).
    strUser
    Optional. String value indicating the user name. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user.
    strPassword
    Optional. String value indicating the user password. You must supply this argument if you are mapping a network drive using the credentials of someone other than the current user.
    Remarks

    An attempt to map a non-shared network drive results in an error.
    Example

    The following code maps the logical drive "E" to a network share with the UNC name "ServerPublic."
    VBScript
    Dim WshNetwork
    Set WshNetwork = WScript.CreateObject("WScript.Network")
    WshNetwork.MapNetworkDrive "E:", "ServerPublic"
    '
    WshNetwork.mapNetworkDrive "W:", "192.168.123.200it部常用软件",true,"KD","KD"
    JScript
    var WshNetwork = WScript.CreateObject("WScript.Network");
    WshNetwork.MapNetworkDrive ("E:", "\ServerPublic");

  • 相关阅读:
    IIFE(立即执行函数表达式)
    函数劫持
    nuxt.js怎么写一个全局的自定义指令
    nuxtjs里面使用vuex
    Nuxt.js端口冲突 Nuxt.js 如何更改端口配置?
    nuxt怎么去新增页面
    nuxt服务端渲染怎么引入element ui
    mac安装vue-cli和nuxt
    正则-怎么把字符串里面的英文去掉
    mac如果将项目部署到github,以及 github部署静态网站
  • 原文地址:https://www.cnblogs.com/sn-dnv-aps/p/4549837.html
Copyright © 2011-2022 走看看