/*
函式名稱: mcreggetvalue
建立 人:
建立日期:
功能描述:從登錄檔獲取路徑
返回型別:cstring
引數意義:subkey: keyname: 登錄檔名稱
修改記錄:
*/cstring fun::mcreggetvalue(cstring subkey, cstring keyname)
dwvaluetype = reg_sz;//登錄檔型別
dwstrcb = 128;
if(regqueryvalueex(hkey,lpszname,0,&dwvaluetype,(byte *)lpszstr,&dwstrcb)!=error_success)
regclosekey(hkey);
return cstring(lpszstr);}/*
函式名稱:getmodulepath
建立日期:
功能描述:獲取當前模組路徑
引數描述:modulename:模組名稱
*/cstring fun::getmodulepath(char *modulename)
catch(...)
return strpath;
}
DOS獲取登錄檔鍵值
例子 echo off for f delims i in reg.exe query hkey local machine software ut utscada v installdirectory do set installdir i set installdir installdir 35...
通過登錄檔獲取應用程式的路徑
孫廣東 2016.7.17 應用程式的路徑雖然可以硬編碼,例如,路徑 e program files unity editor unity.exe 但是這不是最佳的方式,因為使用者不可能將unity安裝到預設目錄。任意的程式都可以啦 這裡說的是在unity編輯器外,不是在unity編輯器中!若要提取...
C 獲取常見軟體的安裝路徑 呼叫登錄檔
很多軟體安裝位置不一樣,但是他們基本上會在登錄檔的同乙個位置寫下自己的名字和程式路徑,這個位置就是 所以只要去這個地方找軟體路徑就可以了。你可以新增你知道的正確的檔名,就是它在登錄檔中的名字。比如office word在登錄檔中叫winword 最終拿到的是那個exe的完全路徑,如果要資料夾的話就用...