Shortcut execution speed


Old 12-29-01, 03:30 PM
Thread Starter
Join Date: Dec 2000
Posts: 1,019
Received 0 Votes on 0 Posts
Shortcut execution speed

Given two shortcuts: LNK and URL, each executing the same batch file, why does Explorer execute the batch twice as fast through the URL shortcut? If you can enlighten me, please do!

Curious? The batch loads a HTML document & invokes a dialup connection via shortcuts on the Start Menu. The command lines are the same, except for shortcut syntax conventions.
Sponsored Links
Old 12-31-01, 01:56 PM
Thread Starter
Join Date: Dec 2000
Posts: 1,019
Received 0 Votes on 0 Posts
self answered

A little research revels: LNK - Relative Path and URL - Absolute Path. Thus greater speed. Input conventions and file structures provide clews.

Command Line - FilePathSpec [optional parameters]
Start In - PathSpec [optional]
Shortcut key [optional]
Window size [default & optional]
(is resolved) - same for PIF

URL=file:///FilePathSpec [must be parameterless]

Thats the synopsis.

Something that may be useful, spawning from: annoyance - Start, Click, Right Click ... to death.

MS solution: "Web view" & single click. Access from the drop down address bar, but adds Registry entries plus the infamous restart [web view].

Simpler: dummy HTML. <HTML><HEAD></HEAD><BODY></BODY></HTML>
Notepad >Save As >Desktop\"Setup.HTML" Include quotes, else Notepad adds TXT extension.

Increased usefulness: launch programs or Folders from Favorites. Any type of shortcut , LNK, PIF, URL, may be used. URL is the simplest to add & remove dynamically via batch or script.

For tinkering in Win98 or updating - possibles: Regedit, SystemInfo,, and %windir% Folder.
Tinkering online: possibles - Folders %windir%\Tempor~1, %windir%\Cookies, Index.dats [via Edit] or anything else you find useful.

Sample batch:


@Echo off

REM shorten cmd length - avoid quotes & 8.3 pathnames

Set Folder=%windir%\Favorites\
Set SysIn=C:\Program Files\Common Files\Microsoft Shared\MSINFO\MSINFO32.EXE

REM quotes for spaces in filenames

Echo [InternetShortcut]>%Folder%"Regedit Now.url"
Echo URL=file:///%windir%\REGEDIT.EXE>>%Folder%"Regedit Now.url"

Echo [InternetShortcut]>%Folder%"System Info Now.url"
Echo URL=file:///%SysIn%>>%Folder%"System Info Now.url"

Echo [InternetShortcut]>%Folder%"Command Now.url"
Echo URL=file:///%comspec%>>%Folder%"Command Now.url"

Echo [InternetShortcut]>%Folder%"Windows Folder.url"
Echo URL=file:///%windir%>>%Folder%"Windows Folder.url"

REM for fun - perverse use of URL - execute batch

REM Write batch - "Hello World" - "MS pun"

Echo @Echo.>%windir%\Command\hello.bat
Echo @Echo Hello World>>%windir%\Command\hello.bat
Echo @Echo.>>%windir%\Command\hello.bat
Echo @Echo Where do you want to go today?>>%windir%\Command\hello.bat

REM Favori~1 shortcut

Echo [InternetShortcut]>%Folder%"Hello World.url"
Echo URL=file:///%windir%\Command\hello.bat>>%Folder%"Hello World.url"

Set Folder=
Set SysIn=


Batch is easily made recursive & is more portable than script.

Have a good year!
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Thread Tools
Search this Thread
Ask a Question
Question Title:
Your question will be posted in: