Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

shortcut from command line


1 reply to this topic

Abcott

Abcott
  • Members
  • 1 posts

Posted 07 December 2003 - 01:27

Hello All,

I'm new here.
I'm not even sure this is the right place to put this question.

W95 etc had shortcut.exe
Where can I find that for XP?

I want to create a shortcut at the desktop from the command line.

Abcott.



Scotsmanscott

Scotsmanscott
  • Members
  • 20 posts

Posted 08 December 2003 - 11:26

I'd say you're definately on the wrong forum, but your request's an easy one, so here goes...

Paste the following lines into a text file with a ".vbs" extension. This will create a VBScript that creates a shortcut to "Notepad.exe" on the desktop. You can then customise it to do what you want.

Dim oWsh, oLink, sDesktop

Set oWsh = CreateObject("Wscript.Shell")

sDesktop = oWsh.SpecialFolders("Desktop")

Set oLink = oWsh.CreateShortcut(sDesktop & "\MyShortcut.lnk")

oLink.TargetPath = "%SystemRoot%\Notepad.exe"
oLink.Arguments = ""
oLink.WindowStyle = 1
oLink.IconLocation = "%SystemRoot%\Notepad.exe"
oLink.WorkingDirectory = "%SystemRoot%"

oLink.Save

Set oLink = Nothing
Set oWsh = Nothing