GithubHelp home page GithubHelp logo

alex-sitnikov / nsisdotnetchecker Goto Github PK

View Code? Open in Web Editor NEW
118.0 118.0 52.0 446 KB

NSIS plugin that allows one to detect if particular .Net framework is installed on the computer and download/install one if it is not found.

License: MIT License

C++ 71.51% C 13.25% NSIS 15.24%

nsisdotnetchecker's People

Contributors

alex-sitnikov avatar andy-w avatar blaiserudaz avatar bveenvliet avatar drizin avatar garykindel avatar lelonek1 avatar smenus avatar sumit6b avatar tbnorris avatar threegerbils avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nsisdotnetchecker's Issues

Can't Compile, error because of if-statement in Marco

Hi,
this is my first time with NSIS, so I'm a total beginner.

I'm trying to make a Setup-File which checks for .Net 4.0 Full and if not found, installs it. But I get following error (I have removed the username for privacy reasons):


Processing config: c:\PROGRA2\nsis\nsisconf.nsh
Processing script file: "c:/Users//DOCUME
1/cius4/src/setup/cius.nsi" (ACP)
Invalid command: ${If}
Error in macro CheckNetFramework on macroline 13
Error in script "c:/Users//DOCUME~1/cius4/src/setup/cius.nsi" on line 3 -- aborting creation process


If I add "!include LogicLib.nsh" at the beginning of my nsi-File, the error changes to:


Processing config: c:\PROGRA2\nsis\nsisconf.nsh
Processing script file: "c:/Users//DOCUME
1/cius4/src/setup/cius.nsi" (ACP)
Error: command StrCmp not valid outside Section or Function
Error in macro _== on macroline 1
Error in macro _If on macroline 9
Error in macro CheckNetFramework on macroline 13
Error in script "c:/Users//DOCUME~1/cius4/src/setup/cius.nsi" on line 3 -- aborting creation process


So long,

Problem with checking 4.5.2

Invalid command: DotNetChecker::IsDotNet452Installed
Error in macro CheckNetFramework on macroline 58

I have built DLL and it's OK.

can't install .net full 4.0 on Vista 32-bit

I tried using DotNetChecker to install .NET Full 4.0 on Vista 32-bit, my installer proceeded to download the .NET installer but then nothing happened. Apparently the installer was executed but did nothing and no failure was raised. Probably this is due to needing elevated permissions. I fixed this in my fork by using a macro from the StdUtils package. If this is a satisfactory solution I can send a pull request. If you have something else to propose as a solution I might implement it.

Calling CheckNetFramework more then once

I'm trying to call the plugin twice, example:

${If} {isXP}
!insertmacro CheckNetFramework 40Client
${ElseIf}
!insertmacro CheckNetFramework 45
${EndIf}

The makensis are pointing to a duplicate global variable error.

I've tried to put the script logic in a Function, but the error now is that the call DotNetChecker::IsDotNet452Installed (yes, fixed) throws a invalid command.

There is a right way for doing it? I'm not quite familiarized with the scripting stuff.

Failed to install .NET on Vista 32-bit

Hello,
At my work we use DotNetChecker to install .NET 4.0, usually on 64 bit Windows (7 and 8). However a client wanted to run it on Vista 32 bit and we tried and found that, while the .NET installer is downloaded, it doesn't even appear to start. This is with user level execution, not admin. I believe the .NET installer wants to get elevated permissions but the ExecWait call in the DotNetChecker script will fail in this case (correct me if I am wrong). One solution I found was using the StdUtils::ExecShellWaitEx macro like this. This works for me. However if there is some better way to solve this or if you want me to contribute this piece of code I would be glad to help.

Getting connection time out errors

I'm getting the following error on my installer when doing !insertmacro CheckNetFramework 35. It happens both on Windows 8 and Windows 11 systems. What's going on here? A google search for the problem hasn't turned-up anything useful specifically for this plugin.

image

Call to DotNetChecker only returns "f" or "t" instead of "false" or "true"

Nice work, I looked around a good bit for a NSIS DotNet installer and this one seemed the most elegant.

However I had problems getting it to work. Looks like the call into DotNetChecker.dll is only pushing the 1st character of the return into $0. I changed the DotNetChecker.nsh to check for "f" instead of "false" to get it to work.
...
DotNetChecker::IsDotNet${FrameworkVersion}Installed
Pop $0
${If} $0 == "f"
...

Support of .Net 4.7.2

Hi Guys,

Can you speed up merging pull request #37
It's very important for my release installer:)

Thanks in advance!

DotNet 4.5.2 reboot spontaneous

Hi,
I have been using the Nsis DotNetChecker with success for many installers (dotNet 4.0). This is a really nice component - thanks for that.

Recently I added support for dotNet 4.5.2. Subsequently, a number of users have reported that the installer reboot spontaneously during the dotNet 4.5.2 installation. One report say at 20% progress.
After the reboot the application appears to be installed properly.

I have not been able to trigger this scenario my self and my question is therefor:
Have any of you encountered this situation/problem too?
If yes, have you found a proper solution to this side effect?

Thanks in advance.

Best Regards
-Morten

[Feature Request] Add .NET 6.0 Desktop Runtime check support

.NET 6.0 on Windows comes with three runtimes:

  1. .NET Desktop Runtime 6.0 (includes Windows desktop components AND core components - the base core Runtime is not needed with this one)
  2. ASP.NET Core Runetime (used mainly for Internet Informatiom Server support)
  3. .NET Runtime 6.0 (just the core components for console apps)

The first runtime is probably the highest-use case given that NSIS is usually for installing desktop apps.

Reference:
https://dotnet.microsoft.com/en-us/download/dotnet/6.0

