Method and system for avoiding window popup of Windows program UAC and storage medium

By splitting the self-start program on the Windows system with the UAC execution level Administrator into Windows background service programs and applications, and automatically running the backend service programs when booting, the problem of UAC pop-up is solved, achieving the non-blocking operation of the self-start program on the startup and improving the user experience.

CN119806672APending Publication Date: 2025-04-11成都芯盛集成电路有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411811339.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In Windows systems, a UAC startup program with a UAC execution level of Administrator will appear when the user double-clicks to run it, affecting the user experience, and may block the operation of the power-on self-start program, especially in security protection software, delayed operation will bring security risks.

Method used

Split the boot self-start program with UAC execution level Administrator into Windows background service programs and Windows applications, and package them into an installation package to define the installation and uninstall behavior of the installation package. When booting, the operating system automatically runs Windows background service programs and applications, and operates high-permission hardware through the background service programs to avoid the occurrence of UAC pop-ups.

Benefits of technology

The UAC execution level Administrator is implemented to run without UAC pop-up windows when the UAC is turned on, ensuring that security software can be protected by powering on the system, improving user experience, and avoiding the blockage of program running by UAC pop-up windows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806672A_ABST
    Figure CN119806672A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for preventing a Windows program UAC from popup and a storage medium, and belongs to the technical field of computers. The method comprises the steps that a startup self-starting program with the UAC execution level being Administrator is split into a Windows background service program and a Windows application program, and the Windows background service program and the Windows application program are packaged and compiled into an installation package; when the installation behavior is executed, firstly creating and starting a Windows background service program, and then installing a Windows application program and adding the Windows application program into the registry to be set to be self-starting; when the system is started up, the Windows background service program and the Windows application program communicate with each other; the message is transferred to a communication client through the UI, and the communication client sends a communication request to a communication server; the Windows application program analyzes the user command, the Windows application program operates the high-authority hardware through the Windows background service program, and an operation result is returned to the UI according to an original request path. According to the method, the UAC popup problem of the startup self-starting program of which the UAC execution level is Administrator is solved, the startup self-starting program runs immediately after being powered on, and the security software can achieve the effect that the system is protected immediately after being powered on.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, system and storage medium for preventing a UAC pop-up window of a Windows program. Background Art

[0002] In Windows system, some third-party application software will directly operate the registry, peripherals, hard disk, modify system files, etc. Since Windows divides the user's permission level, if the application involves such operations, it must be run as an administrator to have the operation permission. Therefore, when developers compile such programs, they usually compile the program into a program with UAC execution level of Administrator. When the user double-clicks to run the program, a User Account Control (UAC) pop-up window will appear, and the user must authorize it before it can be authorized to run. There are three problems in running a program with UAC execution level of Administrator. First, a UAC pop-up window will appear when the user double-clicks to run the program; second, if the application is a startup program, a UAC pop-up window will pop up every time the computer is turned on and enters the desktop. The UAC pop-up window will occupy the entire desktop, which greatly affects the user experience. Third, the UAC pop-up window will block the power-on startup program from running, and the effect of running immediately after power-on cannot be achieved. If it is a security protection software, blocking it from running or delaying it after power-on will cause security risks. A common solution on the market is to let users change the system UAC and adjust the sensitivity to "never notify". This method has many disadvantages. First, users need to have certain computer knowledge. Then, this setting is effective for the global operating system, which poses a security risk and is not recommended. There is another situation on the market. If the application is a program without a UI interface and requires automatic startup and administrator running permissions, it can be developed into a Windows service program (hereinafter referred to as WinService). Since the service program and the user session are separated and cannot interact with the user, it is impossible to provide a UI-like interface, so this solution has limitations. If an application needs to meet the following three conditions, one must have a UI interface that interacts with the user, two must have administrator permissions for the operating system or hardware device, and three must start automatically when the machine is turned on, how can such a program achieve no UAC pop-up window when it is started automatically? This is the problem to be solved by the present invention. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method, system and storage medium for avoiding UAC pop-up windows of Windows programs.

[0004] The objective of the present invention is achieved through the following technical solutions: The first aspect of the present invention provides: a method for avoiding UAC pop-up windows of Windows programs, comprising the following steps: Split the startup program with the UAC execution level of Administrator into Windows background service program and Windows application program, and compile the Windows background service program and Windows application program into an installation package, and define the installation and uninstallation behaviors of the installation package; The user runs the installation package and performs the installation behavior. First, the Windows background service program is created and started. Then the Windows application is installed and added to the registry to be set to start automatically at boot. When the computer is turned on, the operating system first runs the Windows background service program, which pulls up the internal communication server module; then the operating system automatically runs the Windows application and pulls up the internal communication client module; The user operates the hardware through the UI provided by the Windows application. The UI transfers the message to the communication client, and the communication client sends a communication request to the communication server. The Windows application parses the user command, operates the high-privilege hardware through the Windows background service program, and returns the operation result to the UI according to the original request path.

