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

安裝程序如將項(xiàng)目的安裝路徑寫(xiě)入注冊(cè)表 如:
- key =myform
- value =E:\test\SystemTray\SystemTray.EXE
如何將C#安裝路徑寫(xiě)入注冊(cè)表的回答1
Value = [TARGETDIR]\后面是你的相對(duì)路徑
如何將C#安裝路徑寫(xiě)入注冊(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);//這個(gè)就是安裝路徑
如何將C#安裝路徑寫(xiě)入注冊(cè)表的回答3
在自定義操作中添加屬性數(shù)據(jù).
- /dir=[TARGETVDIR] /targetdir="[TARGETDIR]\
分享名稱:如何將C#安裝路徑寫(xiě)入注冊(cè)表
網(wǎng)址分享:http://m.fisionsoft.com.cn/article/ccsegcp.html


咨詢
建站咨詢
