Exchange
// File: Thunderbird.js (Optimized Version) // Executes Thunderbird from a USB drive using the local USB profile path.
var Shell = WScript.CreateObject("WScript.Shell");
// Returns the drive letter or directory where this script is executed var USB = Shell.CurrentDirectory;
// Ensure the path ends with a backslash if it doesn't have one if (USB.charAt(USB.length - 1) !== "\\") {
USB += "\\";
}
var ThunderbirdVersion = "07";
// Construct absolute paths to the executable and the profile var PathToExe = '"' + USB + "Thunderbird\\" + ThunderbirdVersion + "\\Programme\\thunderbird.exe" + '"'; var ProfilePath = '"' + USB + "Thunderbird\\" + ThunderbirdVersion + "\\Profile" + '"';
// Combine the executable path with the portable profile switch var Command = PathToExe + " -profile " + ProfilePath;
// Run the application (0 hidden window state, false to not wait for execution to finish) Shell.Run(Command, 1, false); Shell.RunThunderbird.js
All Replies (1)
Chosen Solution
Jason,
I don't see a question here.