Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | app.install SEARCH    

  Functions
app.autoRestart
app.booster
app.cancelClose
app.close
app.filename
app.getParam
app.icon
app.init
app.install
app.language
app.maintenance
app.minimize
app.name
app.openAtStartup
app.restart
app.restore
app.setup
app.title
app.uninstall
app.uninstall.create
app.uninstall.remove

  Events
event.initialize
event.load
event.terminate

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
app.install

Language: MioScript
Product: MioFactory


Syntax

app.install(appName, appId, targetFolder, addInProgram, autoStart, desktop, allUsers)


Parameters

STRINGappNameApplication Name. You should use the string {APP_NAME} as shown in the sample below.
STRINGappIdApplication ID. You should use the string {APP_ID} as shown in the sample below.
STRINGtargetFolderFolder where to install the application.
To install the application in Program Files: path.programFiles.
BOOLaddInProgramOptional.
Default is null.
If set to true, a shortcut is added in All Programs.
If set to false, the shortcut, if any, is removed from All Programs.
Set to null for no action.
BOOLautoStartOptional.
Default is null.
If set to true, the application will run when the computer starts.
If set to false, the shortcut, if any, is removed from All Programs.
Set to null for no action.
More info: {APP_OPENATSTARTUP}.
BOOLdesktopOptional.
Default is null.
If set to true, a shortcut is added on the desktop.
If set to false, the shortcut, if any, is removed from All Programs.
Set to null for no action.
BOOLallUsersOptional.
Default is false: the shortcuts are added for the current user.
If set to true, shortcuts are added to all users.


Return value

No value is returned.


Description

Installs the application on the local computer at the specified location.

In most of the cases, the application is installed by the installer, so the user is informed about the process and can change the default settings.
Use a silent install only if you deploy the application through your intranet.

Warning: This function should not be called directly except if you are sure the application have full admin rights.

In order to enable the install, the application must be published as an EXE file with no installer.
When the exe file is executed, the function installs the application and restarts it from the definitive location.

If the parameter addInProgram is set to true, a shortcut is added in the All Programs folder. The name of the sub-folder is the application name.

If the parameter autoStart is set to true, a shortcut is added in the Startup folder, so the application will run when the computer starts.

The call to this function should be done just after the call to app.init.

Important: The installation is not processed immedialty after the call of the function.




MioScript Sample Code

app.install("{APP_NAME}", "{APP_ID}", path.programFiles("{APP_NAME}"))