win程序 安装 跟踪_如何在Win10中重新安装和重新注册所有内置Win应用程序

如何为您的用户帐户或 Windows 10 中的所有用户帐户重新安装和重新注册所有内置 Windows 应用程序。注意,在安全模式下,您将无法从 Microsoft Store 重新注册和重新安装应用程序。

199bbe7a6a81b21258b9510e900d15f9.png

重新安装并重新注册所有应用程序

如果已经安装了 Windows 应用程序,则在 PowerShell 中会看到一条红色错误消息,让您知道每个应用程序。如果您为所有用户帐户卸载了应用程序,则不会重新安装该应用程序。如果您无法重新安装应用程序,则需要从 Microsoft Store 安装应用程序。

1、请执行以下步骤2(当前帐户)或步骤3(所有帐户)。
2、重新安装并重新注册仅适用于当前帐户的所有 Windows 应用程序

A)打开 Windows PowerShell。

B)复制下面的命令并将其粘贴到 PowerShell 中,然后按 Enter。

Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)AppXManifest.xml"}

3、重新安装并重新注册所有帐户的所有 Windows 应用程序

A)以管理员身份打开 Windows PowerShell。

B)复制下面的命令并将其粘贴到 PowerShell 中,然后按 Enter。

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)AppXManifest.xml"}

完成后,关闭 PowerShell,然后尝试再次打开受影响的应用程序。

重新安装并重新注册当前帐户的特定应用程序

1、打开命令提示符。

2、将以下要重置的 Windows 应用程序的命令复制并粘贴到命令提示符中,然后按 Enter。 完成后,您可以根据需要关闭命令提示符。

3D Builder
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *3DBuilder*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

3D Viewer
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Microsoft3DViewer*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Alarms & Clock
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsAlarms*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

App Connector
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *AppConnector*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Calculator
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsCalculator*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Calendar and Mail
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *windowscommunicationsapps*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Camera
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsCamera*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Candy Crush Soda Saga
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *CandyCrushSodaSaga*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Connect
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *PPIProjection*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Contact Support
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *ContactSupport*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Cortana
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Windows.Cortana*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Drawboard PDF
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *DrawboardPDF*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Feedback Hub
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsFeedbackHub*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Get Help
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *ContactSupport*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Get Office
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *MicrosoftOfficeHub*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Get Started
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *GetStarted*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Groove Music
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *ZuneMusic*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Mail and Calendar
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *windowscommunicationsapps*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Maps
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsMaps*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Messaging
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Messaging*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Microsoft Edge
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *MicrosoftEdge*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Microsoft News
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *BingNews*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Microsoft Solitaire Collection
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *MicrosoftSolitaireCollection*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Microsoft Store
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsStore*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Microsoft Whiteboad
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Microsoft.Whiteboard*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Mixed Reality Portal
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Microsoft.MixedReality.Portal*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Money
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *BingFinance*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Movies & TV
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *ZuneVideo*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Microsoft News
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *BingNews*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

OneDrive (Store app)
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *microsoft.microsoftskydrive*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

OneNote
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Office.OneNote*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Paint 3D
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *MSPaint*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

People
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *People*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Phone
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *CommsPhone*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Phone Companion
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsPhone*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Photos
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Photos*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Settings
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *immersivecontrolpanel*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Skype
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *SkypeApp*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Snip & Sketch
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Microsoft.ScreenSketch*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Sports
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *BingSports*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Sticky Notes
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *MicrosoftStickyNotes*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Sway
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Office.Sway*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Tips
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Microsoft.Getstarted*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Twitter
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Twitter*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Voice Recorder
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *WindowsSoundRecorder*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Weather
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *BingWeather*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Xbox Console Companion
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *XboxApp*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Xbox Game Bar
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Microsoft.XboxGamingOverlay*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Xbox One SmartGlass
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *XboxOneSmartGlass*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

Your Phone
Code:

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *Microsoft.YourPhone*).InstallLocation + 'AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}"

从 Microsoft Store 重新安装当前帐户的应用程序

您可以直接在微软的应用商店进行搜索安装即可。

