Scripting API.

Icons

Registry

File System

Recycle Bin



Icons


GetIconIndex(String file_path) This function returns icon index from given file or file_path.
String file_path - path to file. In file path you can use Environment strings to determine path of system folders such as Windows, Program Files and etc.

Usage:
Get icon index of the Windows folder:
icon = GetIconIndex("%windir%");

Get icon index of the Regedit application:
icon = GetIconIndex("%windir%\\regedit.exe");
GetIconIndexByExt(String extension) This function returns icon index for given extension.
String extension - file extension ("html", "ini").

Usage:
Get icon index of the .reg file:
icon = GetIconIndexByExt("reg");

Registry


RegKeyGetNumberOfValues(String registry_key) This function returns number of value for given registry_key.
String registry_key - registry key.

Usage:
count = RegKeyGetNumberOfValues("HKEY_CURRENT_USER\\Software\\Google\\NavClient\\1.1\\History");
RegKeyDeleteValues(String registry_key) This function delete all values of given registry key.
String registry_key - registry key.

Usage:
Delete all values of given registry key:
RegKeyDeleteValues("HKEY_CURRENT_USER\\Software\\Google\\NavClient\\1.1\\History");
RegDeleteKeys(String parent_key, String wildcard) This function delete all registry sub keys what matches wildcard.
String parent_key - registry key.
String wildcard - wildcard or wildcards divided by semicolon ("*.tmp;*.bak")

Usage:
Delete all keys which names starts with KB8 or KB9:
RegDeleteKeys("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall", "KB8*;KB9*");

File System


GetFolderSize(String folder_path, String wildcard, Bool look_in_subfolders) This function returns number and size of files is specified folder.
String folder_path - path to folder
String wildcard - wildcard or wildcards divided by semicolon ("*.tmp;*.bak")
Bool look_in_subfolders - true or false

Usage:
size, count = GetFolderSize("%windir%\\system32\\wbem\\Logs\\", "*.log;*.lo_", false);
GetFileSize(String file_path) This function returns size of file.
String file_path - path to file

Usage:
size = GetFileSize("%windir%\\Faultlog.txt");
DeleteFolderContent(String folder_path, String wildcard, Bool look_in_subfolders) This function delete the content of a specified folder (files and subfolders).
String folder_path - path to folder
String wildcard - wildcard or wildcards divided by semicolon ("*.tmp;*.bak")
Bool look_in_subfolders - true or false

Usage:
DeleteFolderContent("%windir%\\system32\\wbem\\Logs\\", "*.log;*.lo_", false);
DeleteFile(String file_path) This function deletes a file.
String file_path - path to file

Usage:
DeleteFile("%windir%\\Faultlog.txt");
WipeFolderContent(String folder_path, String wildcard, Bool look_in_subfolders, Integer number_of_passes) This function wipes out the content of a specified folder.
String folder_path - path to folder
String wildcard - wildcard or wildcards divided by semicolon ("*.tmp;*.bak")
Bool look_in_subfolders - true or false
Integer number_of_passes - number of passes, 3 by default.

Usage:
WipeFolderContent("%windir%\\system32\\wbem\\Logs\\", "*.log;*.lo_", false, 3);
WipeFile(String file_path, Integer number_of_passes) This function wipes a file.
String file_path - path to file
Integer number_of_passes - number of passes, 3 by default.

Usage:
WipeFile("%windir%\\Faultlog.txt", 3);

Recycle Bin


GetRecycleBinInfo(String drive_letter) This function returns number and size of items in Recycle Bin.
String drive_letter - drive letter (for example "C:\\") to get Recycle Bin info for specified drive. Or empty string to get Recycle Bin information for all local drives.

Usage:
size, count = GetRecycleBinInfo("");
EmptyRecycleBin(String drive_letter) This function delete content of Recycle Bin.
String drive_letter - drive letter (for example "C:\\"). You can pass empty string to this function to empty all Recycle Bins.

Usage:
icon = EmptyRecycleBin("");