Creating a shortcut at desktop

Got a problem you cannot solve? Try here.
Post Reply
serina
Posts: 47
Joined: Tue Jun 30, 2009 10:30 pm

Creating a shortcut at desktop

Post by serina »

Hi there,

I'm trying to create a shortcut to desktop in the finish dialog but it seems not to execute successfully....In the finish dialog, it prompts the user to check or uncheck whether they wants a shortcut of the application on their desktop. Therefore, i set my script as below...

if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Create Shortcut $DESKTOPDIR$\\#TITLE# to $DESKTOPDIR$\\...exe
end
end
end

If I'm not mistaken it should create the shorcut once user checks the checkbox in the finish dialog. When I tried executing the same script
" Create Shortcut $DESKTOPDIR$\\#TITLE# to $DESKTOPDIR$\\...exe" in the Main Install before installing the files, it seems to work fine. But then, I want the user to select whether they want to create the shorcut or not in the finish dialog...Is this problem due to my variable or wat...i'm not sure...
Would be wonderful if i could get a feed back soon..

Thanks in advance

Regards,
Serina
ChrisN
Posts: 25
Joined: Thu Jul 23, 2009 7:32 am

Post by ChrisN »

Hi Serina.

Insert "Apply Changes" after the "Create Shortcut" command.

if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Create Shortcut $DESKTOPDIR$\\#TITLE# to $DESKTOPDIR$\\...exe
Apply Install
end
end
end

Best regards.
serina
Posts: 47
Joined: Tue Jun 30, 2009 10:30 pm

Post by serina »

Hi Chris,

Thanks buddy....thats exactly what I wanted to know!!!....Didn't thought of that...Thanks again!! luv u!!! :P

Regards,
Serina
serina
Posts: 47
Joined: Tue Jun 30, 2009 10:30 pm

Post by serina »

Hi,

I would like to ensure whats the cause that make the 'Create Shortcut to Desktop' to take time to finish executing the script??.... Whenever i check the 'Create shortcut to desktop', it takes nearly 30 seconds to complete executing the line to create the shortcut and finally exits the dialog successfully.....This will initially let the user to start wondering whats going on and hence, irritates them.

Is there any way to overcome this situation???

Thanks in advance...

Regards,
Serina
serina
Posts: 47
Joined: Tue Jun 30, 2009 10:30 pm

Post by serina »

Any feedback please..
neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK

Post by neillans »

I can't think of anything that would take time to execute, however, having a second Apply Install will mean the installer will have to invoke the MSI Executive again to create the shortcut -- not a lightweight task!

If you want to create the shortcut post install, I would recommend writing a plugin to do the creation - that would avoid the 2nd call to msiexec.
Andy Neillans
serina
Posts: 47
Joined: Tue Jun 30, 2009 10:30 pm

Post by serina »

Thanks for the suggestion Andy! :)

But I would like to know what kind of plugin should I write to the creation?? Sorry...I'm not that clear on this....Would appreciate a lot if you could explain on this to me...

Lots of thanks!!

Regards,
Serina
neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK

Post by neillans »

Hi Serina,

I would start my having a look at the sample plugins -- if you then write a simple "Hello World" plugin that you include in your projects to make sure you are comfortable with things before moving on, you will find it easier :)

Once you have mastered the ability to create plugins, you will need to look at the Shortcut Creation API in Windows.
Andy Neillans
Post Reply