Online Help
This is a collection of actions built into a small plugin (275 kB for the x86 version and 333 kB for the 64-bit version), adding several useful functions to the toolbox of Setup Factory or AutoPlay Media Studio.
This action is similar to the built-in Dialog.FolderBrows(), but the implementation is different. The RootFolder will define the parent of the folder which can be created and/or selected.
(number) The value retrieved with Application.GetWndHandle(). This parameter is required.
(string) The message text on the dialog.
(string)The parent folder to browse from.
(string)The name of the folder which was selected, or the string "CANCEL" if the dialog was dismissed. You can use Application.GetLastError to determine whether this action failed, and why.
// this will use the "My Documents" folder as the top level
local sFolder = Utilities.AltFolderBrowse(Application.GetWndHandle(), "Select target folder", Shell.GetFolder(SHF_MYDOCUMENTS));
if (sFolder ~= "CANCEL") then
Dialog.Message("Result", "You selected:\r\n" .. sFolder, MB_OK, MB_ICONINFORMATION);
end
This script could return a result similar to this:

// this will use the Program Files folder as the top level
local sFolder = Utilities.AltFolderBrowse(Application.GetWndHandle(), "Select target folder", SessionVar.Expand("%ProgramFilesFolder%"));
if (sFolder ~= "CANCEL") then
Dialog.Message("Result", "You selected:\r\n" .. sFolder, MB_OK, MB_ICONINFORMATION);
end
This script could return a result similar to this:

// this will use the "This PC" folder as the top level
local sFolder = Utilities.AltFolderBrowse(Application.GetWndHandle(), "Select target folder", "");
if (sFolder ~= "CANCEL") then
Dialog.Message("Result", "You selected:\r\n" .. sFolder, MB_OK, MB_ICONINFORMATION);
end
This script could return a result similar to this:

This action is similar to the built-in Dialog.FolderBrowse(), however it allows to select multiple folders instead of just a single one.
(string) The message text on the dialog.
(string)The default folder to browse.
(table) A table with the paths to the folders that were selected with the folder browse dialog. If the user cancels the operation (presses the cancel button), the string "CANCEL" will be returned in the first position of the table. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.
local tFolders = Utilities.FolderBrowse("Select Folder(s)", Shell.GetFolder(SHF_MYDOCUMENTS));
if (tFolders[1] ~= "CANCEL") then
local sMsg = "";
for i=1, Table.Count(tFolders) do
sMsg = sMsg .. tFolders[i] .. "\r\n";
end
Dialog.Message("Result", "You selected:\r\n" .. sMsg, MB_OK, MB_ICONINFORMATION);
end
Returns the model and the serial number of the first hard drive (Disk 0) installed on the computer.
(table) The hard drive model will return as the index "Model", and the serial number as the index "Serialnumber".
local tHardDriveInfo = Utilities.GetHDInfo();
Dialog.Message("Hard drive", "Model: " .. tHardDriveInfo.Model .. "\r\nSerial number: " ..
tHardDriveInfo.Serialnumber, MB_OK, MB_ICONINFORMATION);
This script could return a result similar to this:

Retrieves the target and the arguments for a shortcut file (*.lnk) on the user's system.
(string) The full path to the shortcut file.
(table) The target of the shortcut will return as the index "Target", and the arguments as the index "Arguments". You can use Application.GetLastError to determine whether this action failed, and why.
-- Shortcut for IE set up for InPrivate browsing
local sDesktop = Shell.GetFolder(SHF_DESKTOP);
local tShortcut = Utilities.GetLnkTarget(sDesktop .. "\\Internet Explorer.lnk");
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Shortcut", "Target: " .. tShortcut.Target .. "\r\nArguments: " .. tShortcut.Arguments,
MB_OK, MB_ICONINFORMATION);
end
This script could return a result similar to this:

