使用Powershell在Windows 10开始菜单上设置全出血(未打开)图标 - 理想情况下是大或宽瓷砖? [英] Use Powershell to set full-bleed (unplated) icon on Windows 10 start menu -- and ideally Large or Wide tile?

查看:79
本文介绍了使用Powershell在Windows 10开始菜单上设置全出血(未打开)图标 - 理想情况下是大或宽瓷砖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我有一个Powershell脚本,用于更改快捷方式上的图标。目标是拥有一个大图标。当快捷方式在桌面上时,它按预期工作(屏幕截图中的"A")。但是当快捷方式位于"开始"菜单中时,我无法将图标
设置为较大(屏幕截图中为"B")。图块大小调整为中(最大)。我相信它是"镀"的。样式。 


可以使用PowerShell脚本(或批处理等):


  1. 更改快捷方式的图标并将参数设置为"开始"菜单中图块中的完全出血/"未打开"? 
  2. 更好的是,让图块显示在更大/更广的风格之一?该图块当前最大为中等。脚本可以将图块设置为
    大图块或宽图块

非常感谢任何帮助!更多详情如下。


Chad



我尝试了什么


我已经使用程序TileIconifier在开始菜单中根据需要使快捷图标显示为未电镀。所以我知道这在理论上是可行的。但是,我需要以编程方式更改图标,而不是手动一次性。


我尝试在.ico文件中添加310平方,256平方等图标。 / p>

我已经读过,将"开始菜单"布局导出和导入到XML可以让您使用PowerShell更改参数。但我只想更改这一个快捷方式的参数,而不是用户可能在其"开始"菜单上的其他引脚。 


PowerShell脚本

 $ IconLocation =" C:\ Users \ ... \ CDEicon.ico" 
$ ShortcutLocation =" C:\ Users \ ... \ AppData \Roaming\Microsoft \ Windows \Start Menu \Programs\shortcut.lnk"
$ TargetPath =" C:\ Users \ ... \Change_icon-test.bat"

$ Shell = New-Object -ComObject(" WScript.Shell")
$ Shortcut = $ Shell.CreateShortcut($ ShortcutLocation)
$ Shortcut.IconLocation =" $ IconLocation,0"
$ Shortcut.TargetPath = $ TargetPath
$ Shortcut.Save()



解决方案

抱歉,我无法发布我引用的屏幕截图。在我发布图片之前,MSDN正在验证我的新帐户。 


Hi there,

I have a Powershell script that changes the icon on a shortcut. The goal is to have a large icon. It works as expected when the shortcut is on the desktop ("A" in the screenshot). But when the shortcut is in the Start Menu, I can't get the icon to be large ("B" in screenshot). The tile is resized to Medium (max). I believe it's in "plated" style. 

Can a PowerShell script (or Batch etc) be used to:

  1. Change a shortcut's icon and set parameters to full-bleed/"unplated" in the tile in the Start menu? 
  2. Even better, make the tile appear in one of the larger/wider styles? The tile is currently maxed at Medium. Can a script set the tile to be a Large or Wide tile?

Would appreciate any help! More details are below.

Chad

What I've tried

I've used the program TileIconifier to make the shortcut icon appear unplated, as desired, in the Start Menu. So I know this is possible in theory. But instead of a manual one-off, I need to change the icon programmatically.

I've tried adding icons to the .ico file that are 310 square, 256 square, etc.

I've read that exporting and importing the Start Menu layout to XML can let you change parameters with PowerShell. But I would only want to change the parameters of this one shortcut, not the other pins a user may have on their Start Menu. 

PowerShell script

$IconLocation = "C:\Users\...\CDEicon.ico"
$ShortcutLocation = "C:\Users\...\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\shortcut.lnk"
$TargetPath = "C:\Users\...\Change_icon-test.bat" 

$Shell = New-Object -ComObject ("WScript.Shell")
$Shortcut = $Shell.CreateShortcut($ShortcutLocation)
$Shortcut.IconLocation = "$IconLocation, 0"
$Shortcut.TargetPath = $TargetPath
$Shortcut.Save()


解决方案

Sorry I can't post the screenshot I referenced yet. MSDN is verifying my new account before I can post images. 


这篇关于使用Powershell在Windows 10开始菜单上设置全出血(未打开)图标 - 理想情况下是大或宽瓷砖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