cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tim_Mayert
Level 9

SUPPORTDIR from Basic MSI Project

I may have already known this from way back, but I need a refresher as I do not often need or use the SUPPORTDir.

If we place an .exe file and it's and dependencies files into the SUPPORTDIR then can we use the built in custom actions to call this .exe file or can we only access these files through a InstallScript custom action?

Basically we have a new app that has to run during install with a bunch of dependency files and once the install is done we need to make sure these files are correctly removed from the system.

I would like to do this just from the built in custom actions and would perfer not to have to inlcude any InstallScript code to the project.

If this can not be done then I'll have to install the files, run the custom action and then run a new custom action that will delete the files at the end of the install.
Labels (1)
0 Kudos
8 Replies
TsungH
Level 12

Yes, I believe you can do that. I have just done that for a DLL (with other DLL dependencies) custom action last month using 2011 Premier.

One gotcha though, you will need to add a backslash after [SUPPORTDIR], since it doesn't adhere to the expected format of a directory property value which has a trailing backslash.
0 Kudos
Tim_Mayert
Level 9

Okay so then did you use the Direct Editor to create the custom action or did you use the Custom Action Wizard to create it?

When I use the custom action Wizard and specify launch an Executable from the directory table and then browse the list of directories it will not contain the SUPPORTDIR and it will not let me enter it.

Unless what you did select any directory at that point and continue with the wizard and then at when done you then manually changed the Working Directory to SUPPORTDIR. So is this how you did it? I have not giving this way a try yet, so if you can confirm that would be great.

Thanks,
0 Kudos
TsungH
Level 12

I used Custom Action Wizard, and selected Property table for Location. I don't think SUPPORTDIR was listed by default, since it's not in Property table. Knowing SUPPORTDIR property will be set during installation initialization, I just typed it in.

My suspicion is, when using Directory table for Location, InstallShield will complain during build if it couldn't find SUPPORTDIR in the table.
0 Kudos
Tim_Mayert
Level 9

Okay so if you use Property Table and [SUPPORTDIR] then it should work correctly. I'll give this a try and see what it does in my test environment.

Thanks,
0 Kudos
Tim_Mayert
Level 9

Nope that did not seem to work. I get the following:
Note: 1: 1721 2: InstallDirectxRuntimeFiles1 3: C:\Users\WINDOW~1\AppData\Local\Temp\{ED0FF410-41B9-441F-B457-4AC81782E8BF} 4: "C:\Users\WINDOW~1\AppData\Local\Temp\{ED0FF410-41B9-441F-B457-4AC81782E8BF}\dxsetup.exe" /silent
Info 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallDirectxRuntimeFiles1, location: C:\Users\WINDOW~1\AppData\Local\Temp\{ED0FF410-41B9-441F-B457-4AC81782E8BF}, command: "C:\Users\WINDOW~1\AppData\Local\Temp\{ED0FF410-41B9-441F-B457-4AC81782E8BF}\dxsetup.exe" /silent

I'll have to check to see which files are extracted there to see if all the dependency files are copied there, but initially it did not work.
0 Kudos
Tim_Mayert
Level 9

I checked during install and the temp folder [SUPPORTDIR] is correctly created and populated with all required files, but still get this error. Is it because it is using the Executable Property instead of the Working path as this is how the custom action creates if if you specify using a Property?
0 Kudos
TsungH
Level 12

Looks like Executable Property needs to be the absolute path pointing to the executable, not the absolute path to the folder that contains the executable.
0 Kudos
liorafar
Level 6

Please guys,
tell me please
when I call an immidiate custom action written in C#(DTF Wix)
this CA is sequenced after costFinalize
and I have a file in supportFiles under Independent
and I do the following:

string supportDir = session["SUPPORTDIR"]

then I get empty string
Why?

Please really need your help
Thanks
0 Kudos