View Javadoc
1   package org.metricshub.wmi.shares;
2   
3   /*-
4    * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
5    * WMI Java Client
6    * ჻჻჻჻჻჻
7    * Copyright (C) 2023 - 2025 MetricsHub
8    * ჻჻჻჻჻჻
9    * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   *
13   *      http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
21   */
22  
23  import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
24  import com.sun.jna.platform.win32.COM.util.annotation.ComObject;
25  
26  /**
27   * Interface of Windows Script Host Network Object.
28   *
29   */
30  @ComObject(clsId = "{093FF999-1EA0-4079-9525-9614C3504B74}", progId = "WScript.Network")
31  public interface WindowsScriptHostNetworkInterface {
32  	/**
33  	 * Add a shared network drive mapping.
34  	 *
35  	 * @param localName The name by which the mapped drive will be known locally.
36  	 * @param remoteName The share's UNC name (\\xxx\yyy).
37  	 * @param updateProfile Indicate whether the mapping information is stored in the current user's profile.
38  	 * @param user The user name.
39  	 * @param password The user password.
40  	 */
41  	@ComMethod(name = "MapNetworkDrive")
42  	void mapNetworkDrive(String localName, String remoteName, Boolean updateProfile, String user, String password);
43  
44  	/**
45  	 * Remove a shared network drive mapping.
46  	 *
47  	 * @param name The name of the mapped drive you want to remove
48  	 * @param force Indicate whether to force the removal of the mapped drive.
49  	 * @param updateProfile Indicate whether to remove the mapping from the user's profile.
50  	 */
51  	@ComMethod(name = "RemoveNetworkDrive")
52  	void removeNetworkDrive(String name, Boolean force, Boolean updateProfile);
53  }