How to create a shortcut using commands in Windows XP?
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
echo >>a.url
echo URL=c:\windows\system32\notepad.exe >>a.url
echo IconIndex=29 >>a.url
echo IconFile=C:\windows\system32\shell32.dll >>a.url
@echo off
if exist "%1.url" echo The link "%1.url" has been created! & goto :eof
if exist "%~f2" echo The target "%~f2" does not exist! & goto :eof
echo > "%1.URL"
echo URL=%~f2 >> "%1.URL"
echo IconIndex=0 >> "%1.URL"
echo IconFile=%~f2 >> "%1.URL"
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop") 'Get the desktop directory
set oShellLink = WshShell.CreateShortcut(strDesktop & "\qq.lnk") 'Shortcut storage directory and name
oShellLink.TargetPath = "C:\Program Files\Tencent\QQ\CoralQQ.exe" 'Target executable file
oShellLink.WindowStyle = 1 'Run mode
oShellLink.Hotkey = "CTRL+SHIFT+F" 'Hotkey
oShellLink.IconLocation = "C:\Program Files\Tencent\QQ\QQ.exe, 0" 'Icon
oShellLink.Description = "qq" 'Remark
oShellLink.WorkingDirectory = "C:\Program Files\Tencent\QQ\" 'Start directory
oShellLink.Save 'Create shortcut
fsutil file createnew C:\test 0
rundll32.exe appwiz.cpl,NewLinkHere C:\test
Originally posted by dst1213 at 2006-7-24 19:39:
How to create a shortcut to the "c:\setups" folder in sendto and add it to the right-click "Send To"?