Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | path.getSystemFolder SEARCH    

  Functions
path.app
path.cookies
path.desktop
path.favorites
path.getSystemFolder
path.history
path.install
path.log
path.other
path.personal
path.programFiles
path.programs
path.recent
path.rsc
path.startMenu
path.startup
path.system
path.temp
path.windows

  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
path.getSystemFolder

Language: MioScript
Product: MioFactory


Syntax

path.getSystemFolder(forAllUsers, key)


Parameters

ANYforAllUserstrue: the folder for all users is returned.
false: the folder for the current useris returned.
Product ID: If the product is installed for all users, the folder for all users is returned. Otherwise the folder for the current user is returned.
STRINGkeyKey name in the registry database.
Can be one of the following values:
AppData
Cache
CD Burning
Cookies
Desktop
Favorites
Fonts
History
Local AppData
Local Settings
My Music
My Pictures
My Video
Personal
Programs
Recent
SendTo
Startup
Start Menu
Templates


Return value

String



Description

Returns a system folder depending if the application was installed for all the users or not.

If a product ID is specified as first parameter (or {APP_ID}) and if the value of the key in the registry database installedForAllUsers is set to 1, the system folder for all users is returned.
Otherwise, the system folder for the current user is returned.
This key is set when the application is installed.

You can also set the first parameter to true to get the folder for all users and false to get the folder for the current user.

The function reads the key SoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders in CURRENT_USER or LOCAL_MACHINE in the registry database.

Note: This function is defined in the library klib.k and is linked automatically.




MioScript Sample Code

// Get the path to the Windows startup folder

&startupPath = path.getSystemFolder("{APP_ID}", "Startup")