[0005] Preferably, when the user performs an uninstallation action, the Windows application is first uninstalled, the registry is cleaned, and then the Windows background service program is deleted.

[0006] Preferably, the Windows background service program and the Windows application program communicate via http protocol or dbus protocol or registry or events.

[0007] The second aspect of the present invention provides: a system for preventing Windows program UAC pop-up windows, which is used to implement any of the above methods for preventing Windows program UAC pop-up windows, comprising: A compilation module is used to split the startup program with the UAC execution level of Administrator into a Windows background service program and a Windows application program, and compile the Windows background service program and the Windows application program into an installation package, and define the installation behavior and uninstallation behavior of the installation package; The installation module is used to run the installation package and perform installation actions. First, it creates and starts the Windows background service program, then installs the Windows application and adds it to the registry to set it to start automatically at boot; The communication module is used to first run the Windows background service program when the computer is turned on, and the Windows background service program pulls up the internal communication server module; then the operating system automatically runs the Windows application program and pulls up the internal communication client module; The operation module is used to operate the hardware through the UI provided by the Windows application. The UI transfers the message to the communication client, and the communication client sends a communication request to the communication server. The Windows application parses the user command, and the Windows application operates the high-authority hardware through the Windows background service program, and returns the operation result to the UI according to the original request path.

[0008] A third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned methods for avoiding UAC pop-up windows of Windows programs is implemented.

[0009] The beneficial effects of the present invention are: 1) The startup programs with the UAC execution level of Administrator are divided into ordinary Windows applications and Windows background service programs, solving the UAC pop-up problem of the startup programs with the UAC execution level of Administrator. The programs can run immediately after power-on and will not be blocked by the UAC pop-up window. The security software can achieve the effect of protecting the system as soon as it is powered on.

[0010] 2) Windows background service programs and Windows applications are packaged and compiled into one installation package to achieve one-time installation and uninstallation.

[0011] 3) For startup programs with UAC execution level of Administrator, there is no UAC pop-up window from installation to startup, and no user authorization is required. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 Flowchart of the method to avoid UAC pop-up windows in Windows programs; Figure 2 The flowchart takes the operation of a mobile device as an example. DETAILED DESCRIPTION

[0013] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0014] See also Figure 1-Figure 2 The first aspect of the present invention provides: a method for avoiding UAC pop-up windows of Windows programs, comprising the following steps: Split the startup program with the UAC execution level of Administrator into Windows background service program and Windows application program, and compile the Windows background service program and Windows application program into an installation package, and define the installation and uninstallation behaviors of the installation package; The user runs the installation package and performs the installation behavior. First, the Windows background service program is created and started. Then the Windows application is installed and added to the registry to be set to start automatically at boot. When the computer is turned on, the operating system first runs the Windows background service program, which pulls up the internal communication server module; then the operating system automatically runs the Windows application and pulls up the internal communication client module; The user operates the hardware through the UI provided by the Windows application. The UI transfers the message to the communication client, and the communication client sends a communication request to the communication server. The Windows application parses the user command, operates the high-privilege hardware through the Windows background service program, and returns the operation result to the UI according to the original request path.

[0015] In this embodiment, the Windows background service program is managed by Windows and starts automatically when the computer is turned on; the Windows background service program itself has Administrator privileges; the Windows background service program has a higher priority than the Windows application program when it starts. In view of the problem that a UAC pop-up window appears when a program with an Administrator execution level starts automatically, the present invention implements a method for automatic operation at startup without a UAC pop-up window, which can effectively improve the user experience. The implementation method is to split the program with an Administrator execution level into a common Windows application (hereinafter referred to as WinAPP) and a Windows Service program (hereinafter referred to as WinService).

[0016] The WinService program itself is a special Windows program that runs automatically when the computer is turned on and has administrator privileges. Its operation is not subject to any restrictions. In our invention, WinService is responsible for high-privilege operations, such as registry, peripherals, hard disk, and modifying system files.

[0017] WinAPP is a Windows application that runs as a normal user. When installing WinAPP, the installer will register WinAPP to the Windows startup function, so that it can run automatically when the computer is turned on. WinAPP only provides a UI interface for interacting with the user, and sends the user's request to the high-privilege WinService through HTTP requests or other methods, and then WinService performs high-privilege operations.

[0018] WinService has a higher running priority than WinAPP's startup. When WinAPP starts, there will be no UAC pop-up window because it runs as a normal user. This can solve the problem of UAC pop-up windows when programs with an Administrator execution level start at startup. At the same time, WinAPP can also provide high-privilege operations.

[0019] In some embodiments, when the user performs an uninstallation, the Windows application is uninstalled first, the registry is cleaned, and then the Windows background service program is deleted.

[0020] In some embodiments, the Windows background service program and the Windows application communicate via http protocol or dbus protocol or registry or events.

