Skip to content

Commit 0b56ac8

Browse files
committed
补充英文翻译
1 parent c9f8b37 commit 0b56ac8

22 files changed

+1458
-1894
lines changed

website/docs/doc/GeneralUpdate.Maui.OSS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
sidebar_position: 10
3+
---
24

35
### Definition
46

website/docs/guide/Driver.md

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,42 @@
22
sidebar_position: 3
33
---
44

5-
### Driver 驱动
5+
### Driver
66

7-
#### (1)Windows平台
7+
#### (1) Windows Platform
88

9-
##### 驱动安装
9+
##### Driver Installation
1010

11-
本组件内置使用的驱动安装工具为微软自带的工具PnPutil.exe或使用setupapi.dll来实现。
11+
The tool used for driver installation in this component is the Microsoft built-in tool PnPutil.exe or setupapi.dll.
1212

13-
驱动安装时需要注意的问题有两点:
13+
There are two key points to note when installing drivers:
1414

15-
| 名称 | 说明 |
16-
| ---- | ---------------------------------- |
17-
| 安装 | 驱动证书安装,需要在驱动之前安装。 |
18-
| 版本 | 区分x86 , x64版本。 |
15+
| Name | Description |
16+
| ------- | ------------------------------------------------------------ |
17+
| Install | Driver certificate installation should occur before the driver installation. |
18+
| Version | Differentiate between x86 and x64 versions. |
1919

20-
**PnPUtil实现:**
20+
**PnPUtil Implementation:**
2121

22-
PnPUtil是一个命令行实用程序,它可以用来管理Windows的驱动程序商店。你可以使用它来添加、删除和列出驱动程序。
22+
PnPUtil is a command line utility that can be used to manage the Windows driver store. You can use it to add, delete, and list drivers.
2323

24-
以下是如何使用PnPUtil来安装驱动程序的步骤:
24+
Here are the steps to install drivers using PnPUtil:
2525

26-
1. 打开命令提示符(以管理员身份)。
26+
1. Open Command Prompt as an administrator.
2727

28-
2. 导航到包含驱动程序的INF文件的目录。
28+
2. Navigate to the directory containing the driver's INF file.
2929

30-
3. 运行以下命令:
30+
3. Run the following command:
3131

32-
`pnputil /add-driver <INF文件名>`
32+
`pnputil /add-driver <INF file name>`
3333

34-
例如,如果你的INF文件名为`mydriver.inf`,那么你应该运行`pnputil /add-driver mydriver.inf`
34+
For example, if your INF file name is `mydriver.inf`, you should run `pnputil /add-driver mydriver.inf`.
3535

36-
4. PnPUtil将会添加驱动程序到驱动程序商店,并尝试为任何匹配的设备安装驱动程序。
36+
4. PnPUtil will add the driver to the driver store and attempt to install the driver for any matching devices.
3737

38-
注意,PnPUtil需要管理员权限才能运行。
38+
Note that PnPUtil requires administrator privileges to run.
3939

40-
在C#中,你可以使用System.Diagnostics.Process类来运行PnPUtil。以下是一个例子:
40+
In C#, you can use the System.Diagnostics.Process class to run PnPUtil. Here is an example:
4141

4242
```c#
4343
using System.Diagnostics;
@@ -51,25 +51,23 @@ public class Program
5151
Process process = new Process();
5252
process.StartInfo.FileName = "pnputil.exe";
5353
process.StartInfo.Arguments = "/add-driver " + infPath;
54-
process.StartInfo.Verb = "runas"; // 运行为管理员
54+
process.StartInfo.Verb = "runas"; // Run as administrator
5555
process.Start();
5656

5757
process.WaitForExit();
5858
}
5959
}
6060
```
6161

62-
63-
64-
**setupapi.dll实现:**
62+
**setupapi.dll Implementation:**
6563

