| Цитата |
| Код | Set Shell = CreateObject("WScript.Shell") DesktopPath = Shell.SpecialFolders("Desktop") Set link = Shell.CreateShortcut(DesktopPath & "\test.lnk") link.Arguments = "1 2 3" link.Description = "test shortcut" link.HotKey = "CTRL+ALT+SHIFT+X" link.IconLocation = "foo.exe,1" link.TargetPath = "c:\blah\foo.exe" link.WindowStyle = 3 link.WorkingDirectory = "c:\blah" link.Save
|
|
Я сделал так: но не работает - пишет Argument not optional
| Код | Private Sub Command1_Click() cresate End Sub Sub cresate() Set Shell = CreateObject("WScript.Shell") DesktopPath = Shell.SpecialFolders("Desktop") Set link = Shell.CreateShortcut(DesktopPath & "\test.lnk") link.Arguments = "1 2 3" link.Description = "test shortcut" link.HotKey = "CTRL+ALT+SHIFT+X" link.IconLocation = "wmplayer.exe,1" link.TargetPath = "D:\Program Files\Windows Media Player\wmplayer.exe" link.WindowStyle = 3 link.WorkingDirectory = "D:\Program Files\Windows Media Player\" link.Save End Sub
|
|