Skip to content

electron6.0.0版本在部分win7系统的电脑上运行黑屏 #25186

Closed
@15164367531

Description

@15164367531

您好,我们项目使用vue+ electron6.0.0开发的桌面应用,但是最近发现我们应用在部分win7 64位操作系统中运行黑屏请问能提供解决方法吗?

Activity

StaZhu

StaZhu commented on Aug 29, 2020

@StaZhu
Contributor

win7 sp1 or win8 needed install KB4019990 patch to resolve this issue for now(note:none sp1 win7 needed to upgrade to sp1 before install the patch)

StaZhu

StaZhu commented on Aug 29, 2020

@StaZhu
Contributor

this is because the lack of patch below
Windows6.1-KB4019990-x86.msu
Windows6.1-KB4019990-x64.msu
Windows8-RT-KB4019990-x64.msu

here is my installer.nsh, if you are using electron-builder, then you can reference this.

!macro customInit
    Var /GLOBAL WIN_VERSION
    Var /GLOBAL ARCH
    ClearErrors
        ReadRegStr $WIN_VERSION HKLM "Software\Microsoft\Windows NT\CurrentVersion" "CurrentBuild"
        ReadRegStr $ARCH HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PROCESSOR_ARCHITECTURE"
        SetOutPath "$TEMP\your_app_name"
        SetOverwrite on
        ${if} $WIN_VERSION < 7600
            MessageBox MB_OK "The installation cannot continue as the operating system is not supported by Desktop Application."
            Abort
        ${elseif} $WIN_VERSION == 7600
            MessageBox MB_OK "Windows 7 Service Pack 1 required. You will be directed to download Windows 7 Service Pack 1 now. Please install it manually before you proceed."
            ${if} $ARCH == "x86"
                ExecShell "open" "https:://path/to/your/cdn/windows6.1-KB976932-x86.exe"
            ${elseif} $ARCH == "AMD64"
                ExecShell "open" "https:://path/to/your/cdn/windows6.1-KB976932-x64.exe"
            ${else}
                ExecShell "open" "https:://path/to/your/cdn/windows6.1-KB976932-ia64.exe"
            ${endIf}
            Abort
        ${elseif} $WIN_VERSION == 7601
            ExpandEnvStrings $1 %COMSPEC%
            ExecShellWait "" "$1" "/c $SysDir\systeminfo.exe | findstr KB4019990 > $TEMP\version" SW_HIDE
            FileOpen $2 $TEMP\version r
            FileRead $2 $3
            FileClose $2
            Delete $TEMP\version
            ${if} $3 == ""
                MessageBox MB_OK "Patch KB4019990 required. Will install it now."
                ${if} $ARCH == "x86"
                    File "..\..\..\..\statics\patches\Windows6.1-KB4019990-x86.msu"
                    ExecShellWait "open" "$TEMP\your_app_name\Windows6.1-KB4019990-x86.msu"
                ${elseif} $ARCH == "AMD64"
                    File "..\..\..\..\statics\patches\Windows6.1-KB4019990-x64.msu"
                    ExecShellWait "open" "$TEMP\your_app_name\Windows6.1-KB4019990-x64.msu"
                ${endIf}
                Goto done
            ${else}
                Goto done
            ${endif}
        ${elseif} $WIN_VERSION == 9200
            ExpandEnvStrings $1 %COMSPEC%
            ExecShellWait "" "$1" "/c $SysDir\systeminfo.exe | findstr KB4019990 > $TEMP\version" SW_HIDE
            FileOpen $2 $TEMP\version r
            FileRead $2 $3
            FileClose $2
            Delete $TEMP\version
            ${if} $3 == ""    
                ${if} $ARCH == "AMD64"
                    MessageBox MB_OK "Patch KB4019990 required. Will install it now."
                    File "..\..\..\..\statics\patches\Windows8-RT-KB4019990-x64.msu"
                    ExecShellWait "open" "$TEMP\your_app_name\Windows8-RT-KB4019990-x64.msu"                  
                ${endIf}
                Goto done
            ${else}
                Goto done
            ${endif}
        ${else}
            Goto done
        ${endif}
    done:
        RMDir /r "$TEMP\your_app_name"
!macroend
jackple

jackple commented on Aug 31, 2020

@jackple

尝试安装.net 4.7.1+ 以修复

sofianguy

sofianguy commented on Sep 1, 2020

@sofianguy
Contributor

Thank you for taking the time to report this issue and helping to make Electron better.

The version of Electron you reported this on has been superseded by newer releases. See our supported versions documentation.

If you're still experiencing this issue in Electron 8.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

I'm setting the blocked/need-info label for the above reasons. This issue will be closed 10 days from now if there is no response.

Thanks in advance! Your help is appreciated.

StaZhu

StaZhu commented on Sep 1, 2020

@StaZhu
Contributor

Thank you for taking the time to report this issue and helping to make Electron better.

The version of Electron you reported this on has been superseded by newer releases. See our supported versions documentation.

If you're still experiencing this issue in Electron 8.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

I'm setting the blocked/need-info label for the above reasons. This issue will be closed 10 days from now if there is no response.

Thanks in advance! Your help is appreciated.

9.0 still having this issue

electron-triage

electron-triage commented on Mar 9, 2021

@electron-triage

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know.

Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sofianguy@jackple@StaZhu@15164367531@electron-triage

        Issue actions

          electron6.0.0版本在部分win7系统的电脑上运行黑屏 · Issue #25186 · electron/electron