0
我有一個installscriptmsi項目,其輸出是setup.exe。我可以在Vista和更高版本上安裝它,沒有任何問題。我沒有被提示輸入UAC。但在XP上,我始終提示運行對話框。我知道這是因爲設置LAAW_SHELLEXECUTEVERB =「runas」,我得到了Run as提示符。但我確實希望我的安裝程序在XP上以管理員身份運行。我還在Release下設置了RequiredExecutionLevel作爲管理員。InstallScript XP
那麼有沒有辦法讓installscriptmsi不要在XP上提示UAC。我正在使用IS2012。我正在粘貼下面的腳本。
function OnBegin()
STRING szProgram, szCmdLine, szDirectory;
NUMBER nShowWindow, nTimeOut, nOptions;
STRING szTestVersionKey;
begin
szProgram = "MsiExec.exe";
szDirectory = "";
nShowWindow = SW_NORMAL;
nTimeOut = 1000 * 60 * 10;
nOptions = LAAW_OPTION_USE_SHELLEXECUTE;
LAAW_SHELLEXECUTEVERB = "runas";
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
// uninstall another 3rd party software if on the system.
szSofTestVersionKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{15F6E1D5-12FF-4BBD-B02F-6440C7A2763C}";
if (RegDBKeyExist(szTestVersionKey)) then
szCmdLine = "/uninstall {15F6B1B5-12FF-4DBD-A02F-6640C7A2863C} /norestart /quiet";
LaunchApplication(szProgram, szCmdLine, szDirectory, nShowWindow, nTimeOut, nOptions);
endif;
end;
你在說什麼? Windows XP沒有UAC。 – SLaks
@SLaks - 我的意思是作爲對話框運行,詳見 - http://helpnet.flexerasoftware.com/installshield19helplib/Subsystems/installshield19langref/helplibrary/LAAW_SHELLEXECUTEVERB.htm – Prashant