tis-dotnetfx4.0 icon

.NET Framework 4.0

Silent install package for .NET Framework 4.0

4.0.30319.1-16
System and network
System and network

  • package: tis-dotnetfx4.0
  • name: .NET Framework 4.0
  • version: 4.0.30319.1-16
  • categories: System and network
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor: Microsoft
  • licence: proprietary_free,wapt_public
  • locale: all
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 50.38 Mo
  • homepage : https://dotnet.microsoft.com/

package           : tis-dotnetfx4.0
version           : 4.0.30319.1-16
architecture      : all
section           : base
priority          : optional
name              : .NET Framework 4.0
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : .NET Framework (pronounced as "dot net") is a software framework developed by Microsoft that runs primarily on Microsoft Windows
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 1.8
sources           : https://dotnet.microsoft.com/download/dotnet-framework
installed_size    : 
impacted_process  : 
description_fr    : Le .NET Framework est un cadriciel (framework) pouvant être utilisé par un système d'exploitation Microsoft Windows
description_pl    : .NET Framework (wymawiane jako "dot net") to framework oprogramowania opracowany przez firmę Microsoft, który działa głównie w systemie Microsoft Windows
description_de    : .NET Framework (ausgesprochen wie "dot net") ist ein von Microsoft entwickeltes Software-Framework, das hauptsächlich unter Microsoft Windows
description_es    : .NET Framework (pronunciado como "dot net") es un marco de software desarrollado por Microsoft que se ejecuta principalmente en Microsoft Windows
description_pt    : .NET Framework (pronuncia-se como "dot net") é uma estrutura de software desenvolvida pela Microsoft que corre principalmente no Microsoft Windows
description_it    : .NET Framework (pronunciato come "dot net") è un framework software sviluppato da Microsoft che viene eseguito principalmente su Microsoft Windows
description_nl    : .NET Framework (uitgesproken als "dot net") is een door Microsoft ontwikkeld softwareframework dat hoofdzakelijk draait op Microsoft Windows
description_ru    : .NET Framework (произносится как "dot net") - это программная основа, разработанная компанией Microsoft, которая работает преимущественно под управлением Microsoft Windows
audit_schedule    : 
editor            : Microsoft
keywords          : dot,net,.net,framework,,dotnetfx40,dotnetfx4.0,dotnet40,dotnet4.0
licence           : proprietary_free,wapt_public
homepage          : https://dotnet.microsoft.com/
package_uuid      : 6df35420-30e2-4bec-b463-57e35fad82e6
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://docs.microsoft.com/dotnet/framework/whats-new/
min_os_version    : 5.1
max_os_version    : 
icon_sha256sum    : bbae5b815f1b40523fb66ba82c7a0c286270f610a60c278b33da9f158a8e4ef8
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : zGQN+3a29/c8pFGum7P9nDyy1ttTBrNRmI8M0zYeVxg4LFDbJBFPUnlQAsZv5GA5Z/6iF5pg45fAlluyny9kPDwupmiIBbfQ1hziqJ/g3HtME+IbSfbZN9N7tNZDPRG3VJUiEQwptBsQ9UrqZq8ioLqAR1LxdWc9zXjNz6eOyP+/62A9wXSW+B9jEQOJxHoPGdRUjLkCCEF7GRlMZwjmSfjNW8jG781qfdXJTzxmcbHAhdqbZJlrbbSIedbPv6moA/GjKvLMRVBnH88jyDUKa5u/+/Ag5vuy893kr8gFYx663FQ5Fs3nAueqnydHgqqhyySeunwD8baJeShgAgZpCA==
signature_date    : 2023-08-27T13:00:17.513883
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name = "dotNetFx40_Full_x86_x64.exe"
silent_inst_args = "/q /norestart"


