windows 用默认软件打开文档
System.Diagnostics.Process.Start("Explorer.exe", string.Format("/e, \"{0}\" ", TargetFileName));
Windows Explorer can be invoked (called, started) with parameters to get a specific view.
Syntax
explorer [/n] [/e,] [/root,object,][[/select],sub-object,]
Strangely enough a final comma is required (at least in some cases – not known in which ones)!
Parameters
| /n | Opens a window in single-paned (My-computer) view for each selected item, even if the new window duplicated a window that is already open. This is the default view. |
| /e | Uses Windows Explorer view, which is most similar to File Manager view (Windows 3.x). |
| /root,object | Specifies the root level of the specified view. Default is to use the normal namespace root (desktop = my computer), whatever is specified for the root for the display. |
| /select | If /select is used, the parent folder is opened and the specified object is selected. |
Examples
| Display (explorer mode) drive D only | Explorer.exe /e, /root, d:\ |
| Display (explorer mode) the start menu programs | Explorer.exe /e, /root, "f:\Win_95\Start Menu\Programs" |
| Diplay (single paned view) the c:windows folder and select calc.exe | Explorer.exe /select,c:\windows\calc.exe |
| Display single pane view with drive m selected | Explorer.exe /e, /select, "m:\" |
Explorer [/n] [/e] [(,)/root,<object>] [/select,<object>] /n Opens a new single-pane window for the default
selection. This is usually the root of the drive Windows
is installed on. If the window is already open, a
duplicate opens. /e Opens Windows Explorer in its default view. /root,<object> Opens a window view of the specified object. /select,<object> Opens a window view with the specified folder, file or
application selected. Examples: Example 1: Explorer /select,C:\TestDir\TestApp.exe Opens a window view with TestApp selected. Example 2: Explorer /e,/root,C:\TestDir\TestApp.exe This opens Explorer with C: expanded and TestApp selected. Example 3: Explorer /root,\\TestSvr\TestShare Opens a window view of the specified share. Example 4: Explorer /root,\\TestSvr\TestShare,select,TestApp.exe Opens a window view of the specified share with TestApp selected.
windows 用默认软件打开文档的更多相关文章
- AHK(1)之运行程序或打开文档
小鸟学AHK(1)之运行程序或打开文档 AHK就是AutoHotKey,是一款免费的.Windows平台下开放源代码的热键脚本语言. 亲爱的朋友,叫我怎么向你推荐它呢! COOL,对,就是酷,那么 ...
- PowerPoint 打开文档发现.pptx中胡内容有问题
一.问题的提出 有一个文件,在window 7操作系统中通过邮箱地址保存到本地,结果打开的时候出现[PowerPoint 打开文档发现 文件.pptx中胡内容有问题] 然后提示[如果您信任此演示文稿的 ...
- 修改Windows7系统默认软件安装目录
Windows7系统默认软件安装目录都在C盘Program Files文件夹有时候我们需要把软件安装到其他地方,如果每次安装的时候都要重新选择一次十分麻烦,下面Windows7之家教你修改软件默认安装 ...
- 软件开发过程文档-cgaowei
鸡肋——食之无味,弃之可惜”,软件开发过程文档遭遇了鸡肋一样的境遇. 目前敏捷软件开发过程非常流行.相对于软件开发过程文档,敏捷软件开发过程更加重视可运行的程序.关于软件开发过程文档,两个极端都是不可 ...
- iOS SDK:预览和打开文档
iOS中的沙盒可以让平台更加的安全,这也是沙盒给用户带来的最主要好处.不过由于沙盒的严格限制,导致程序之间共享数据比较麻烦.一般在程序间共享文档可以通过UIDocumentInteractionCon ...
- Windows Redis默认配置文件,Redis配置不生效解决方案
Windows Redis默认配置文件,Redis配置不生效解决方案, Windows Redis自启动配置不生效解决方案,Windows Redis增加自动启动服务 >>>> ...
- 将Windows系统默认的Administrator帐号改名为我们自定义的名称
将Windows系统默认的Administrator帐号改名为我们自定义的名称.. ---------如何将Administrator帐号改名为我们自定义的名称:Win+R--->>输入g ...
- 如何将Windows电脑桌面上软件图标下的文字去掉
如何将Windows电脑桌面上软件图标下的文字去掉 重命名的时候,点击鼠标右键.选择“插入Unicode控制字符” 效果
- Linux之Ubuntu与Windows更改默认启动顺序[转载]
装双系统后,经常会遇到与Windows更改默认启动顺序的需要,这样有助于开机时可以避免手动选择经常使用的系统了. 当然这解决办法不是博主的主意,本文纯属抄録者,故文章题目也声明了是转载,解决方案如下叙 ...
随机推荐
- zookeeper原理解析-客户端与服务器端交互
Zookeeper集群中server数量总是确定的,所以集群中的server交互采用比较可靠的bio长连接模型:不同于集群中sever间交互zookeeper客户端其实数量是未知的,为了提高zooke ...
- HTML之CSS学习
学前预备 <!DOCTYPE html> <html> <head> <title>标题</title> <meta charset= ...
- Dell R730 配置完RAID后装系统找不到硬盘。
1. 各硬盘只是灯都正常.硬件无故障. 2. 8个600G硬盘做的RAID0和RAID5后都在装系统选盘处找不到硬盘.(注意: 第一次做raid 时,没有进行初始化init.后补做也无效,一直复现这个 ...
- Nginx 颁发自签证书
首先,确保安装了OpenSSL库,并且安装Nginx时使用了–with-http_ssl_module参数. 1:进入生成证书的目录 cd /usr/local/nginx/conf 2:使用open ...
- emulator control无法使用问题
请使用Google 自带的控制器:
- JSP多文件上传到服务器
问题描述: 作为一个Java开发Web方向的程序员,很重要的一个功能,就是上传文件功能是一定要掌握的,今天整理了一下代码. 1.JSP显示界面代码和动态添加上传文件个数. <%@ page la ...
- webSphere内存溢出
有一个做了很长时间的项目,是用websphere做生产环境的,可是一旦加载的项目过多,webSphere就很傲娇的内存溢出,这是一个折腾了公司里某个前辈很久很久的问题,因为是测试版,所以各种官方文档说 ...
- ORACLE 常见错误
ora-00904 : 标识符无效:查询语句中的列或表在oracle 中不存在:
- python动态创建类的声明
动态创建类的声明 使用内置函数type,原型:class type(name, bases, dict)name是类的名字,相当于__class__bases是类的基类,元组,可以有多个基类,但是基类 ...
- [C/C++] C/C++延伸学习系列之STL及Boost库概述
想要彻底搞懂C++是很难的,或许是不太现实的.但是不积硅步,无以至千里,所以抽时间来坚持学习一点,总结一点,多多锻炼几次,相信总有一天我们会变得"了解"C++. 1. C++标准库 ...