2016-10-17 5 views
0

XML 파일의 값을 기본값으로 수정 한 XML 파일을 항상 덮어 쓰므로 업그레이드시 XML 파일의 값을 InstallShield 기본 MSI 프로젝트로 다시 읽으려고합니다. . "시스템 검색"화면으로 이동하면 시스템 검색 마법사를 통해 새 XML 파일 값을 추가합니다. 그런 다음 exe.config 파일 (아래 내용)의 파일 이름을 입력하고 파일이 설치된 전체 경로를 지정하고 XPath에 대해 "/ configuration/appSettings/add [@ key ="UiServiceIpAddress "]"를 입력합니다. 속성 "값"의 값을 검색하여 값을 유효한 속성에 저장하도록 지시했습니다.InstallShield Basic MSI 시스템 검색이 xml 파일에 대해 실행되지 않습니다.

이 msi를 실행할 때 아무 것도하지 않는 것 같습니다. 내 MSI 로그 (아래 출력)를 보면 AppSearch 실행을 볼 수 있지만 xml appsearch는 언급하지 않았습니다. 인터넷 검색을 한 후, MSI에서 유효성 검사를 실행하는 방법을 알아 냈습니다. "유효하지 않은 파일 이름 : 테이블 : 서명, 열 파일 이름, 키 : NewSignature1"과 관련된 오류가 있습니다. 파일 이름이 나에게 맞는 것 같습니다. 그래서 나는 혼란 스럽다.

MSI는 로그 출력 :

Action start 13:21:48: AppSearch. 
AppSearch: Property: IEXPLORE, Signature: IEXPLORE_REG.C8C0673E_50E5_4AC4_817B_C0E4C4466990 
MSI (c) (80:B0) [13:21:48:597]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (80:B0) [13:21:48:597]: WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\Internet Explorer\IEXPLORE.EXE' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0). 
MSI (c) (80:B0) [13:21:48:597]: PROPERTY CHANGE: Adding IEXPLORE property. Its value is 'C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE'. 
AppSearch: Property: DOTNETVERSION40FULL, Signature: DotNet40Full 
MSI (c) (80:B0) [13:21:48:597]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (80:B0) [13:21:48:597]: PROPERTY CHANGE: Adding DOTNETVERSION40FULL property. Its value is '#1'. 
Action ended 13:21:48: AppSearch. Return value 1. 

XML 파일 :

<?xml version="1.0"?> 
<configuration> 
    <appSettings> 
     <add value="127.0.0.1" key="UiServiceIpAddress"></add> 
    </appSettings> 
</configuration> 

답변

0

XML 파일에서 값을 추출 할 Windows 설치의 프로젝트에 AppSearch 아무것도 없다. 설명의 몇 가지가 있습니다

  1. InstallShield 설치의 Windows Installer 이외의 기능을 추가했습니다, 그래서 거기에 그들이이 일을 추가 내부 사용자 지정 작업 할 수 있으며, 그 로그에 다른 곳에서 나타날 것입니다.

  2. 설명서가 어떻게 든 IniLocator 기능과 혼동되어 표준 INI 파일 (XML 파일이 아님)에서 값을 추출합니다.

또 다른 대답이 지적되면서, 1. 이유가 있습니다. ISXmlAppSearch에 대한 로그를 검색하십시오.

1

사용자가 AppSearch를 사용하여 XML 값을 검색하고 위에서 제공 한 XPATH 표기법을 사용하여 속성에 할당 한 것으로 의심됩니다.

MSI의 ICE 유효성 검사에서 appsettings.xml 파일의 형식이 잘못된 파일 이름이 표시됩니다. 파일 이름에 짧은 형식 (8.3) 형식을 제공하면됩니다.

예 : 파일 이름 = appSettings.xml

파일 이름 columnValue = APPSET ~ 1.XML | appsettings.xml

필 MSI 자체가 XML 파일 검색을 지원하지 않는다는에 정확하고 InstallShield가이를 관리하는 사용자 정의 작업을 추가했습니다.

'ISXmlAppSearch'을 검색하면 결과가 표시됩니다.

