I am trying to create a short cut to a batch file from within a batch file. I have experimented with the following code, but been unable to link to the batch file.
Where link.url is the shortcut and ON.bat is the batch file I need the shortcut to link to. What am I doing wrong. I have seen some ways to accomplish this with a WSC, but was told I could do it with a batch file. Any help is appreciated.
Thanks,
Greg
Code:
del "c:\link.url"
echo [DEFAULT] >> "c:\link.url"
echo BASEURL= >> "c:\link.url"
echo [InternetShortcut] >> "c:\link.url"
echo URL="c:\link.url" >> "c:\link.url"
::alternatively have tried
::echo URL="file:///c:\ON.bat"
echo IconIndex=109 >> "c:\link.url"
echo IconFile=c:\WINDOWS\system32\SHELL32.dll >> "c:\link.url"
Where link.url is the shortcut and ON.bat is the batch file I need the shortcut to link to. What am I doing wrong. I have seen some ways to accomplish this with a WSC, but was told I could do it with a batch file. Any help is appreciated.
Thanks,
Greg