### 图像处理Transformer 模型的使用与实现 Transformer 是一种基于自注意力机制(Self-Attention Mechanism)的神经网络架构,最初被设计用于自然语言处理 (NLP)[^3]。然而,近年来其在计算机视觉领域的应用也取得了显著进展。以下是关于如何在图像处理任务中使用和实现 Transformer 的详细介绍。 #### 1. Transformer图像处理中的应用场景 Transformer 已经成功应用于多种图像处理任务,包括但不限于图像分类、目标检测、语义分割以及图像生成等[^2]。这些任务的核心在于利用 Transformer 对全局上下文关系的强大建模能力,从而提升模型性能。 #### 2. 基本原理 Transformer 的核心组件是多头自注意力机制(Multi-head Self-Attention),它可以捕捉输入数据之间的长期依赖关系。在图像处理场景下,通常会先将图像划分为固定大小的小块(Patches),并将其展平为一维向量序列作为 Transformer 输入[^4]。这种操作类似于 NLP 中的词嵌入(Word Embedding)。 为了进一步增强表征学习效果,在实际应用过程中还会引入位置编码(Positional Encoding)。这是因为原始图片经过切片后丢失了空间顺序信息,而位置编码能够帮助模型重新恢复这一特性[^1]。 #### 3. PyTorch 实现示例 下面是一个简单版本的基于 PyTorch 构建的 Vision Transformer(ViT): ```python import torch from torch import nn, optim class PatchEmbedding(nn.Module): def __init__(self, img_size=224, patch_size=16, embed_dim=768): super().__init__() self.proj = nn.Conv2d(3, embed_dim, kernel_size=patch_size, stride=patch_size) def forward(self, x): x = self.proj(x).flatten(2).transpose(1, 2) return x class MultiHeadAttention(nn.Module): def __init__(self, dim, num_heads=8): super(MultiHeadAttention, self).__init__() assert dim % num_heads == 0 self.num_heads = num_heads head_dim = dim // num_heads self.scale = head_dim ** -0.5 self.qkv = nn.Linear(dim, dim * 3, bias=False) self.attn_drop = nn.Dropout(0.) self.proj = nn.Linear(dim, dim) def forward(self, x): B, N, C = x.shape qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4) q, k, v = qkv.unbind(0) attn = (q @ k.transpose(-2, -1)) * self.scale attn = attn.softmax(dim=-1) attn = self.attn_drop(attn) x = (attn @ v).transpose(1, 2).reshape(B, N, C) x = self.proj(x) return x class ViTBlock(nn.Module): def __init__(self, dim, num_heads, mlp_ratio=4., drop_rate=0.): super(ViTBlock, self).__init__() self.norm1 = nn.LayerNorm(dim) self.msa = MultiHeadAttention(dim, num_heads=num_heads) self.drop_path = DropPath(drop_rate) if drop_rate > 0. else nn.Identity() self.norm2 = nn.LayerNorm(dim) hidden_features = int(dim * mlp_ratio) self.mlp = Mlp(in_features=dim, hidden_features=hidden_features, act_layer=nn.GELU, drop=drop_rate) def forward(self, x): x = x + self.drop_path(self.msa(self.norm1(x))) x = x + self.drop_path(self.mlp(self.norm2(x))) return x def build_vit(img_size=224, patch_size=16, embed_dim=768, depth=12, num_heads=12, class_num=1000): model = nn.Sequential( PatchEmbedding(img_size=img_size, patch_size=patch_size, embed_dim=embed_dim), *[ViTBlock(embed_dim, num_heads=num_heads) for _ in range(depth)], nn.LayerNorm(embed_dim), nn.Linear(embed_dim, class_num)) return model model = build_vit() print(model(torch.randn((1, 3, 224, 224))).shape # 输出形状应为 [batch_size, class_num] ``` 上述代码展示了如何构建一个基础版的 Vision Transformer 结构,并通过 `build_vit` 函数创建了一个完整的模型实例。 --- #### 4. 总结 Transformer 不仅限于文本领域,在图像处理方面同样表现出巨大潜力。通过合理的设计与优化策略,可以有效解决各类复杂的视觉问题。未来随着技术进步及相关研究深入,相信会有更多创新成果涌现出来。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值