Я пытаюсь использовать Microsoft Desktop App Converter (AKA Desktop Bridge), и у нашего имени издателя есть запятая, пробел и период в ней.Как вы определяете имя сложного издателя в Powershell?
например. CN="Acme, Inc."
Это не работает:
DesktopAppConverter.exe -Installer .\Installer.msi -Destination AppxFolder -PackageName "AcmeApp" -Publisher "CN=Acme, Inc." -Version 1.0.0.0 -MakeAppx
Я пробовал различные способы, чтобы избежать кавычки, как:
-Publisher "CN=\`"Acme`, Inc.\`""
приводит:
A positional parameter cannot be found that accepts argument 'Inc.'.
это:
-Publisher 'CN="Acme, Inc."'
Результаты в:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s): Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme, Inc.' is invalid according to its datatype 'http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2' - The Pattern constraint failed.
Это:
-Publisher 'CN="Acme\`, Inc."'
приводит к:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme`, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s):
Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme`, Inc.' is invalid according to its datatype 'http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2' - The Pattern constraint failed.
Это:
-Publisher "CN=Acme, Inc."
Результаты в:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s): Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme, Inc.' is invalid according to its datatype ' http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2 ' - The Pattern constraint failed.
Это:
-Publisher "CN='Acme\, Inc.'"
приводит:
A positional parameter cannot be found that accepts argument 'System.Object[]'.
Это:
-Publisher "CN=Acme\, Inc."
Результаты в:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme\, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s): Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme\, Inc.' is invalid according to its datatype ' http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2 ' - The Pattern constraint failed.
Это очень раздражает, потому что нам нужно, чтобы имя издателя было настроено идеально, иначе подписание не будет работать после того, как оно не будет соответствовать имени издателя в нашем сертификате подписи кода.
Каков правильный способ сделать это?
Когда я пытаюсь это получить: C: \ Program Files \ WindowsApps \ Microsoft.DesktopAppConverter_1.0.0.0_x64__8wekyb3d8bbwe \ DesktopAppConverter.ps1: Не найден позиционный параметр, который принимает аргумент 'Inc.'. – mikecousins
Вы запустили это из PowerShell? –
Я запускаю его из приложения DesktopAppConverter, которое является Powershell. – mikecousins