This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Executing EXE before file copy
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 09, 2007
03:47 PM
Executing EXE before file copy
Hi there,
I've written an EXE in .NET that I want to execute before files are copied/installed, e.g. right when user launches my MSI.
The problem is that the EXE has a DLL it's dependent on. I've created a custom action as "new->EXE->Stored in Binary table" and pointed to my Exe. However, the execution fails at runtime with FileNotFoundException because the referenced DLL doesn't exist in the same directory during installation.
Any ideas?
Thanks.
I've written an EXE in .NET that I want to execute before files are copied/installed, e.g. right when user launches my MSI.
The problem is that the EXE has a DLL it's dependent on. I've created a custom action as "new->EXE->Stored in Binary table" and pointed to my Exe. However, the execution fails at runtime with FileNotFoundException because the referenced DLL doesn't exist in the same directory during installation.
Any ideas?
Thanks.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2007
12:22 PM
Can you set them up as a support files, and reference the exe in [SUPPORTDIR]\ instead of the binary table?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 13, 2007
03:37 AM
Hi both,
i've solve the same problem i think :
i have a exe Net 1.1 who have need a dll for to works and who have launch at the installation !
for to resolve this problem, i've add the exe and the net dll in my package and in my project i have writte a custom action.
This custom action is execute in the interface when a user click next.
for to have the path where i can find my exe and my dll i use this :
I hope this simple code will help you
Have nice day with installshield 🙂
Christophe
i've solve the same problem i think :
i have a exe Net 1.1 who have need a dll for to works and who have launch at the installation !
for to resolve this problem, i've add the exe and the net dll in my package and in my project i have writte a custom action.
This custom action is execute in the interface when a user click next.
for to have the path where i can find my exe and my dll i use this :
cchbValueBuffer = 512;
nResult = MsiGetProperty(hMSI, "SOURCEDIR", szPathSupport, cchValueBuf);
//MessageBox(szPathSupport, INFORMATION);
//Path to find the file
szPathCompletDll = szPathSupport+"programfiles\\****\\****\\****.dll";
//MessageBox("Path complet :" + szPathCompletDll, INFORMATION );
I hope this simple code will help you
Have nice day with installshield 🙂
Christophe
