I am working on an older InstallShield 2010 installer. It puts down DLLWRAP referenced from programfiles\installshield. There are two Custom actions that call functions DLLWrapCleanup after install finialize and DLLWrapStartup after SetupCompleteSuccess.
Can anyone explain what this is and what it does - or even if it is needed? Thanks.
As Installsheild Help describes here: it is a helper DLL for custom actions from a standard DLL.
If you change your custom actions from "standard" to "msi dll" you can remove the DLL and the dllwrap actions from your ISM.
Stefan Krueger describes the differences here.
A "MSI DLL" is a DLL that exports a function that matches the prototype defined in the MSI documentation. This is the only type of DLL that Windows Istaller can use directly as a custom action.
A "Standard DLL" can have (virtually) any prototype. InstallShield adds a wrapper around it that shaows Windows Installer only the MSI DLL interface and translates all additional parameters into properties. So essentially your cuatom action calls a DLL (provided by InstallShield) which calls another DLL (your Standard DLL).
Personally when I started doing this years ago, I used standard DLLs. When I learned the difference I switched to using MSI DLLs.
Related
I have a software that is coded in C#. It depends on two(!) third party dll which require Visual C++ 2008 and Visual C++ 2005 redistribute. Originally the installer was built in InnoSetup with all "vs200x_sp1_vcredist_x??.exe" embedded and run on install time. However since it lacks of some advanced features we decided to migrate to Wix Toolset.
The problem is, MSI was running in a more restricted environment, so I didn't figure out what is the best way to require those redistributable file being executed properly. I was tried to use merge modules instead but it didn't work - I can see that the files were installed but dependency walker shows that dll is still not link to the right version.
I think that WinSxS makes things worse at least in this case, since the software keep failing with some error message regarding "Windows Side by Side configiration (14001)" when I use the merge module approach.
So the question is:
Are there any way to build a MSI that runs a exe that install some prerequisites? I wouldn't mind those prerequisites being downloaded or just embedded.
I know that WinSxS information is stored in the manifest of the dll. So if I was permitted to remove the manifest information by the third party company, and use dynamic dll loading instead the problem could be resolved. However is this legitimate? Since I will then need to embedded the Microsoft dlls directally in the msi.
I have noticed one of the dll's manifest says its required version is "9.0.21022.8" but the one in my MSM file is "9.0.30729.6161". Is this the issue? If so can I resolve the issue by I modifying the manifest to allow the right version? I don't think this will cause the dll not working, anyway.
The msi file should install only your software. If you need to install pre-requisites, you should use a bootstrapper for it. Bootstrapper's responsibility is to install pre-requisites and it's not a task of your msi.
If you see that wix bootstrapper is complex you can try on a simple bootstrapper like the dotnet installer bootstraper. you can download it from
http://dblock.github.io/dotnetinstaller/
I an a novice VC++ programmer. I like my recent application's exe file but stupidly forgot to note all of the choices that I specified to the Wizard (project "style", shared DLL vs static library, etc). How can I get this information?
The project "style" is MFC Appliction if it generates an exe file. Library projects do not generate an exe file.
Beyond that, choices such as application type and type of menu/ribbon can easily be seen by using the wizard to create a bunch of MFC apps with the various options.
I am trying to implement the ProtectedData Class in C++ but are having some issues with compilation. My first error comes from not being able to use #using <System.Security.dll>. The error is that IntelliSense: "#using" requires C++/CLI to be enabled, however when I go into my project settings and set the common language runtime support to /clr, In my project I do not see my sytax errors getting corrected anymore. I then thought ok this must have fixed all the issues but then i go to compile and then I receive and error that '/clr' and '/Gm' command-line options are incompatible. So i go to look at this and I am not sure what to put to correct my problem. Is there any way I can use the ProtectedData Class without having to go through the different config process?
I am using Microsoft Visual C++ 2010 Express.
The link to the ProtectedData Class is here: http://msdn.microsoft.com/en-us/library/system.security.cryptography.protecteddata.aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-2
Thank you for your time.
You could use Microsoft Visual C# 2010 Express instead. C++/CLI is best used only as a .NET/native bridging framework, and only when other methods of interoperation aren't suitable (such P/Invoke).
If you decide to use C++, you do need to use the /CLR switch. Although you can tweak a C++ project into a C++/CLI project, it's best to start fresh with the one of the CLR project templates.
Two ways to indicate that you want to use an external .NET assembly:
specify it with #using, or
add it to the References section of the project properties
Since you mentioned Intellisense, you'll find that it's not supported in C++/CLI code.
I'm trying to patch a .NET DLL file using the Quick Patch project of InstallShield. The DLL needs to be registered for COM Interoperation.
When I patch the file, the dll seems to be replaced correctly in the GAC, but when I try to access it from my application I get an error indicating that the application cannot connect to the DLL.
I think that it is not being registered properly for COM interop, but I'm not sure about it.
Any idea of what should I do to make it work?
Thanks,
You probably have to run regasm(it's in .NET framework directory) with correct params to register for com interop. Also the DLL file is usually built with certain COM visible options selected. Been a long time since I dealt with that nightmare though, so can't remember all the details.
http://msdn.microsoft.com/en-us/library/tzat5yw6(v=vs.80).aspx
I am going through my project code base, which consits of libraries and
applications. Some libraries are Dll's. Code is written in C++ for Windows
using MS VS 2010.
I taught for Dll we should write DllMain function which is entry point for
the DLL application. But in my project for DLL "DllMain" function is not present.
My question when we require DllMain and when it is not required?
Thanks for your time and help.
DllMain is not mandatory. If you have some initialization code required to run when loading the dll, you should create a DllMain function, and treat the initialization there. Otherwise it's not required.
See here some more information.