Windows: create shortcut and autorun program
Windows and create program
2023-09-11 14:16:16 时间
For Current User:
- startup folder
shell:startup
-
Registry
For Local Machine:
- startup folder
shell:common startup
- Registry
Create shortcut:
- cmd
- powershell
# 通过new-object(cmdlet)创建com对象,类是WScript.shell $com=new-object -ComObject WScript.shell # 使用.NET框架System.Environment类的GetFolderPath静态方法取得common folder路径(desktop,windows,system32) $destFolder=[System.Environment]::GetFolderPath("commonstartup") # 调用com对象CreateShortcut $shortcut=$com.CreateShortcut("$destFolder\vmware-tray.lnk") # 设置TargePath, IconLocation属性 $shortcut.TargetPath="C:\Program Files (x86)\VMware\VMware Workstation\vmware-tray.exe" $shortcut.IconLocation="C:\Program Files (x86)\VMware\VMware Workstation\ico\generic.ico" # 调用save方法, 生成快捷方式 $shortcut.save()
-
shell:appsfolder
相关文章
- Unity Game Starter Kit for Windows Store and Windows Phone Store games
- Linux如何下解压windows下的.zip和.rar文件
- Windows 下安装 SSH 服务(Openssh)
- Windows Store App 全球化:运行时响应语言变更
- [Docker] Install Docker on Windows (hp) and start with Kitematic
- windows下安装、卸载mysql服务
- windows内核提权
- 【错误记录】解压 Linux 内核报错 ( Can not create symbolic link : 客户端没有所需的特权 | Windows 中配置 7z 命令行执行解压操作 )
- 不改动当前账户密码的情况下,启用其他账户登录windows系统
- Windows 7中使用Eclipse 使用CDT and WinGW 开发C/C++(转载)
- windows下python使用虚拟环境
- Centos7和Windows下安装并配置 Zookeeper
- Windows安装WSL进行机器学习(windows和Ubuntu同时使用)
- 华为桌面云封装Windows10系统出现sysprep无法验证您的Windows安装问题,完美解决
- Windows 远程桌面连接中打不开 photoshop、大型图形或三维工程软件 等使用GPU渲染的软件的解决办法