InstallShild custom action arguments
I am useing InstallShield Limited Edition for Visual Studio 2010 to create an installer, and I am trying to add an executable custom action.
My custom action in an exe that is installed to the install dir. The custom action needs to use another file that is located in the install dir as well.
How do I get the path to the install dir to my exe? I tried to pess [INSTALLDIR] as an argument but it translates to "C:\Program" inste开发者_JS百科ad of the correct dir ("C:\Progam Files\MyCompany\MyProduct"). I tried [TARGETDIR] but it translate to E:\ (wrong as well).
Any Ideas?
Found the problem.
using [INSTALLDIR] is currect. the problem is with powershell. reading C:\Program Files... as C:\Program.
the Issue is discussed here:
http://www.leeholmes.com/blog/2006/05/05/running-powershell-scripts-from-cmd-exe/
EXE custom actions are very limited. If I was using InstallShield LE, I'd create a C# WiX/DTF Custom Action and consume it in a WiX Merge Module and then consume that merge module in your InstallShield LE project. This gives you very powerful solution.
精彩评论