2011-03-18 141 views
2

安装程序时,它会在安装完成后立即触发(通过安装程序)。但是,当我卸载从控制面板程序,然后试图打开EXE过,这提供了以下错误:卸载问题

Windows cannot find 'MyExe.com'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.

与背景的CMD.EXE。 后,我按OK键,会弹出另一个窗口,说:

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support...

尽管程序被卸载,这些错误都是不可取的。

另外,当我安装较新版本的程序已经存在时,我收到类似的消息,因为安装程序试图先卸载旧版本。

下面是代码:

.... 

<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" /> 

    <Upgrade Id="D2B0D435-0F86-4D5E-A988-B24215882***"> 
     <UpgradeVersion 
     Minimum="1.0.0.0" Maximum="99.0.0.0" 
     Property="PREVIOUSVERSIONSINSTALLED" 
     IncludeMinimum="yes" IncludeMaximum="no" /> 
     </Upgrade> 

    <CustomAction Id="LaunchApp" Directory="INSTALLDIR" ExeCommand="[SystemFolder]cmd.exe /C start MyExe.exe" /> 

    <InstallExecuteSequence> 
     <RemoveExistingProducts Before="InstallInitialize" /> 
     <Custom Action="LaunchApp" After="InstallFinalize" /> 
    </InstallExecuteSequence> 
    </Product> 
</Wix> 

我想什么,就是安装程序会尝试只在安装时运行该程序,并在处理卸载什么也不做。

提前致谢!

回答