6664
```c#
6765
using System;
6866
using System.Runtime.InteropServices;
6967

7068
public class Program
7169
{
72-
// 定义 SetupCopyOEMInf 函数的 P/Invoke 签名
70+
// Define the P/Invoke signature for the SetupCopyOEMInf function
7371
[DllImport("setupapi.dll", EntryPoint = "SetupCopyOEMInf", SetLastError = true)]
7472
public static extern bool SetupCopyOEMInf(
7573
string SourceInfFileName,
@@ -95,28 +93,24 @@ public class Program
9593
}
9694
```
9795

96+
##### Driver Certificate
9897

98+
This component uses Windows certificate management tools (CertMgr.exe) or the X509Store class in the .NET framework.
9999

100-
##### 驱动证书
101-
102-
本组件内置使用Windows的证书管理工具(CertMgr.exe)或者使用.NET框架中的X509Store类来实现。
103-
104-
**CertMgr.exe实现:**
100+
**CertMgr.exe Implementation:**
105101

106-
`CertMgr.exe` 是一个命令行工具,它是微软的.NET Framework的一部分。你可以在.NET Framework的安装目录中找到它。
102+
`CertMgr.exe` is a command line tool that is part of the Microsoft .NET Framework. You can find it in the .NET Framework installation directory.
107103

108-
对于大多数系统,它的位置通常是在以下目录之一:
104+
For most systems, it is typically located in one of the following directories:
109105

110106
- `C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin`
111107
- `C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin`
112108

113-
如果你找不到它,你可以使用Windows的搜索功能来搜索`CertMgr.exe`
109+
If you cannot find it, you can use Windows search to locate `CertMgr.exe`.
114110

115-
注意,`CertMgr.exe`是一个命令行工具,你需要在命令提示符或PowerShell中运行它。你也可以在你的C#代码中使用`System.Diagnostics.Process.Start()`方法来调用它。
111+
Note that `CertMgr.exe` is a command line tool and must be run in Command Prompt or PowerShell. You can also call it in your C# code using the `System.Diagnostics.Process.Start()` method.
116112

117-
118-
119-
**X509Store实现:**
113+
**X509Store Implementation:**
120114

121115
```c#
122116
using System;
@@ -128,19 +122,18 @@ public class Example
128122
{
129123
string CertificatePath = "Path to your certificate file";
130124

131-
// 创建一个新的X509证书实例
125+
// Create a new X509 certificate instance
132126
X509Certificate2 certificate = new X509Certificate2(CertificatePath);
133127

134-
// 打开当前用户的个人证书存储区
128+
// Open the current user's personal certificate store
135129
X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
136130

137-
// 将新证书添加到存储区
131+
// Add the new certificate to the store
138132
store.Open(OpenFlags.ReadWrite);
139133
store.Add(certificate);
140134

141135
store.Close();
142136
}
143137
}
144-
145138
```
146139

website/docs/guide/Dump.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
sidebar_position: 4
33
---
44

5-
### Dump 转储文件
5+
### Dump Files
66

7-
在自动升级的过程中如果更新失败,或程序更新完成之后运行崩溃都可以使用ProcDump工具辅助导出dump文件。ProcDump 是一个命令行实用工具,其主要用途是监视应用程序的 CPU 峰值,并在出现峰值期间生成故障转储,管理员或开发人员可以使用这些转储来确定出现峰值的原因。 ProcDump 还支持挂起窗口监视(使用与 Windows 和任务管理器使用的窗口挂起相同的定义)、未处理的异常监视,并且可以根据系统性能计数器的值生成转储。 它还可用作可嵌入到其他脚本中的常规进程转储实用工具。
7+
During the process of automatic updates, if an update fails or if the program crashes after the update, you can use the ProcDump tool to help export dump files. ProcDump is a command-line utility primarily used to monitor an application's CPU spikes and generate crash dumps during these spikes. Administrators or developers can use these dumps to determine the cause of the spikes. ProcDump also supports hung window monitoring (using the same definition as Windows and Task Manager), unhandled exception monitoring, and can generate dumps based on system performance counter values. It can also be used as a general-purpose process dump utility that can be embedded into other scripts.
88

