Need to copy a custom shortcut to the desktop

Microsoft Windows xp professional w/serv...
September 5, 2009 at 20:03:37
Specs: Windows XP
We are planning a campaign to send either tech associates or removable media (CDs or flash drives) to client locations to set them up to use our website. We want the tech or client to be able to insert a flash drive or cd and have that device autorun a batch file or script to put a custom shortcut to our website on the client's desktop (XP or Vista) without user intervention. So far I have been unsuccessful in writing a script or batch file to copy the shortcut complete with the custom icon. Any ideas?



See More: Need to copy a custom shortcut to the desktop

Report •


#1
September 6, 2009 at 06:28:36
You don't say what you've tried or what problems you encountered. The main problem is that the shortcut has to refer to a specific location for the icon. I'd suggest putting the icon in the root of C, i.e. C:\

Modify the shortcut to point to it. Assuming the icon and shortcut are both in the root of the Flash drive or CD -

copy MyIcon.ICO c:\
copy MyURL.url "%userprofile%\desktop"

I have to assume you know how to autorun the batch file on the CD or Flash drive.


Report •

#2
September 6, 2009 at 21:38:40
Rambler,

The problem I have is the shortcut keeps being copied without the custom icon. The shortcut and icon were already in the root directory of (in this case) a flash drive and I changed the batch file to use the commands you recommended. The icon and the shortcut copy to the proper places but I STILL get the generic internet explorer "e" icon.
I even created a shortcut, changed the icon and dropped it into notepad, which gives me the following:

URL=http://MyFile.com/
IDList=
HotKey=0
IconIndex=0
IconFile=C:\MyIcon.ico
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2

At this point I wonder if there are commands to go into the properties and change the icon


Report •

#3
September 7, 2009 at 03:46:05
Icon is in the exe and that's what gives you the trouble
Here is an easy way to get rid of that.

Download a tool called Resource Hacker.

http://www.soft32.com/Download/Free...

It's free, needs no install, download it and run it.

Open Resource Hacker and load the exe file of your program
Now change the first Icon in the Icon section to your new Icon and save
Do this again so that all default Icons are changed to your new Icon

Make a shortcut of the exe and unbottle the champagne and everybody will hold you for a whizzy.

;-)

Success

You can also send me the exe and I will do it for you


Report •

Related Solutions

#4
September 8, 2009 at 12:41:19
Hmmm - something amiss here - I copied a ahortcut directly to the Desktop folder of the Admin account, and the linked icon to the root of C via a mapped drive to my second PC. Logged on and there is the shortcut displaying the icon as expected. I then tried with a different shorcut and linked icon while viewing the desktop on the other PC - it popped up as expected.

I'm not using autorun on a CD or Flash drive of course, but the effect has to be the same. I have a suspicion about that [{000214A0-0000-0000-C000-000000000046}] and Prop3=19,2 at the end - I'm using W2000 at the moment, and the shortcut is missing those lines. Looks rather like a CLSID in the registry to me - have another go with those lines deleted. Links copied from older OS's won't have them, but still work fine. In the mean time I'll try popping an Autorun folder onto my camera - should work just like a Flash drive, and try it properly, just in case.


Report •


Ask Question