|
|||
|
Hi...
I'm developing an application and I like to install it in the programs/start directory. Which are the commands in the installer details? or have I to use the "afterinstall" script?... Which is this script? Thanks for your help |
|
|||
|
Yes, enable the "Run afterInstall script" option, then insert a new script "AfterInstall" into your swfkit project and add the following code
Code:
// get the startup folder
var startup = Shell.getSpecialFolder("startup all");
// get the app path name
var appName = getExeName();
// create the shortcut in the startup folder
var shortcut = new Shortcut(startup + "\\My Demo" + ".lnk");
shortcut.targetPath = appName;
shortcut.save();
|
|
|||
|
I found great help on this "Startup" lnk added code, but somehow, when I try to uninstall the application, the lnk file can't be taken off from the startup menu.
Is there any extra code I need to add in order to uninstall the shortcut from the startup menu? |
|
|||
|
In the "BeforeUninst" script, you just need to remove the shortcut as follows:
Code:
// get the startup folder
var startup = Shell.getSpecialFolder("startup all");
// remove the shortcut
var f = new File(startup + "\\My Demo" + ".lnk");
f.remove();
|
|
|||
|
Thanks for the reply!!!
I have tried the code you provided, but still, I could only uninstall the program group, the shortcut in the startup couldn't be removed... After I uninstall the application, the lnk file in the startup seems not being affected. |
|
|||
|
I have emailed my project file to support@swfkit.com
Hopefully, you might be able to find out the problem of the code or setting. Thank you very much. ??? |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|