javascript 调用cmd命令建立网络共享连接
2012-01-04 23:35
183 查看
建立目的电脑(Linux OS)的共享连接,目的电脑IP:192.168.17.211 共享文件夹prison 用户名 root 密码 88888888
<html>
<head>
<title>共享连接</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript">
function addNet(){
var o = new ActiveXObject("WScript.Shell");
o.run("net use \\\\192.168.17.211\\prison 88888888 /USER:root",0);
}
function deleteNet(){
var o = new ActiveXObject("WScript.Shell");
o.run("net use \\\\192.168.17.211\\prison /del",0);
}
</script>
</head>
<body>
<input type="button" value="添加" onclick="addNet()">
<input type="button" value="删除" onclick="deleteNet()">
</body>
</html>
<html>
<head>
<title>共享连接</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript">
function addNet(){
var o = new ActiveXObject("WScript.Shell");
o.run("net use \\\\192.168.17.211\\prison 88888888 /USER:root",0);
}
function deleteNet(){
var o = new ActiveXObject("WScript.Shell");
o.run("net use \\\\192.168.17.211\\prison /del",0);
}
</script>
</head>
<body>
<input type="button" value="添加" onclick="addNet()">
<input type="button" value="删除" onclick="deleteNet()">
</body>
</html>
相关文章推荐
- javascript 调用cmd命令建立网络共享连接
- 调用Win32 API netapi32.dll 实现UNC(网络共享)连接的管理(一)
- 调用Win32 API netapi32.dll 实现UNC(网络共享)连接的管理(一)
- 利用javascript建立两台电脑间的网络连接!
- Win7下建立WiFi热点共享网络(共享3G无线网卡/有线本地连接)
- ubuntu连接无线后,把网络共享到局域网(建立ubuntu路由)
- sql server服务看不到,显示为远程过程调用在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误10061
- android 建立蓝牙共享网络后,数据连接图标被打开
- [原]调用Win32 API netapi32.dll 实现UNC(网络共享)连接的管理(一)
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: 命名管
- iphone4&nbsp;通过USB共享显示网络连接…
- Error:System.Data.SqlClient.SqlException: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误,请检查远程连接是否开启。解决方法
- 利用Socket建立网络连接的步骤
- 与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误
- 数据业务建立流程之发起网络连接过程(原)
- win7 下建立android等设备可用的wifi 接入点--可共享宽带连接,本地连接,无线连接等
- 已成功与服务器建立连接 但是在登录过程中发生错误。 provider 共享内存提供程序 error 0 管道的另一端上无任何进程。
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。