Page 1 of 1

Creating a shortcut at desktop

Posted: Mon Oct 05, 2009 9:55 pm
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

Posted: Tue Oct 06, 2009 2:47 am
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.

Posted: Tue Oct 06, 2009 3:49 am
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

Posted: Tue Oct 27, 2009 8:52 pm
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

Posted: Fri Oct 30, 2009 4:24 am
by serina
Any feedback please..

Posted: Wed Nov 04, 2009 4:52 pm
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.

Posted: Thu Nov 05, 2009 11:17 pm
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

Posted: Mon Nov 09, 2009 5:26 pm
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.