This action allows the creation of a MessageBox with a Checkbox on it. Typically this is used to show a message to the user, with the option to hide further dialogs.
(string) The text that will appear in the dialog title bar..
(string) The text that will appear on the dialog.
(string) The caption of the checkbox that will appear on the dialog.
(number) The type of the MessageBox to be displayed. Allowed values are MB_OK, MB_OKCANCEL, MB_ABORTRETRYIGNORE, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL
(number) The icon to display on the dialog. Allowed values are MB_ICONNONE, MB_ICONSTOP, MB_ICONQUESTION, MB_ICONEXCLAMATION, MB_ICONINFORMATION
(number) The button that will get the focus by default. Possible values are MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3
(boolean) Whether the checkbox should be checked by default when the dialog is displayed or not.
(number) The numeric constant for the button that was pressed:
| CONSTANT | VALUE | DESCRIPTION |
|---|---|---|
| IDOK | 1 | The OK button. |
| IDCANCEL | 2 | The Cancel button. |
| IDABORT | 3 | The Abort button. |
| IDRETRY | 4 | The Retry button. |
| IDIGNORE | 5 | The Ignore button. |
| IDYES | 6 | The Yes button. |
| IDNO | 7 | The No button. |
If the checkbox was marked, then 16 will be added to the constant. For example, IDOK + checkbox = 17.
-- display a message with a checkbox
nRes = Utilities.MessageBoxEx("Messagebox with an option", "This program is working perfectly.",
"Do not show this again", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1, false);
if (nRes > 16) then
-- the checkbox was selected, process the input as required
end
This script could return a result similar to this:

Hides the application window and creates an icon in the system tray instead. This can be used to temporarily remove the application from the taskbar, while it is processing something. Use Utilities.RemoveFromTray() to move back to taskbar, as in the example below.
The handle to the main application window to be minimized.
(nothing)
-- get handle on the current window local hWnd = Application.GetWndHandle(); -- minimize application to taskbar Window.Minimize(hWnd); -- remove the icon from the taskbar, moving to tray Utilities.MinimizeToTray(hWnd); -- some delay for dramatic effect Application.Sleep(5000); -- restore application window on the desktop Window.Restore(hWnd); -- move the window to front Window.SetOrder(hWnd, HWND_TOPMOST); -- remove the icon from tray back to the taskbar Utilities.RemoveFromTray();
Removes the icon from tray and shows the application window again.
(nothing)
Dispatches pending WM messages, preventing user interface from becoming unresponsive.
(nothing)
for i = 1, nLongNumber do
-- some really long operation here which could take a few seconds to complete
-- place a call to the plugin to refresh the window messages queue and preventing "not responding"
Utilities.RefreshWindow();
end
Retrieves information about a digitally signed file. This can be used to verify if a certain file is signed, with the same certificate as expected (with the original publisher's serial name and serial number).
(string) The full path to the signed file.
(table) A table containing information about the certificate, or nil if there was an error or the file is not signed.
| INDEX | DESCRIPTION |
|---|---|
| PublisherCertSubject | The name of the holder of the certificate (developer or company). |
| PublisherCertIssuer | The Certification Authority who issued the certificate. |
| CounterSignerCertSubject | The Certification Authority who counter-signed (timestamped) the signature. |
| CounterSignerCertIssuer | The Certification Authority who issued the the certificate of the timestamper. |
| CounterSignerTimestamp | When the signature was countersigned (timestamped). |
| PublisherCertSerial | The serial number of the certificate of the software publisher. |
local tFile = Dialog.FileBrowse(true, "Select a file", Shell.GetFolder(SHF_PROGRAMFILES), "All Files (*.*)|*.*|", "", "", false, true);
if (tFile[1] ~= "CANCEL") then
Input.SetText("inpFilename", tFile[1]);
local tCert = Utilities.RetrieveCertificate(tFile[1]);
error = Application.GetLastError();
if (tCert ~= nil) then
Label.SetText("lblPublisherCertSubject", tCert.PublisherCertSubject);
Label.SetText("lblPublisherCertIssuer", tCert.PublisherCertIssuer);
if (tCert.CounterSignerCertSubject ~= nil) then
Label.SetText("lblCounterSignerCertSubject", tCert.CounterSignerCertSubject);
Label.SetText("lblCounterSignerCertIssuer", tCert.CounterSignerCertIssuer);
if (tCert.CounterSignerTimestamp ~= nil) then
Label.SetText("lblCounterSignerTimestamp", tCert.CounterSignerTimestamp);
end
end
Label.SetText("lblPublisherCertSerial", "[".. tCert.PublisherCertSerial .. "]");
else
Dialog.Message("Error", "No valid certificate found.\r\n" .. _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end
12185 - Failed to start Utilities Actions plugin.
Ulrich Peters
upeters@mindquake.com.br
Plugin is copyright © 2015-2025 Ulrich Peters
Copyright © 2015-2025 Ulrich Peters
Todos os direitos reservados.