摘要:
在C#程序中,有这么几种表示当前路径的方法:System.Diagnostics.Process.GetCurrentProcess().MainModule.FileNameSystem.Environment.CurrentDirectorySystem.IO.Directory.GetCurrentDirectory()System.AppDomain.CurrentDomain.BaseDirectorySystem.AppDomain.CurrentDomain.SetupInformation.ApplicationBaseSystem.Windows.Forms.Applicat 阅读全文
posted @ 2011-09-26 20:49
ini_always
阅读(589)
评论(0)
推荐(0)
摘要:
今天在写一个用来对vmware workstation虚拟机进行操作的小脚本,主要原理是用python来调用vmrun.exe,传递各种不同的参数给它,来进行不同的操作。原理很简单,实现。。。其实也很简单,你会说:不就是一个os.system()调用吗?是的,我也是这么想的。我把vmware装在program files目录下,其完整路径为:C:\Program Files\VMware\VMware Workstation\vmrun.exe,你肯定注意到了,路径中有空格,于是,你会说,那加个双引号括起来不就行了嘛。是的,我也是这么想的。但是关键是,我们都这么想,程序不这么想,运行时,程序报 阅读全文
posted @ 2011-09-26 19:58
ini_always
阅读(18407)
评论(9)
推荐(4)

浙公网安备 33010602011771号