[wix-users] Change Temp folder used during build

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Jan 5 10:02:43 PST 2017


Why are you using a batch file to sign?  What does your build event look like?  Have you tried using the provided signing events Wix already sources for you?

Ex:
  <Target Name="SignCabs" DependsOnTargets="UsesSignTool">
    <Exec Command=""$(SignToolPath)" sign /t http://timestamp.digicert.com /sha1 $(Sha1) /a "%(SignCabs.FullPath)"" />
    <Exec Command=""$(SignToolPath)" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /sha1 $(Sha256) /a "%(SignCabs.FullPath)"" />    
  </Target>

  <Target Name="SignMsi" DependsOnTargets="UsesSignTool">
    <Exec Command=""$(SignToolPath)" sign /t http://timestamp.digicert.com /sha1 $(Sha1) /a "%(SignMsi.FullPath)"" />
    <Exec Command=""$(SignToolPath)" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /sha1 $(Sha256) /a "%(SignMsi.FullPath)"" />    
  </Target>

Don't forget to define: <SignOutput>true</SignOutput> in your WixProj.  Also I didn't include UsesSignTool because mine isn't clean, but al it is doing is setting the SignToolPath.
 
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Brian Enderle
Sent: Thursday, January 05, 2017 8:52 AM
To: WiX Users <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Change Temp folder used during build

When I build a WiX project in Visual Studio 2015 that has a pre-build or post-build event, AVG is identifying these events as suspicious.  This requires that I manually tell AVG to allow this operation each time I build the project.

As I investigated the issue, I found that the WiX build event is converted to a file in C:\Users\<username>\AppData\Local named "tmp*.exec.cmd" where '*' appears to be a random GUID that changes with each build (i.e., tmpe64b16a499eb4d85ab32156b25079ed5.exec.cmd)  This GUID doesn't appear to be associated with any GUID in the WiX project that I can find.

The file contents look like this:


setlocal
set errorlevel=dummy
set errorlevel=
"D:\Projects\<MyProjectFolder>\<MyProjectWiXFolder>\SignItAll.bat"
"D:\Projects\<MyProjectFolder>\"
exit %errorlevel%


SignItAll.bat is a batch file that signs the files in the MSI with our credentails.


AVG provides a mechanism to ignore files run from a particular directory but obviously I don't want to add C:\Users\<username>\AppData\Local.  Is there a way I can tell WiX to output these files to a custom folder (i.e., C:\Users\<username>\AppData\Local\WiX).

If anyone has found a different solution to this problem, I am open to alternative options.


Brian

If you can't explain it simply, you don't understand it well enough.  - Albert Einstein

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list