新聞中心
這里有您想知道的互聯(lián)網營銷解決方案
如何將C#安裝路徑寫入注冊表
如何將C#安裝路徑寫入注冊表的提問

安裝程序如將項目的安裝路徑寫入注冊表 如:
- key =myform
- value =E:\test\SystemTray\SystemTray.EXE
如何將C#安裝路徑寫入注冊表的回答1
Value = [TARGETDIR]\后面是你的相對路徑
如何將C#安裝路徑寫入注冊表的回答2
獲取安裝路徑
- string str = Assembly.GetExecutingAssembly().GetName().CodeBase;
- if (str.ToLower().IndexOf("file:///") >= 0)
- {
- str = str.Substring(8, str.Length - 8);
- }
- string path = System.IO.Path.GetDirectoryName(str);//這個就是安裝路徑
如何將C#安裝路徑寫入注冊表的回答3
在自定義操作中添加屬性數(shù)據(jù).
- /dir=[TARGETVDIR] /targetdir="[TARGETDIR]\
本文名稱:如何將C#安裝路徑寫入注冊表
文章分享:http://m.5511xx.com/article/ccsegcp.html


咨詢
建站咨詢
