1

I have the following code in my WiX project

<CustomAction Id="ExtractHelp" Directory="DocFolder" Execute="commit" Impersonate="no" ExeCommand="[MYAPPINSTALLFOLDER]Doc\help_zip.exe"  />
      <InstallExecuteSequence>
           <Custom Action="ExtractHelp" Before="NativeCompilation">NOT REMOVE</custom>
      </InstallExecuteSequence>

Where help_zip is a 7z SFX archive i created to bundle up our help files and extract them in our DocFolder during install. The only issue is, the files keep extracting to C:\Windows\SysWow64, not the folder specified by DocFolder. Any ideas?

Also, help_zip.exe resides in DocFolder, so it shouldn't even need arguments to output to the directory it sits in, at least as far as I know =\

EDIT I have edited the code above to show my solution. Please note that NativeCompilation is another action we created (not a part of WiX), and NOT REMOVE refers to executing the action when we are not uninstalling.

codewario
  • 19,553
  • 20
  • 90
  • 159
  • It looks that it extracts the files to the current directory, which happens to be C:\Windows\SysWow64. Does it work correctly if you run this same command from command prompt where current directory is the directory where you want extracted files to go? You can run your MSI with logging (`/l*v msi.log`) to see the exact command it starts. – Alexey Ivanov May 17 '11 at 19:40

1 Answers1

1

Try setting the Directory attribute so you can use a type 34 custom action (EXE with working directory). This way you can decide the working directory of the SFX archive.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
  • This is what i ended up doing, along with a couple other mods to the code listen above. I will post my changes in a few minutes. – codewario May 18 '11 at 13:48