|
[技术文章] Setup Factory 打包时获取程序安装路径的方法
在打包程序时,需要获取用户选择的安装目录,写入注册表,获取语句为:SessionVar.Expand("%AppFolder%")..
例子:
Registry.SetValue(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Services\\USBDisable","ImagePath",SessionVar.Expand("%AppFolder%").."\\USBDisable.exe",REG_EXPAND_SZ);
或者:
Registry.SetValue(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Services\\USBDisable","ImagePath",SessionVar.Expand("%AppFolder%\\USBDisable.exe"),REG_EXPAND_SZ); |
|