9-
##### (1)Windows平台
9+
##### (1) Windows Platform
1010

11-
C#实现调用:
11+
C# Implementation for Calling ProcDump:
1212

1313
```c#
1414
using System;
@@ -19,7 +19,7 @@ public class Program
1919
public static void Main()
2020
{
2121
var procDumpPath = @"C:\Path\To\procdump.exe";
22-
var processId = 1234; // 您要转储的进程的ID
22+
var processId = 1234; // The ID of the process you want to dump
2323
var dumpFilePath = @"C:\Path\To\dumpfile.dmp";
2424

2525
var startInfo = new ProcessStartInfo
@@ -45,8 +45,6 @@ public class Program
4545
}
4646
```
4747

48-
49-
50-
参考资料:
48+
References:
5149

5250
- https://learn.microsoft.com/zh-cn/sysinternals/downloads/procdump

website/docs/guide/File occupancy.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
sidebar_position: 2
33
---
44

5-
### File occupancy 文件占用
5+
### File Occupancy
66

7-
#### (1)Windows平台
7+
#### (1) Windows Platform
88

9-
虽然在自动升级时会关闭应用程序,如果出现特殊情况出现文件占用通常是进程还在运行导致的。这时候可以使用微软官方提供的handle.exe检测工具来查看指定目录下是否有进程在运行"handle.exe"是一款由微软提供的命令行工具,可以用来显示哪些进程打开了哪些文件。在C#中调用handle.exe,我们可以使用`System.Diagnostics.Process`类,如果检测到则会返回该目录下正在运行的进程列表。
9+
Even though applications are closed during automatic upgrades, file occupancy can occur if processes are still running due to special circumstances. In such cases, you can use Microsoft's handle.exe tool to check if there are any processes running in a specified directory. "handle.exe" is a command-line tool provided by Microsoft that displays which processes have opened specific files. In C#, you can invoke handle.exe using the `System.Diagnostics.Process` class. If a process is detected, it will return a list of processes running in that directory.
1010

1111
```c#
1212
using System;
@@ -18,7 +18,7 @@ class Program
1818
{
1919
Process process = new Process();
2020
process.StartInfo.FileName = "handle.exe";
21-
process.StartInfo.Arguments = "filename";
21+
process.StartInfo.Arguments = "filename"; // Replace 'filename' with the actual file or directory
2222
process.StartInfo.UseShellExecute = false;
2323
process.StartInfo.RedirectStandardOutput = true;
2424
process.Start();
@@ -31,8 +31,5 @@ class Program
3131
}
3232
```
3333

34-
35-
36-
参考资料:
37-
34+
References:
3835
- https://learn.microsoft.com/zh-cn/sysinternals/downloads/handle

website/docs/guide/Permission.md

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,42 @@
22
sidebar_position: 1
33
---
44

5-
### Permission 权限
5+
### Permissions
66

7-
#### (1)Windows平台
7+
#### (1) Windows Platform
88

99
![](imgs\UAC.png)
1010

11-
在使用GeneralUpdate实现自动升级的时候,如果更新目录在C盘实现文件替换或打文件补丁时会出现权限问题。又因为windows11操作系统推出在C盘特定的目录相比之前推出的windows的操作系统加强了权限管理。
11+
When using GeneralUpdate for automatic updates, you may encounter permission issues if the update directory is on the C drive, especially when replacing files or applying patches. With the introduction of Windows 11, permission management for certain directories on the C drive has become more stringent compared to previous Windows operating systems.
1212

13-
那么稍微不注意将会触碰到权限管理的边界,接下来我们看看操作哪些目录会导致出现权限问题:
13+
It's important to be aware of which directories might trigger permission issues:
1414

