문제

내가 다음 CustomAction:

<CustomAction Id="CopyToSystem32" ExeCommand="copy /y 64bits.txt C:\Windows\System32" Directory="INSTALLFOLDER" Impersonate="no" Execute="deferred" Return="asyncWait" />

<InstallExecuteSequence>
  <Custom Action="CopyToSystem32" After="InstallFiles" >VersionNT64</Custom>
</InstallExecuteSequence>

그래서 그것은을 감지하는 64 비트 OS 에 파일을 복사 System32 폴더에 있습니다.는 경우에 저는 그것을 실행이다.bat 파일,그것은 잘 작동합니다.그러나 나는 그것을 선호하는 배치 명령입니다.

로그 다음을 말한다:

MSI (s) (74:AC) [10:08:33:473]: Executing op: ActionStart(Name=CopyToSystem32,,)
Action 10:08:33: CopyToSystem32. 
MSI (s) (74:AC) [10:08:33:473]: Executing op:         CustomActionSchedule(Action=CopyToSystem32,ActionType=3234,Source=C:\Program Files    (x86)\SetupProject\,Target=copy /y 64bits.txt C:\Windows\System32,)
MSI (s) (74:AC) [10:08:33:474]: Executing op:     ActionStart(Name=RegisterProduct,Description=Registering product,Template=[1])
Action 10:08:33: RegisterProduct. Registering product
MSI (s) (74:AC) [10:08:33:474]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk:     ,MediaCabinet=1\cab1.cab,BytesPerTick=0,CopierType=1,,,SignatureRequired=0,,,IsFirstPhysicalMedia=1)
MSI (s) (74:AC) [10:08:33:474]: Executing op:     DatabaseCopy(DatabasePath=C:\Windows\Installer\32ea43.msi,ProductCode={0C013216-61FB-4283-AF0A-    6CB264019F5B},,,)
MSI (s) (74:AC) [10:08:33:474]: Note: 1: 1402 2:     UNKNOWN\Products\612310C0BF163824FAA0C62B4610F9B5\InstallProperties 3: 2 
1: CopyToSystem32 2: 1631    

어떤 아이디어에서는 이유 ExeCommand 지 않은 복사를 내니까?

감사합니다!

도움이 되었습니까?

해결책

AFAIK copy 은 부품의 쉘 명령을 통과하지 않는 명령입니다.E..g 확인할 수 있습니다 이 경우 당신은 당신이 예를 들면지 dir copy.* /sWindows-폴더에 있습니다.파일이 없는 독립적으로 구현하는 copy.당신이 무엇을 할 수 있습니다:앞에 추가 호출을 명령 인터프리터의,예를 들어:

cmd /c copy /y 64bits.txt C:\Windows\System32

/c-매개 변수는 인터프리터를 닫은 후에 실행을(당신은 또한 사용 [%COMSPEC]-환경 변수를 대신 cmd).수도 있습 사용 CAQuietExecute 사용자 지정하는 것을 방지하는 작업을 수행하 cmd 팝업으로,설명 .
어쩌면 당신은 또한 단지 사용 CopyFile 에 대한 귀하의 작업?이 방법은 없을 거래와 쉘 창 etc.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top