Computer win10 system, boot often in this state,
Need to manually open data manager, click here to join,
Because of QT development software need access to the map of network backup, consult tall person is there a way to let the computer automatically couplet on the network location without having to manually click?
CodePudding user response:
Write a script, set the startup try:
Set the fs=WScript. CreateObject (" Scripting. FileSystemObject ")
The Set net=WScript. CreateObject (" work "WScript.Net
Set the app=CreateObject (" Shell. Application ")
If the fs. Driveexists (" Z: ") then
Net. RemoveNetworkDrive "Z:"
Net. MapNetworkDrive "Z:", "\ \ 192.168.1.15 \ cy," True
App. The NameSpace (" Z: \ "). The Self. The Name="cy"
The else
Net. MapNetworkDrive "Z:", "\ \ 192.168.1.15 \ cy," True
App. The NameSpace (" Z: \ "). The Self. The Name="cy"
End the if