0

我已经构建了一个外壳扩展 dll,用于显示 64 位和 32 位的右键单击上下文菜单。我在安装过程中使用 LaunchAppAndWait 函数在 installscript 中注册 dll。

它适用于 64 位机器,但不适用于 32 位机器。

if (SYSINFO.bIsWow64 ) then
    LaunchAppAndWait("", "regsvr32.exe /s " + TARGETDIR ^ "\\bin\\x64\\test.dll"  , LAAW_OPTION_WAIT);  
else
    LaunchAppAndWait("", "regsvr32.exe /s " + TARGETDIR ^ "\\bin\\test.dll"  , LAAW_OPTION_WAIT);  
endif;

有人遇到过这个问题吗?

4

1 回答 1

0

发现问题出在哪里。通过为命令行 arg 执行 LongPathToQuote 解决了这个问题。

dllPath = "/s " +TARGETDIR ^ "\\bin\\win32\\test.dll";
LongPathToQuote(dllPath,TRUE);
LaunchAppAndWait("regsvr32.exe", dllPath, LAAW_OPTION_WAIT); 
于 2013-07-25T07:28:19.413 回答