固定以在Windows 8上以编程方式启动快捷方式

编程入门 行业动态 更新时间:2024-10-25 22:25:46
本文介绍了固定以在Windows 8上以编程方式启动快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经使用Installshield 2011创建了一个安装程序.该安装程序在StartMenu-> Programs中创建一个快捷方式,并且在安装过程中还运行了vbscript.此VB脚本在StartMenu-> Programs中创建另一个快捷方式.

I have created an Installer using Installshield 2011. This Installer creates a shortcut in StartMenu-->Programs and it also has runs a vbscript during installation. This VB Script creates another shortcut in StartMenu-->Programs.

问题在于,由Installshield创建的快捷方式会自动固定为启动",因此在Windows 8的Metro UI上显示为平铺,但是由VBScript创建的快捷方式为未固定为启动",并且仅在在Metro UI桌面上单击所有应用".

The problem is that the shortcut created by Installshield gets automatically "pinned to Start" and hence appear as a tile on metro UI on windows 8, but the shortcut created by VBScript is "NOT pinned to start" and is visible only after clicking on "All Apps" on the Metro UI Desktop.

我可以在VBScript中进行哪些更改,以便将快捷方式固定为启动.我可以使用任何API吗?

What can I change in the VBScript so that the shortcut is pinned to start. Is there any API Which I can use?

推荐答案

我在这里没有Windows 8,因此不确定是否可以使用Windows 8,但尝试一下也不会有任何伤害:

I don't have Windows 8 here, so I'm not sure if this will work, but it won't hurt to give it a try:

Set sa = CreateObject("Shell.Application") Set fldr = sa.NameSpace("C:\PATH\TO\SHORTCUT\FOLDER") Set lnk = fldr.ParseName("SHORTCUT.lnk") For Each verb In lnk.Verbs If verb.Name = "Pin to Tas&kbar" Then verb.DoIt() Next

更多推荐

固定以在Windows 8上以编程方式启动快捷方式

本文发布于:2023-11-13 01:07:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582991.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:快捷方式   上以   方式   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!