Announcement

Collapse
No announcement yet.

.Net Framework Dependency 472

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • .Net Framework Dependency 472

    I'm in need of a Dependency module for MSI Factory to install .Net Framework 4.7.2 if not already on the target computer.
    Does anyone here know if this exists and where I can get hold of.

    Many thanks, Paul

  • #2
    You can pull the EXE from Microsoft (https://dotnet.microsoft.com/downloa...amework/net472), add this as a Primer file (Under Resources tab), and in Actions > On Startup, check the target computer's registry for .NET 4.7.2. If it exists, proceed with installation, if it does not exist, display a popup window.

    Here is a sample that checks the registry if the target computer has an OS of Windows Server, and also version 2008 R2 or higher:

    if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion") then
    regValue_installType = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion", "InstallationType", false);
    -- returns "Client" if regular windows. returns "Server" if Windows Server.
    if (regValue_installType == "Client") then
    result = Dialog.Message("Installation Warning", "Operation System is not supported.\nThe product may still work, but Windows Server 2008 R2 or higher is recommended.\nWould you like to proceed?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON2);
    if (result == IDNO) then
    Application.Exit();
    end
    end

    -- Check if Windows Server 2008 R1 or lower
    reg_currentVersion = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentVersion", false);
    if (reg_currentVersion == "6.1" or reg_currentVersion == "6.2" or reg_currentVersion == "6.3" or reg_currentVersion == "10.0") then
    -- We are a valid Windows Server 2008 R2 or higher machine
    else
    result = Dialog.Message("Installation Warning", "Operation System is not supported.\nThe product may still work, but Windows Server 2008 R2 or higher is recommended.\nWould you like to proceed?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON2);
    if (result == IDNO) then
    Application.Exit();
    end
    end
    else
    result = Dialog.Message("Notice", "Failed to detect OS version.\nDocConverter must be installed on Windows Server 2008 R2 or higher.\nWould you like to proceed?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON2);
    if (result == IDNO) then
    Application.Exit();
    end
    end

    Comment

    Working...
    X