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更改默认启动顺序的需要,这样有助于开机时可以避免手动选择经常使用的系统了. 当然这解决办法不是博主的主意,本文纯属抄録者,故文章题目也声明了是转载,解决方案如下叙 ...
随机推荐
- iOS - 对UIColor颜色反差
iOS中默认的很多方法可以获得不同种颜色的UIColor对象,但是White和Black等灰度值其实是用灰阶透明度调制 +colorWithWhite:alpha:,这些CGColorRef拥有2个组 ...
- mysql数据库远程访问指定数据库设置
grant all privileges on huarenwang.* to 'huarenwang'@'%' IDENTIFIED BY 'huarenwang'; on后面的是指定的数据库to后 ...
- Hibernate(Control)
案例:http://blog.csdn.net/jiuqiyuliang/article/details/39380465 对象关系映射框架,它对JDBC进行了轻量级的对象封装,可以使用对象编程思维来 ...
- SQL 同时查看2个表
1.要想上下查看2个表,一定要2个表显示的字段数量一致,格式一致 2.格式不一致就统一转换为字符串 -- to_char(s.saleid,'999999999') ,-- to_char(s.upd ...
- web前端基础知识-(六)Django基础
上面我们已经知道Python的WEB框架有Django.Tornado.Flask 等多种,Django相较与其他WEB框架其优势为:大而全,框架本身集成了ORM.模型绑定.模板引擎.缓存.Sessi ...
- 解决virtualbox装ghost xp装驱动时报portcls.sys蓝屏的问题
原因:portcls.sys是声卡驱动文件,驱动与模拟的声卡型号不匹配. 解决办法:进入PE,把C:\sysprep\audio目录删除.进入系统后用驱动精灵装驱动.
- 如何在Texstudio内加载语法检查词典?
如何在Texstudio编辑软件内加载"语法检查词典"? How to make dictionary work in TexStudio I am using TexStudio ...
- 解决Myeclipse PermGen space问题
myeclipse配置web服务器配置 Window—Preferences—Myeclipse—Servers—tomcat JDK的Optional Java VM arguments配置为:-X ...
- iOS动态部署之RSA加密传输Patch补丁
概要:这一篇博客主要说明下iOS客户端动态部署方案中,patch(补丁)是如何比较安全的加载到客户端中. 在整个过程中,需要使用RSA来加密(你可以选择其它的非对称加密算法),MD5来做校验(同样,你 ...
- jQuery sibings()的作用
jQuery sibings()的作用: siblings() 获得匹配集合中每个元素的同胞,通过选择器进行筛选是可选的. 当我们要对一个<li></li>列表的操作的时候,只 ...