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更改默认启动顺序的需要,这样有助于开机时可以避免手动选择经常使用的系统了. 当然这解决办法不是博主的主意,本文纯属抄録者,故文章题目也声明了是转载,解决方案如下叙 ...
随机推荐
- JavaScript的Dom操作
两个练习: 1.两个表单里面的数据相互移动: <style type="text/css"> select { width: 100px; position: rela ...
- thinkphp修改和删除数据
1.在控制器MainController里面写一个方法,调用Nation表中的数据. public function zhuyemian() { $n = D("Nation"); ...
- ubuntu安装simplejson模块
在terminal中输入 sudo apt-get install python-simplejson -y import simplejson print simplejson.dumps(lens ...
- 常用的数据统计Sql 总结
最近刚在搞一个BI的项目,里面需要大量的sql 数据统计相关运用,加深了我又对SQL的理解与使用. 所以,分享几个数据统计时常用的sql 语句总结: 1. 统计各个条件下的数据 select Batc ...
- LibreOffice去重复数据
菜单:数据--更多筛选---标准筛选 点开“选项”,勾上“无重复值”. 然后还可以把结果复制到其它单元格.
- setTimeout 和 setInterval 的区别
setTimeout (表达式,延时时间)setInterval(表达式,交互时间)延时时间/交互时间是以豪秒为单位的(1000ms=1s) setTimeout 在执行时,是在载入后延迟指定时间 ...
- CMakeLists.txt
vtkRendering.libvtkCommon.lib ${VTK_LIBRARIES} vtkRendering vtkCommon
- Excel—分离中英文字符
1.如下图: 2.提取中文字符为: 3.提取应为字符为: 4.说明: 该方法的原理利用了LENB和LEN计算方法的不同,LEN计算字符数,中英文都算作一个字符:LENB计算字节数,中文算两个字节,英文 ...
- tomcat server.xml中文版
原文:http://www.blogjava.net/baoyaer/articles/107278.html Tomcat Server的结构图 该文件描述了如何启动Tomcat Server &l ...
- Linux下安装tensorflow