-
C# 取消磁盘共享功能的实例
Visual C# 取消Windows 磁盘共享源代码,在Widnwos7也可设置某一磁盘共享和不共享,本程序只是模拟实现的功能,可取消已被共享的磁盘,在文本框中输入盘符即可取消该盘的共享属性。编写思路,单击一个按钮,创建一个事件,将整个需要实现的功能都写进按钮事件中,事件的代码如下:
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "cmd.exe";//启动cmd命令
myProcess.StartInfo.UseShellExecute = false;//是否使用系统外壳程序启动进程
myProcess.StartInfo.RedirectStandardInput = true;//是否从流中读取
myProcess.StartInfo.RedirectStandardOutput = true;//是否写入流
myProcess.StartInfo.RedirectStandardError = true;//是否将错误信息写入流
myProcess.StartInfo.CreateNoWindow = true;//是否在新窗口中启动进程
myProcess.Start();//启动进程
//执行取消磁盘共享命令
myProcess.StandardInput.WriteLine("NET SHARE " + textBox1.Text + "$ /DEL");
MessageBox.Show("执行成功", "信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
- 2023-05-13 16:00:03下载
- 积分:1
-
进程模块视图和多
进程模块查看 < 多任务(多进程、多线程) >-Process module view < multi-tasking (multi-process, multi-threaded)>
- 2022-03-28 12:07:54下载
- 积分:1
-
这是一个驱动层的程序,实现了把文件映射成一个虚拟磁盘的功能。...
这是一个驱动层的程序,实现了把文件映射成一个虚拟磁盘的功能。-This is a driver layer procedures to realize a file mapping into a virtual disk function.
- 2022-09-17 07:25:03下载
- 积分:1
-
ns2 wireless simulation
ns2 wireless仿真 tcl脚本实例 很有参考价值-ns2 wireless simulation
- 2022-12-21 04:05:03下载
- 积分:1
-
高通QCELP
高通Qcelp-13k源代码,是CDMA中常用的那种
- 2022-03-20 07:00:26下载
- 积分:1
-
一个显示输入数据的程序,用的是DOS操作环境,
一个显示输入数据的程序,用的是DOS操作环境,-A display data entry procedures, using a DOS operating environment,
- 2022-04-17 00:28:19下载
- 积分:1
-
智能小车程序代码
简洁实用,考试必备
智能小车程序代码
简洁实用,考试必备-Intelligent Vehicle program code simple and practical, the examination must have
- 2022-08-04 10:04:49下载
- 积分:1
-
在MATLAB中读取edf格式数据,用于脑电信号处理
在MATLAB中读取edf格式数据,用于脑电信号处理-In MATLAB to read edf format data for EEG signal processing
- 2023-03-29 16:45:03下载
- 积分:1
-
本软件为易语言编写的一个小游戏,旨在思路的激发,程序本身没什么难度...
本软件为易语言编写的一个小游戏,旨在思路的激发,程序本身没什么难度-software for the easy language of a small game, the idea is to inspire, the process itself little more difficult
- 2022-02-13 19:45:38下载
- 积分:1
-
一个网上书店的程序代码
一个网上书店的程序代码-an online bookstore code
- 2023-06-16 10:00:04下载
- 积分:1