PDA

Click to See Complete Forum and Search --> : Shortcut icon of Exe on Desktop.


Susheelss
Apr 29th, 2010, 10:33 AM
Hi friends,
For my application software, I created an install package using Package and Deployment wizard. Now my question is how to make a shortcut icon of application appear automatically on desktop when this package is installed?
Thanks in advance.
Regards,
Susheelss.

koolsid
Apr 29th, 2010, 10:56 AM
You could create vbs file (A notepad file but instead of .txt it is .vbs) and then run it on installation.

The text file will have the following...


Note:
Change the text in red to appropriate text...

MyFile ~~> whatever you want the shortcut to be called
Brief Description ~~> What ever brief description you want to put
Assign A Hotkey here ~~> Replace it with a hotkey
Myfile.Exe~~> Replace it with your filename
c:\MyFile.exe ~~> Target Path + Target Exe
c:\WorkingDirectory~~> directory that the files are located in

The text that goes in the vbs file.

Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
Set link = Shell.CreateShortcut(DesktopPath & "\MyFile.lnk")
link.Arguments = "1 2 3"
link.Description = "(Brief Description)"
link.HotKey = "Assign A Hotkey here"
link.IconLocation = "(Myfile.Exe) ,1"
link.TargetPath = "c:\MyFile.exe"
link.WindowStyle = 3
link.WorkingDirectory = "c:\WorkingDirectory"
link.Save


Edit

Here is something else which you can have a look at...

http://www.vbforums.com/showthread.php?t=234891

Hack
Apr 29th, 2010, 11:08 AM
Moved To Application Deployment

Susheelss
Apr 29th, 2010, 12:04 PM
Thanks Mr SID for ur reply. But sir I wanted my application software shortcut icon to be placed on the desktop automatically while installing the package of the application software created using package and deployment wizard in vb6.

techgnome
Apr 29th, 2010, 12:21 PM
Then you need to look at the options of what ever you are using to make your install... generally speaking, they all do that... you just have to tell it.

-tg

koolsid
Apr 29th, 2010, 12:25 PM
See if this helps...

http://www.freevbcode.com/ShowCode.asp?ID=3650