1.

Solve : Shortcut from batch??

Answer»

Can A Batch File Posible Make A Shortcut?

THXNot directly. Shortcut are a Windows invention. There is a shortcut utility (shortcut.exe) in the Windows NT Resource Kit. I have been unable to find a singular download for the shortcut.exe file, however the kit contains other UTILITIES you may find useful.

The other method (tried and true) involves a VBScript which is fairly boilerplate and uses the same parameters you'd find if you made the shortcut manually.

The little snippet creates a desktop shortcut.

Code: [Select]set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut Script.lnk")
oShellLink.TargetPath = WScript.ScriptFullName
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+F"
oShellLink.IconLocation = "notepad.exe, 0"
oShellLink.Description = "Shortcut Script"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save

Fill in the oShellLink parameters with the appropriate information.

Good LUCK. There is A Software Called "XXMLINK" Which Creates Shortcut From Batch.

I've Applied Software With This

Code: [Select]xxmklink spath opath [ arg [ wdir [ desc [ mode [ icon[:n] ]]]]] [switches...]
[Saving space, attachment deleted by admin]Quote from: rem_bc on February 12, 2010, 10:16:12 PM

Can A Batch File Possible Make A Shortcut?


Here is the easy way:

Code: [Select]@echo off
start Iexplore.exe http://www.pement.org/awk/awk1line.txt
or the difficult way:

C:\>type Awk.url
Code: [Select][DEFAULT]
BASEURL=http://www.pement.org/awk/awk1line.txt
[InternetShortcut]
URL=http://www.pement.org/awk/awk1line.txt
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2C:\

p.s.: KISS ( Keep It Simple Sam )Bill brings up a good point (although the VBS solution works wonders). .URL files are still shortcuts. If you use
file://
instead of
http://
then in theorey, you can use a web shortcut as a REGULAR shortcut. Quote
[DEFAULT]
BASEURL=http://www.pement.org/awk/awk1line.txt
[InternetShortcut]
URL=http://www.pement.org/awk/awk1line.txt
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2

Oh Man Its Awesome! It Works!


Discussion

No Comment Found