问题
I am trying to convert to UWP my desktop application Computator.NET (written in WinForms) which is using InstallShield for it's installer but DAC does not seem to find executable. It looks like it thinks that exe file is some temporary installer file. Log from the process is below:
WARNING: DesktopAppConverter : warning 'W_PACKAGE_DEPENDENCY_ADDED': A dependency on framework package 'Microsoft.VCLibs.140.00.UWPDesktop' was added to the AppxManifest.xml. See 'http://go.microsoft.com/fwlink/?LinkId=821959' for guidance on installing the package prior to local deployment. Otherwise, if this is in error, remove the corresponding entry from Dependencies in the AppxManifest.xml before packaging and deploying your application. WARNING: DesktopAppConverter : warning 'W_DISCOVERED_EXE_NOT_FOUND': Discovered shortcut indicates the app executable should be '\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_8C37B49DBB16422C8EF917F2AEA02293.exe', but this file cannot be found. WARNING: DesktopAppConverter : warning 'W_DISCOVERED_EXE_NOT_FOUND': Discovered shortcut indicates the app executable should be '\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_A9A8E5CA913F4E1EB7F6ACDB86DAFB8B.exe', but this file cannot be found. WARNING: DesktopAppConverter : warning 'W_DISCOVERED_EXE_NOT_FOUND': Discovered shortcut indicates the app executable should be '\Windows\SysWOW64\msiexec.exe', but this file cannot be found. WARNING: DesktopAppConverter : warning 'W_EXE_NOT_DISCOVERED': The application executable could not be determined from any shortcut. MakeAppx will fail until you fix the Application Executable property in the AppxManifest.xml WARNING: DesktopAppConverter : warning 'W_INSTALL_PATH_NOT_DISCOVERED': Converter could not determine your application's install path. Please use the -AppInstallPath parameter to move app binaries outside of VFS. WARNING: DesktopAppConverter : warning 'W_CANNOT_MAKEAPPX_WITHOUT_EXE': Unable to create appx package without setting the 'Application Executable' property in the AppxManifest.xml. Please set the 'Application Executable' property in the AppxManifest.xml before calling makeappx manually. Warning Summary: W_PACKAGE_DEPENDENCY_ADDED A dependency on framework package 'Microsoft.VCLibs.140.00.UWPDesktop' was added to the AppxManifest.xml. See 'http://go.microsoft.com/fwlink/?LinkId=821959' for guidance on installing the package prior to local deployment. Otherwise, if this is in error, remove the corresponding entry from Dependencies in the AppxManifest.xml before packaging and deploying your application.
W_DISCOVERED_EXE_NOT_FOUND Discovered shortcut indicates the app executable should be '\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_8C37B49DBB16422C8EF917F2AEA02293.exe', but this file cannot be found.
W_DISCOVERED_EXE_NOT_FOUND Discovered shortcut indicates the app executable should be '\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_A9A8E5CA913F4E1EB7F6ACDB86DAFB8B.exe', but this file cannot be found.
W_DISCOVERED_EXE_NOT_FOUND Discovered shortcut indicates the app executable should be '\Windows\SysWOW64\msiexec.exe', but this file cannot be found.
W_EXE_NOT_DISCOVERED The application executable could not be determined from any shortcut. MakeAppx will fail until you fix the Application Executable property in the AppxManifest.xml
W_INSTALL_PATH_NOT_DISCOVERED Converter could not determine your application's install path. Please use the -AppInstallPath parameter to move app binaries outside of VFS.
W_CANNOT_MAKEAPPX_WITHOUT_EXE Unable to create appx package without setting the 'Application Executable' property in the AppxManifest.xml. Please set the 'Application Executable' property in the AppxManifest.xml before calling makeappx manually.
I am runing Dekstop App Converter using fairly simple command:
DesktopAppConverter.exe -Installer C:\Computator.NET\Computator.NET.Installer.v2.1.0.beta.exe -InstallerArguments "/S" -Destination C:\Computator.NET\Appx -PackageName "Computator.NET" -Publisher "CN=Pawel Troka" -Version 2.1.0.0 -MakeAppx
回答1:
It seems like this issue is because of the way InstallShield installer is working.
Fortunetely there is an easy way to resolve this - we need to pass path to executable, just like it -AppExecutable "path_to_your_exe_file_after_installation"
So my final command looked like this:
DesktopAppConverter.exe -Installer C:\Computator.NET\Computator.NET.Installer.v2.1.0.beta.exe -InstallerArguments "/S" -Destination C:\Computator.NET\Appx -PackageName "Computator.NET" -Publisher "CN=Pawel Troka" -Version 2.1.0.0 -MakeAppx -AppExecutable "C:\Program Files (x86)\Computator.NET\Computator.NET.exe" -Sign
Note that I also added -MakeAppx
and -Sign
arguments, this is because I wanted it to be ready for testing - just needed to install certificate auto-generated.cer
to Trusted Root Certification Authorities
after conversion and my appx was ready to be installed and tested on my developer machine.
This tutorial was really helpful during the process and also this article helped me a bit.
来源:https://stackoverflow.com/questions/40157336/desktop-app-converter-with-installshield-installer-w-discovered-exe-not-found