我需要将idl虚拟机添加到我的目标位置以获取我的IDL .sav文件我正在使用Inno Setup,以及以下代码行:
[Icons]
Name: "{commondesktop}\clas"; Filename: "{code:GetIDLPath}"; Parameters: "{code:GetIDLParams}"; IconFilename: "{app}\clas_icon.ico"
[Code]
function GetIDLPath(Value: string): string;
begin
RegQueryStringValue(HKEY_LOCAL_MACHINE_32, 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\idlrt.exe', '', Result);
if Result = '' then
Result := 'idlrt.exe';
end;
function GetIDLParams(Value: string): string;
begin
// prepare the -vm option followed by a quoted application path to a file
Result := '-vm ' + AddQuotes(ExpandConstant('{app}\bin\BATCH_CLAS_MAIN.sav'));
// and replace backslashes to forward slashes
StringChangeEx(Result, '\', '/', False);
end;
此代码将为我提供64位IDL虚拟机exe文件的位置,而不是32位版本,如下所示:
"C:\Program Files\Exelis\IDL82\bin\bin.x86_64\idlrt.exe" -vm C:/clas/bin/BATCH_CLAS_MAIN.sav
但我需要:
"C:\Program Files\Exelis\IDL82\bin\bin.x86\idlrt.exe" -vm C:/clas/bin/BATCH_CLAS_MAIN.sav
我检查了这两个位置:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\idlrt.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\idlrt.exe
它们都只有64位版本路径。
有谁知道如何获得32位版本的路径?