camoh
asked on
How can I check for prerequisites and install them without actually installing my application?
Hi,
I need some help to understand how I can check for prerequisites, specifically .NET Framework, and install them without actually installing my application but only running it. At the present I am taking the EXE from the debug\bin folder. I know I could add a setup project to my application but it also wants to actually install it into the Program Files folder and places it in the Add/Remove Programs.
My application is not a program that will be run over and over by the user. It has another program and a service embedded within the EXE that it needs to install for the user and then the user can delete my EXE.
The ClickOnce feature in the Setup project is great except it then wants to go on and install my windows application as a program as mentioned above and this is what I would like to avoid so the user' Program Files folder is not cluttered by the unnecessary program.
Thanks in advance for you help!
I need some help to understand how I can check for prerequisites, specifically .NET Framework, and install them without actually installing my application but only running it. At the present I am taking the EXE from the debug\bin folder. I know I could add a setup project to my application but it also wants to actually install it into the Program Files folder and places it in the Add/Remove Programs.
My application is not a program that will be run over and over by the user. It has another program and a service embedded within the EXE that it needs to install for the user and then the user can delete my EXE.
The ClickOnce feature in the Setup project is great except it then wants to go on and install my windows application as a program as mentioned above and this is what I would like to avoid so the user' Program Files folder is not cluttered by the unnecessary program.
Thanks in advance for you help!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
CodeCruser,
That project seems a bit old. Visual Studio 2005 complained about parts of it possibly being outdated or unsafe and I am not familiar with the code language that it is written in. So for me to change it to upgrade it could make it "buggy". I am much more familiar with vb.net and VBA.
Another thing I don't really like about that solution is that I would need to compile the dotnetfx.exe in the bootstrapper (if I understand it correctly). This makes the files quite large. I would rather reference it to Microsoft to download the version that is missing like you can do with the Setup template that comes with VS 2005.
cvborqrd,
Can you explain this 'custom action for installig it from external location or nested if not installed' a little more or give an example? I have never worked with a custom action.
Thanks for you input.
That project seems a bit old. Visual Studio 2005 complained about parts of it possibly being outdated or unsafe and I am not familiar with the code language that it is written in. So for me to change it to upgrade it could make it "buggy". I am much more familiar with vb.net and VBA.
Another thing I don't really like about that solution is that I would need to compile the dotnetfx.exe in the bootstrapper (if I understand it correctly). This makes the files quite large. I would rather reference it to Microsoft to download the version that is missing like you can do with the Setup template that comes with VS 2005.
cvborqrd,
Can you explain this 'custom action for installig it from external location or nested if not installed' a little more or give an example? I have never worked with a custom action.
Thanks for you input.
i don't know how you can do it with you msi editing tool. With Wise Package Studio i can include prerequisites from the GUI. It will be downloaded and added to my msi project. See my screenshot. I'll try later to do a dummy msi for you
prereq.jpg
prereq.jpg
i've created a dummy msi. It shows only the progress bar (can be disabled) That msi checks the reg key whether .Net 3.5 is installed (from nepaluz topic). If not it will be downloaded and installed silently (async. no wait, the dummy msi will be closed and not registred in the appwiz) if Net 3.5 is installed nothing will happen(only the progress bar runs).
https://rapidshare.com/files/459805825/dummy_with_installing_net35_fom_internet.msi
i hope i could help you
https://rapidshare.com/files/459805825/dummy_with_installing_net35_fom_internet.msi
i hope i could help you
But VB.NET would be no use if there is no .NET framework so you need a bootstraper which runs without the .NET and checks if it exists.
ASKER
I'm testing, researching, testing, and researching more...
I will keep watching posts along with doing my own testing and let you know when I find a solution.
Thank you very much for your input so far!
I will keep watching posts along with doing my own testing and let you know when I find a solution.
Thank you very much for your input so far!
ASKER
I agree, CodeCruiser, that I need a bootstraper. VS 2005 comes with one and I would like to use that one instead of needing to buy another commercial one.
cyborgrd, I tried your msi and it works but how can I make the built-in bootstraper that comes with VS 2005 work as you demonstrate in your msi? I do not have Wise Package Studio.
cyborgrd, I tried your msi and it works but how can I make the built-in bootstraper that comes with VS 2005 work as you demonstrate in your msi? I do not have Wise Package Studio.
what you need as prerequisite? You can run every exe from MSI as Custom Action exepts the exe's what running an MSI. In this case you must unpack the MSI from the EXE and run it as nested MSI.
Following example i've package "A" it needs, VC Redist 2008, Java Runtime 6.x, and HASP Driver.
VC Resit. and Java are MSI. I built it in my msi as nested MSI, the HASP is a EXE Installer and can be installed unattend with parameter /s. I create a Custom action that runs the HASPDRV.EXE /S and installs it so. I can abort my installation if fails (by Return Codes checking)
At least i've only my MSI "A" with all prerequisites inside as custom actions.
P.S.
i don't like wrappers.
Following example i've package "A" it needs, VC Redist 2008, Java Runtime 6.x, and HASP Driver.
VC Resit. and Java are MSI. I built it in my msi as nested MSI, the HASP is a EXE Installer and can be installed unattend with parameter /s. I create a Custom action that runs the HASPDRV.EXE /S and installs it so. I can abort my installation if fails (by Return Codes checking)
At least i've only my MSI "A" with all prerequisites inside as custom actions.
P.S.
i don't like wrappers.
ASKER
I specifically need .NET Framework as a prerequisite (as I mentioned in my first post) and I can very easily do a check upon installation if I use the built-in setup1 template that comes with VS 2005. But I never want to install my application. My application has another Program (EXE) embedded within it. When I run my Application it needs to extract the embedded files to their proper place and run the embedded EXE on the fly. The embedded EXE goes through the install process and then hands things back over to my application for configuration and clean up.
I am sorry but I am not very familiar with coding outside of vb.net and VBA (and even that is very limited compared to what you all know I'm sure).
When you talk about nesting are you referring to embedding a file an embedded resource? Do you have an example of some source code or a source application that I could look at that would help me understand how you are doing this?
I am sorry but I am not very familiar with coding outside of vb.net and VBA (and even that is very limited compared to what you all know I'm sure).
When you talk about nesting are you referring to embedding a file an embedded resource? Do you have an example of some source code or a source application that I could look at that would help me understand how you are doing this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes nested is embedded. I cannot teach you here in the MSI technology it is a biger issue.
If you want a msi i can do it for you but not for free. Another suggestuion you create a batch script with checking the registry key,
reg query RootKeyName\Path\To\Key\To \Query /v KeyName || echo Does not Exist!!!!
if not present install the .Net. unattend
dotnetfx35.exe /q /norestart
then whatever you want.
If you want a msi i can do it for you but not for free. Another suggestuion you create a batch script with checking the registry key,
reg query RootKeyName\Path\To\Key\To
if not present install the .Net. unattend
dotnetfx35.exe /q /norestart
then whatever you want.
ASKER
I need a little time to check these things out... Thank you all for you input!
ASKER
I am still not quite done with this but I want to close this.
I am trying out NSIS and it seems to be a good option but haven't worked out all the details.
Thank you again for your input!
I am trying out NSIS and it seems to be a good option but haven't worked out all the details.
Thank you again for your input!
the key to the hive for 3.5 is
HKEY_LOCAL_MACHINE\Softwar
and 4.0 Client
HKEY_LOCAL_MACHINE\Softwar
4.0 Full
HKEY_LOCAL_MACHINE\Softwar
etc
If the vaue is set (and these are set by the .NET installation, not you) then the framework is installed. You could then prompt the user to check install the requisite framework if not on the system.