[0021] In this embodiment, WinService provides operations with Administrator privileges at the UAC execution level, such as operating hardware, registry, system files, etc. Figure 2 As shown in the figure, take the operation of mobile devices (such as mobile hard disks, USB flash drives, Ukey, etc.) and http protocol as an example. WinAPP provides a UI interactive interface, and sends HTTP requests to HttpServer through the internal HttpClient module. Here, the http request uses a synchronous request, which is convenient for real-time feedback of WinService processing results to users through the UI. WinService pulls up the HttpService service and provides a Restful interface for WinAPP to call. WinService parses the http request into an operation command and sends it to the hardware through the SDK layer. Finally, HttpServer returns the hardware processing result to HttpClient. The communication IP of HttpClient and HttpServer is 127.0.0.1 or localhost, and the port is any non-system occupied port negotiated during the development of HttpClient and HttpServer. The communication methods between WinAPP and WinService include but are not limited to the http protocol, and can also use communication methods such as dbus, registry, and events.

[0022] When making an installation package, WinAPP and WinService are packaged into one installation program. The installation and uninstallation of the program only need to be performed once. To the user, only one WinAPP is installed. The one-time installation behavior is to install WinService first and register WinService as a Window service program, then install WinAPP and register WinAPP to the Windows startup. When uninstalling, WinAPP and WinServie will be uninstalled at the same time.

[0023] The second aspect of the present invention provides: a system for preventing Windows program UAC pop-up windows, which is used to implement any of the above methods for preventing Windows program UAC pop-up windows, including: A compilation module is used to split the startup program with the UAC execution level of Administrator into a Windows background service program and a Windows application program, and compile the Windows background service program and the Windows application program into an installation package, and define the installation behavior and uninstallation behavior of the installation package; The installation module is used to run the installation package and perform installation actions. First, it creates and starts the Windows background service program, then installs the Windows application and adds it to the registry to set it to start automatically at boot; The communication module is used to first run the Windows background service program when the computer is turned on, and the Windows background service program pulls up the internal communication server module; then the operating system automatically runs the Windows application program and pulls up the internal communication client module; The operation module is used to operate the hardware through the UI provided by the Windows application. The UI transfers the message to the communication client, and the communication client sends a communication request to the communication server. The Windows application parses the user command, and the Windows application operates the high-authority hardware through the Windows background service program, and returns the operation result to the UI according to the original request path.

[0024] A third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned methods for avoiding UAC pop-up windows of Windows programs is implemented.

[0025] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A method for avoiding UAC pop-up windows in Windows programs, characterized by: The following steps are involved: Split the startup program with the UAC execution level of Administrator into Windows background service program and Windows application program, and compile the Windows background service program and Windows application program into an installation package, and define the installation and uninstallation behaviors of the installation package; The user runs the installation package and performs the installation behavior. First, the Windows background service program is created and started. Then the Windows application is installed and added to the registry to be set to start automatically at boot. When the computer is turned on, the operating system first runs the Windows background service program, which pulls up the internal communication server module; then the operating system automatically runs the Windows application and pulls up the internal communication client module; The user operates the hardware through the UI provided by the Windows application. The UI transfers the message to the communication client, and the communication client sends a communication request to the communication server. The Windows application parses the user command, operates the high-privilege hardware through the Windows background service program, and returns the operation result to the UI according to the original request path.

2. The method for avoiding UAC pop-up windows in Windows programs according to claim 1, characterized in that: When the user performs an uninstallation, the Windows application is uninstalled first, the registry is cleaned, and then the Windows background service program is deleted.

3. The method for avoiding UAC pop-up windows in Windows programs according to claim 1 or 2, characterized in that: The Windows background service program and the Windows application program communicate with each other via the http protocol or the dbus protocol or the registry or events.

4. A system for avoiding UAC pop-up windows in Windows programs, characterized by: The method for preventing a UAC pop-up window of a Windows program as claimed in any one of claims 1 to 3 comprises: A compilation module is used to split the startup program with the UAC execution level of Administrator into a Windows background service program and a Windows application program, and compile the Windows background service program and the Windows application program into an installation package, and define the installation behavior and uninstallation behavior of the installation package; The installation module is used to run the installation package and perform installation actions. First, it creates and starts the Windows background service program, then installs the Windows application and adds it to the registry to set it to start automatically at boot; The communication module is used to first run the Windows background service program when the computer is turned on, and the Windows background service program pulls up the internal communication server module; then the operating system automatically runs the Windows application program and pulls up the internal communication client module; The operation module is used to operate the hardware through the UI provided by the Windows application. The UI transfers the message to the communication client, and the communication client sends a communication request to the communication server. The Windows application parses the user command, and the Windows application operates the high-authority hardware through the Windows background service program, and returns the operation result to the UI according to the original request path.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the method for avoiding UAC pop-up windows of Windows programs as described in any one of claims 1 to 3 is implemented.