Add .NET 4.6 Support

I am using .NET 4.6, and I would like to use this library to check for and install it. I am a complete C/C++ dummy, so I can't do much there. I did try a few weeks ago to get it working, but didn't really get anywhere.

.NET 4.5.2

I have modified plugin\detectfx.cpp and nsis\DotNetChecker.nsh to handle the 4.5.2 framework

.NET detected but it is not installed

I have made a test with the example.nsi in the pacage to check if Framework 4 is installed, but doesn't work. Before making any test I have uninstalled the framework 4 that was present before, now only framework 1, 2, 3, 3.5 are present. I have also checked the registry and version 4 is not present. The output of the exaple is following:


Output folder: C:\Documents and Settings\User1\Impostazioni locali\Dati applicazioni\DotNetChecker Example
Checking .NET Framework version...
.NET Framework 4.0 Client found, no need to install.
Proceeding with remainder of installation.
Created uninstaller: C:\Documents and Settings\User1\Impostazioni locali\Dati applicazioni\DotNetChecker Example\Uninstall.exe
Completed


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1033]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\1040]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727]
"Install"=dword:00000001
"Version"="2.2.30729"
"MSI"=dword:00000001
"Increment"="3053"
"SP"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\1033]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000002
"Version"="2.2.30729"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\1040]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000002
"Version"="2.2.30729"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0]
"Install"=dword:00000001
"Increment"="01"
"Version"="3.2.30729"
"SP"=dword:00000002
"MSI"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\1033]
"Install"=dword:00000001
"SP"=dword:00000002
"MSI"=dword:00000001
"Version"="3.2.30729"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\1040]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000002
"Version"="3.2.30729"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Servicing]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Servicing\Windows Workflow Foundation]
"Install"=dword:00000001
"SPName"="SP2"
"SP"=dword:00000002
"MSI"=dword:00000001
"SPIndex"=dword:00000000
"Hotfix"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Servicing\Windows Workflow Foundation\it]
@=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup]
"Version"="3.2.30729"
"InstallSuccess"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Communication Foundation]
"ReferenceInstallPath"="c:\Programmi\Reference Assemblies\Microsoft\Framework\v3.0"
"Version"="3.0.4506.2152"
"InstallSuccess"=dword:00000001
"RuntimeInstallPath"="c:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Communication Foundation"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Communication Foundation\1040]
"InstallSuccess"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Presentation Foundation]
@="Windows Presentation Foundation"
"InstallSuccess"=dword:00000001
"ProductVersion"="3.0.6920.1427"
"InstallRoot"="c:\WINDOWS\Microsoft.NET\Framework\v3.0\WPF"
"Version"="3.0.6920.1427"
"WPFReferenceAssembliesPathx86"="c:\Programmi\Reference Assemblies\Microsoft\Framework\v3.0"
"WPFNonReferenceAssembliesPathx86"="c:\WINDOWS\Microsoft.NET\Framework\v3.0\WPF"
"WPFCommonAssembliesPathx86"="c:\WINDOWS\system32"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Presentation Foundation\it]
"Version"="2.0.50727"
"InstallSuccess"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Workflow Foundation]
"ProductVersion"="3.0.0.0"
"InstallDir"="c:\Programmi\Reference Assemblies\Microsoft\Framework\v3.0"
"FileVersion"="3.0.4203.2152"
@="Windows Workflow Foundation"
"MajorBuildNum"="4203"
"InstallSuccess"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Workflow Foundation\it]
"InstallSuccess"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000001
"Version"="3.5.30729.01"
"InstallPath"="c:\WINDOWS\Microsoft.NET\Framework\v3.5"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\1033]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000001
"Version"="3.5.30729.01"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\1040]
"Install"=dword:00000001
"MSI"=dword:00000001
"SP"=dword:00000001
"Version"="3.5.30729.01"


Thank you for your help
Gian

Framework 4.0 full makes check for 4.7.2 pass anyway

I'm trying to build an installer that requires .NET 4.7.2 installed on the machine.
On the machine I have .NET 4.0 full installed.
Unfortunately the plugin find the 4.0 full and do not raise any dialog pretending installation of 4.7.2 is not required, but this is not true as 4.0 is not compatible with 4.7.2.

Possibly add VSTO runtimes?

Would you consider adding the VSTO runtimes to the checker? I guess the logic would remain the same, check if certain registry keys are available and if not install the runtimes.

LICENSE file

Can we add a LICENSE file to the root of this project? I'd be happy to submit the pull request. Should it be an Apache v2 license?

a Possible (not major if dlls are OK) Bug.

if (NULL == pfnGETREQUESTEDRUNTIMEINFO) {
// ... (Some of Your Codes)
if (0 == _tcscmp(pszNetfxVersionToCheck, g_szNetfx10VersionString))
{
// ... (Some of Your Codes)
goto Finish;
}
// need a "return false;" to here i think.
}
// ... (Some of Your Codes)
// Check for the requested .NET Framework version
hr = pfnGETREQUESTEDRUNTIMEINFO(... // Possible Null Pointer

if There is "CorBindToRuntime" AND "no GetRequestedRuntimeInfo" in mscoree dll (maybe virus or like that);
this function will crash your program.

GetDotNetNNFullServicePack returns literal string %d when running in non-Unicode installer

The issue appears to be with the pushint method in pluginapi.c. The call to wsprintf doesn't specify whether or not the format string is a Unicode string:
wsprintf(buffer, "%d", value);

So in said context, it ends up returning a literal string %d. Using the _T macro fixes it:
wsprintf(buffer, _T("%d"), value);

Thanks for your work on this library, it's very helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.