15-
| 名称 | 目录 |
16-
| -------------- | ------------------------------------------ |
17-
| 系统文件夹 | C:\Windows |
18-
| 注册表配置文件 | C:\Windows\System32\config |
19-
| 驱动文件夹 | C:\Windows\System32\drivers |
20-
| 程序文件夹 | C:\Program Files C:\Program Files (x86) |
15+
| Name | Directory |
16+
| --------------- | ------------------------------------------- |
17+
| System Folder | C:\Windows |
18+
| Registry Config | C:\Windows\System32\config |
19+
| Driver Folder | C:\Windows\System32\drivers |
20+
| Program Folder | C:\Program Files and C:\Program Files (x86) |
2121

22-
推荐使用目录,避免权限问题:
22+
Recommended directories to avoid permission issues:
2323

24-
| 名称 | 目录 |
25-
| ------------ | ------- |
26-
| 用户数据目录 | AppData |
27-
| 系统临时目录 | Temp |
24+
| Name | Directory |
25+
| -------------------------- | --------- |
26+
| User Data Directory | AppData |
27+
| System Temporary Directory | Temp |
2828

29+
### Lowering UAC
2930

31+
The following method is not recommended for use in production environments as it may cause issues for users. If you encounter UAC (User Account Control) prompts or permission/access denied issues during updates, you might consider lowering the UAC control level. This can be done by modifying the registry as follows:
3032

31-
### UAC降权
33+
| Registry Name | New Value | Default Value |
34+
| -------------------------- | --------- | ------------- |
35+
| enableLUA | 0 | 1 |
36+
| ConsentPromptBehaviorAdmin | 0 | 5 |
3237

33-
以下方法不推荐在生产环境中使用,以免给用户造成损失。如果在更新过程中出现UAC (User Account Control)提示或无权限、拒绝访问的情况可以考虑降低UAC控制等级,这个思路在代码层面可以通过修改以下注册表达到目的:
38+
Modify the above registry settings before the update (effective after restarting the computer), and be sure to restore them after the update is complete.
3439

35-
| 注册表名称 | 修改值 | 默认值 |
36-
| -------------------------- | ------ | ------ |
37-
| enableLUA | 0 | 1 |
38-
| ConsentPromptBehaviorAdmin | 0 | 5 |
39-
40-
更新之前修改以上注册表(重启计算机生效),切记更新完成之后需要恢复该内容。
41-
42-
43-
44-
c#修改注册表:
40+
C# code to modify the registry:
4541

4642
```c#
4743
using Microsoft.Win32;
@@ -61,19 +57,14 @@ public void UpdateRegistry()
6157
}
6258
```
6359

64-
65-
66-
bat批处理修改注册表:
60+
Batch script to modify the registry:
6761

6862
```bat
6963
@echo off
7064
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f
7165
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f
7266
```
7367

74-
75-
76-
参考资料:
77-
68+
References:
7869
- https://learn.microsoft.com/zh-cn/windows/security/application-security/application-control/user-account-control/how-it-works
7970
- https://blog.walterlv.com/post/windows-user-account-control.html

website/docs/guide/System infomation.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@
22
sidebar_position: 6
33
---
44

5-
### System infomation 系统信息
5+
### System Information
66

7-
#### (1)Windows平台
7+
#### (1) Windows Platform
88

9-
当更新失败时,并不清楚是因为操作系统的原因还是其他原因导致的启动失败。这个时候可以使用PsInfo导出当前操作系统的信息,供开发人员进行问题排查。*PsInfo* 是一个命令行工具,它可用于收集有关本地或远程 Windows NT/2000 系统的关键信息,包括安装类型、内核版本、已注册的组织和所有者、处理器数量及其类型、物理内存量、系统的安装日期以及到期日期(如果为试用版)。
9+
When an update fails, it might not be clear whether the failure is due to the operating system or other reasons. In such cases, you can use PsInfo to export information about the current operating system, which can help developers troubleshoot the issue. *PsInfo* is a command-line tool that can be used to collect critical information about local or remote Windows NT/2000 systems, including installation type, kernel version, registered organization and owner, number and type of processors, amount of physical memory, system installation date, and expiration date (if it is a trial version).
1010

11-
#### 使用 PsInfo
11+
#### Using PsInfo
1212

