Q: Is there a way to create a batch file which would put a desktop icon onto the desktop which invokes an HTML page in a web browser and change the associated icon for that particular desktop item, all in one batch file? Thanks
A: Yes. This is possible. Here are some examples:
echo [InternetShortcut] >"%userprofile%\desktop\localpage.url" echo URL=C:\myfile.htm >>"%userprofile%\desktop\localpage.url" echo IconFile=C:\icons\favicon.ico >>"%userprofile%\desktop\localpage.url" echo IconIndex=0 >>"%userprofile%\desktop\localpage.url"
echo [InternetShortcut] >"%userprofile%\desktop\google.url" echo URL=http://www.google.com/ >>"%userprofile%\desktop\google.url" echo IconFile=e:\icons\google.ico >>"%userprofile%\desktop\google.url" echo IconIndex=0 >>"%userprofile%\desktop\google.url"
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
How do I modify the url path on an existing internet shortcut? I have a .bat file that removes an existing shortcut and creates a new one, but the new shortcut has the old url.
simply change the .bat file extension to .txt for editing.
after finish editing, save and close it. then change the extension file back to .bat
Run and done..