当前位置:编程学习 > C#/ASP.NET >>

vb.net模拟win+R运行一段代码卸载软件

想卸载一个软件,想通过如下的命令去卸载,已知在win+r中运行是可以的。现在想在vb.net中直接运行这个命令,试过了shell和process.start都没有成功,请教各位了。
MsiExec.exe /I{D3D0FB3B-518B-413E-8E01-9D58943BD1FD} --------------------编程问答-------------------- 参看这篇:http://topic.csdn.net/u/20120817/16/ceb2214a-8b2d-44cb-a201-4110487ae8c3.html --------------------编程问答-------------------- 关于
Using Process.Start(System.Environment.SystemDirectory & "\msiexec.exe", "/x """ & args(1) & """")
这一段args(1)对应的字串"^\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}$"
看不太懂,为什么和'{5E705D88-92D1-4C0C-ADEF-836F41429E7A}这个不一样,有什么对应规律吗?
还有就是我把
Process.Start(System.Environment.SystemDirectory & "\msiexec.exe", "/x """ & "{D3D0FB3B-518B-413E-8E01-9D58943BD1FD} " & "\q""")
我的字串替换到那个当中,是可以实现卸载的功能,但是我想通过后面的"\q"的参数来实现默认卸载的功能,那我应该怎么去添加那个参数。望指教,谢谢
引用 1 楼  的回复:
参看这篇:http://topic.csdn.net/u/20120817/16/ceb2214a-8b2d-44cb-a201-4110487ae8c3.html
--------------------编程问答-------------------- 这是正则 

Using Process.Start(System.Environment.SystemDirectory & "\msiexec.exe", "/x """ & args(1) & " \q""") --------------------编程问答-------------------- 那我想问一下我应该怎么改才能实现我想要的功能呢,正则表达式我不懂,现在就是想要实现能够直接静默卸载那个软件的动作,应该怎么去做。求解答,谢谢呀!
引用 3 楼  的回复:
这是正则 

Using Process.Start(System.Environment.SystemDirectory & "\msiexec.exe", "/x """ & args(1) & " \q""")
--------------------编程问答--------------------
Process.Start(System.Environment.SystemDirectory & "MsiExec.exe", "/I{D3D0FB3B-518B-413E-8E01-9D58943BD1FD}")
补充:.NET技术 ,  VB.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,