Jump to content
Sign in to follow this  
bcolflesh

URL Shortcut with an Icon File?

Recommended Posts

bcolflesh

First time AutoIt user - I searched the forum and saw the examples for creating .lnk and .url files. The IniWrite example appealed to me since I've used .ini files before:

CODE
IniWrite(@DesktopDir & '\myurl.url', 'InternetShortcut', 'URL', 'http://www.myurl...')

IniWrite(@DesktopDir & '\myurl.url', 'InternetShortcut', 'IconFile', 'C:\WINDOWS\SYSTEM\url.dll')

IniWrite(@DesktopDir & '\myurl.url', 'InternetShortcut', 'IconIndex', '1')

I tried making 'IconFile' the path to my site's favicon.ico file, but Windows does not display it - I suspect if I rebooted or killed explorer/restarted it would grab the file?

What I would really like to do is include a custom .ico file that the AutoIt .exe would write to the end user's file system that would display immediately, as you see with all pro installers.

Is this possible with AutoIt? Or is it outside the scope of it's capabilities?

Edited by bcolflesh

Share this post


Link to post
Share on other sites
DjDeep00

Did u take a look at FileCreateShortcut?

Share this post


Link to post
Share on other sites
bcolflesh

Did u take a look at FileCreateShortcut?

Yes I did, but I found no example that could associate a custom .ico file that would appear as the shortcut icon when the .exe is run - are you implying that is possible? Please give me a link to such an example.

Share this post


Link to post
Share on other sites
JailDoctor

Yes I did, but I found no example that could associate a custom .ico file that would appear as the shortcut icon when the .exe is run - are you implying that is possible? Please give me a link to such an example.

You can select any icon you have available in your computer when compiling your script to create an *.exe file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.