L'invite CCU affiche un nom aléatoire programme temporaire pour msi, peuvent être affichés le nom correct?

StackOverflow https://stackoverflow.com/questions/4315840

Question

Je construis un installateur MSI pour Windows et signer le programme d'installation en utilisant signtool. Quand je lance le .msi pour le tester, l'UAC (User Account Control) montre invite jusqu'à me demander si je veux permettre l'installation de procéder. C'est très bien, mais les spectacles invite un certain nombre de domaines, et pour le champ Nom du programme, il affiche quelque chose comme « 403b3.msi ». Ce n'est pas le nom du msi je cours.

Comment puis-je obtenir le bon nom du programme à afficher?

Était-ce utile?

La solution

Utilisez le / d argument de ligne de commande avec le nom de programme requis lors de l'exécution signtool pour signer le msi.

Il semble que les fenêtres d'installation crée une copie temporaire du fichier msi et lui attribue un nom généré avant de l'exécuter. Si vous n'utilisez pas / j avec signtool, vous pouvez voir le nom du fichier temporaire qui est pas très utile pour vos utilisateurs.

Autres conseils

est une version appliquée de @ commentaire de Scott-langham.

était directement à partir du PostBuildEvent d'un projet d'installation de Visual Studio - fichier vdproj

set signtool="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\signtool.exe"
set timestampurl=http://timestamp.digicert.com
set certpath="$(ProjectDir)CodeSigningCert.pfx"

:: Setup in your user environment variables
:: using something with low sort order to force off screen ZZCODECERTPASSWORD
if []==[%ZZCODECERTPASSWORD%] (
echo must set code signing certificate in ZZCODECERTPASSWORD environment variable. stopping build.
exit /b 2
)

:: need the filename with extension that is being generated
FOR /f %%i IN ("$(BuiltOuputPath)") DO (
SET outputfilename=%%~nxi
)

%signtool% sign /t %timestampurl% /f %certpath% /p %CODECERTPW% /d %outputfilename% "$(BuiltOuputPath)"
IF ERRORLEVEL 1 (
echo failed to sign MSI
exit /b 3
)

%signtool% sign /t %timestampurl% /f %certpath% /p %CODECERTPW% "$(ProjectDir)$(Configuration)\Setup.exe"
IF ERRORLEVEL 1 (
echo failed to sign boostrap setup EXE
exit /b 4
)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top