13-
默认情况下,*PsInfo* 会显示本地系统的信息。 指定远程计算机名称以从远程系统获取信息。 由于 *PsInfo* 依赖于远程注册表访问来获取其数据,因此远程系统必须运行远程注册表服务,并且运行 *PsInfo* 的帐户必须有权访问远程注册表的 HKLM\System 部分。
13+
By default, *PsInfo* displays information about the local system. Specify a remote computer name to retrieve information from a remote system. Since *PsInfo* relies on remote registry access to gather its data, the remote system must have the remote registry service running, and the account running *PsInfo* must have access to the HKLM\System section of the remote registry.
1414

15-
为了帮助自动更新 Service Pack*PsInfo* 会返回系统的 Service Pack 数的值(例如 0 表示无 Service Pack,1 表示 SP 1 等)。
15+
To assist in automating Service Pack updates, *PsInfo* returns the system's Service Pack number (e.g., 0 for no Service Pack, 1 for SP 1, etc.).
1616

17-
**用法: psinfo [[\\computer[,computer[,..] | @file [-u user
18-
[-p psswd]]] [-h] [-s] [-d] [-c [-t delimiter]] [filter]**
17+
**Usage: psinfo [[\\computer[,computer[,..] | @file [-u user [-p psswd]]] [-h] [-s] [-d] [-c [-t delimiter]] [filter]**
1918

20-
| 参数 | 说明 |
21-
| :------------- | :----------------------------------------------------------- |
22-
| **\\computer** | 在指定的远程计算机上执行命令。 如果省略计算机名称,则命令在本地系统上运行,如果指定通配符 (\\*),则命令将在当前域中的所有计算机上运行。 |
23-
| **@file** | 在指定的文本文件中列出的每台计算机上运行命令。 |
24-
| **-u** | 指定登录远程计算机的可选用户名。 |
25-
| **-p** | 指定用户名的可选密码。 如果省略此内容,系统将提示你输入隐藏密码。 |
26-
| **-h** | 显示已安装的修补程序的列表。 |
27-
| **-s** | 显示已安装的应用程序的列表。 |
28-
| **-d** | 显示磁盘卷信息。 |
29-
| **-c** | CSV 格式打印。 |
30-
| **-t** | -c 选项的默认分隔符为逗号,但可以使用指定的字符替代。 |
31-
| **filter** | Psinfo 将仅显示与筛选器匹配的字段的数据。 例如,“psinfo service”仅列出 service pack 字段。 |
19+
| Parameter | Description |
20+
| -------------- | ------------------------------------------------------------ |
21+
| **\\computer** | Execute the command on the specified remote computer(s). If the computer name is omitted, the command runs on the local system. If a wildcard (\\*) is specified, the command runs on all computers in the current domain. |
22+
| **@file** | Run the command on each computer listed in the specified text file. |
23+
| **-u** | Specify an optional username for logging onto the remote computer. |
24+
| **-p** | Specify an optional password for the username. If omitted, you will be prompted to enter a hidden password. |
25+
| **-h** | Show a list of installed hotfixes. |
26+
| **-s** | Show a list of installed applications. |
27+
| **-d** | Show disk volume information. |
28+
| **-c** | Print in CSV format. |
29+
| **-t** | The default delimiter for the -c option is a comma, but you can specify a different character. |
30+
| **filter** | PsInfo will only display data for fields that match the filter. For example, "psinfo service" will only list the service pack field. |
3231

33-
#### 示例输出
32+
#### Example Output
33+
34+
When you run PsInfo, it will output information about the system in a structured format. This information can be used to diagnose and address any issues that may arise during the update process.
3435

3536
```c#
3637
C:\> psinfo \\development -h -d
@@ -81,4 +82,4 @@ Sysinternals - www.sysinternals.com
8182

8283

8384

84-
官方文档:https://learn.microsoft.com/zh-cn/sysinternals/downloads/psinfo
85+
References:https://learn.microsoft.com/zh-cn/sysinternals/downloads/psinfo

0 commit comments

Comments
 (0)