다음은 xml 파일을 찾을 수없는 내 설치 관리자의 로그 파일 결과입니다.여기

Action start 14:09:17: ISXmlAppSearch. 
InstallShield 14:09:18: Searching for the contents of the XML Element using the Element '//brand'. 
InstallShield 14:09:18: The location of the XML file, stored in the Property 'SYSTEMSETTINGS1', is currently a NULL value. It appears that the AppSearch did not find the file. 
InstallShield 14:09:18: Searching for the contents of the XML Element using the Element '//maincomputer'. 
InstallShield 14:09:18: The location of the XML file, stored in the Property 'SYSTEMSETTINGS', is currently a NULL value. It appears that the AppSearch did not find the file. 
MSI (s) (F0:1C) [14:09:18:199]: Doing action: LaunchConditions 
Action ended 14:09:18: ISXmlAppSearch. Return value 1. 

그리고 또 다른 당신이 무엇을 기대해야하는지 생각이 바로, 그래서 결과를 보여주고있다 :

Action start 9:28:24: ISXmlAppSearch. 
MSI (s) (D0!0C) [09:28:24:539]: PROPERTY CHANGE: Adding ISMEDFX property. Its value is 'ac'. 
InstallShield 9:28:24: Searching for the contents of the XML Element using the Element '//brand'. 
InstallShield 9:28:24: Success! The ISXmlAppSearch action set the value of the associated property to the following value: 'ac'. 
MSI (s) (D0!0C) [09:28:24:539]: PROPERTY CHANGE: Modifying MAINCOMPUTER property. Its current value is 'YES'. Its new value: 'yes'. 
InstallShield 9:28:24: Searching for the contents of the XML Element using the Element '//maincomputer'. 
InstallShield 9:28:24: Success! The ISXmlAppSearch action set the value of the associated property to the following value: 'yes'. 
MSI (s) (D0!0C) [09:28:24:539]: PROPERTY CHANGE: Adding STORAGELOCATIONROOT property. Its value is 'p:\program files (x86)\amazing charts\'. 
InstallShield 9:28:24: Searching for the contents of the XML Element using the Element '//storagelocationroot'. 
InstallShield 9:28:24: Success! The ISXmlAppSearch action set the value of the associated property to the following value: 'p:\program files (x86)\amazing charts\'. 
MSI (s) (D0:D8) [09:28:24:555]: Skipping action: MedFxSet (condition is false) 
MSI (s) (D0:D8) [09:28:24:555]: Doing action: LaunchConditions 
Action ended 9:28:24: ISXmlAppSearch. Return value 1. 
  • 는 InstallShield 설치 마법사를 사용하여이를 설정하기를, 나는 새로운 XML을 생성 유형 시스템 검색. systemsettings.xml |

    • 나는 내 경우 시스템 ~ 1.XML에서, 파일 이름을 지정했습니다. 참고 : 짧은 이름을 여기에 지정하면 마법사에서 잘못된 파일 이름 오류가 발생하므로 직접 편집을 사용하여 유효한 파일 이름이 있는지 확인해야합니다.

    • '찾는 위치'값을 '이전 검색에서 찾은 경로 :'로 설정했지만 실제 경로 인 경우 원하는 내용을 지정할 수 있습니다. 나는 이것이 INSTALLDIR 속성이 존재하지 않을 수도 있기 때문에 비용이 초기화되기 전에 끝났다고 생각합니다. 그래서 설치 디렉토리에 대해 AppSearch를 수행하고 이전 검색 옵션을 사용하는 것입니다.

    • 내 XPath를 XML 요소로 지정했습니다. 나는 이것에 대한 좌절감을 기억하고, 특히 XML 파일에서 유일하다면, 필자가 지정해야 할 모든 것이 나의 특별한 요소이다. 예 : // 부모 요소/브랜드가 아닌 브랜드

    • '내용보기'옵션을 '요소 내용'으로 선택한 다음 나중에 사용할 수있는 속성에 값을 저장했습니다.

수동으로 파일 이름 열고 직접 편집기를 수정합니다. Signature 테이블로 이동 항목을 찾아 FileName 값을 수정하십시오.