def install():
    package_version = control.version.split("-", 1)[0]
    package_version_split = package_version.split(".")
    short_package_version = "%s.%s" % (package_version_split[0], package_version_split[1])
    # print(short_package_version)

    # Getting the used storage on programfiles before installation (place it on the top)
    get_disk_free_space_before = get_disk_free_space(programfiles)

    # Getting actual .NET Framework 4.x version installed
    try:
        dotnet4_version_installed = registry_readstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full", "Version")
        print("Actual installed .NET Framework 4 version is " + dotnet4_version_installed)
        dotnet4_version_split = dotnet4_version_installed.split(".")
        short_dotnet4_version = "%s.%s" % (dotnet4_version_split[0], dotnet4_version_split[1])
    except:
        print(".NET Framework 4.x is not currently installed")
        short_dotnet4_version = "0"
    # print(short_dotnet4_version)

    # Installing the package
    if Version(short_dotnet4_version) == Version(short_package_version):
        print(".NET Framework " + short_package_version + " is already installed")
    elif Version(short_dotnet4_version) > Version(short_package_version):
        error(
            'A newer version of the .NET Framework is already installed. Please note that the 4.0 CANNOT be installed in parallel. We recommend that you change the dependency of your affected other packages from "tis-dotnetfx4.0" to "tis-dotnetfx".'
        )
    else:
        install_exe_if_needed(bin_name, silentflags=silent_inst_args)

    # Return used storage of the program. (place it on the bottom)
    get_disk_free_space_after = get_disk_free_space(programfiles)
    free_space_after_diff = get_disk_free_space_before - get_disk_free_space_after
    print("Storage used: " + str(free_space_after_diff))


def uninstall():
    if iswin64():
        run(r"MsiExec.exe /X{8E34682C-8118-31F1-BC4C-98CD9675E1C2} /q /norestart")
        run(r"MsiExec.exe /X{F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4} /q /norestart")
    else:
        run(r"MsiExec.exe /X{0A0CADCF-78DA-33C4-A350-CD51849B9702} /q /norestart")
        run(r"MsiExec.exe /X{3C3901C5-3455-3E0A-A214-0B093A5070A6} /q /norestart")


def audit():
    # Getting actual .NET Framework 4.x version installed
    short_package_version = "4.0"
    dotnet4_version_installed = registry_readstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full", "Version")
    print("Actual installed .NET Framework 4 version is " + dotnet4_version_installed)
    dotnet4_version_split = dotnet4_version_installed.split(".")
    short_dotnet4_version = "%s.%s" % (dotnet4_version_split[0], dotnet4_version_split[1])

    if short_dotnet4_version > short_package_version:
        print(
            'A newer version of the .NET Framework is already installed. Please note that the 4.0 CANNOT be installed in parallel. We recommend that you change the dependency of your affected other packages from "tis-dotnetfx4.0" to "tis-dotnetfx".'
        )
        return "WARNING"


def update_package():
    proxy = {}
    if isfile(makepath(application_data(), "waptconsole", "waptconsole.ini")):
        proxywapt = inifile_readstring(makepath(user_local_appdata(), "waptconsole", "waptconsole.ini"), "global", "http_proxy")
        if proxywapt:
            proxy = {"http": proxywapt, "https": proxywapt}

    # https://dotnet.microsoft.com/download/dotnet-framework

    url_dl = "https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
    print("Download url is: " + url_dl)

    if not isfile(bin_name):
        print("Downloading " + bin_name)
        wget(url_dl, bin_name, proxies=proxy)

ace2096bdd314b60af48ad7f03417f7cf4bb5fb545b8904b5069b6da4361c1b5 : setup.py
bbae5b815f1b40523fb66ba82c7a0c286270f610a60c278b33da9f158a8e4ef8 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
3111e8ff875e03be3f4cc25b06b2f3178951ea1dfdcf3b09cbc66f97a7c72da3 : luti.json
65e064258f2e418816b304f646ff9e87af101e4c9552ab064bb74d281c38659f : dotNetFx40_Full_x86_x64.exe
7e669d6be7c9b009ee9254fa0d712e4dea904abe1cc976ed1bdf339ca5b8aaa0 : WAPT/control