Hi Scott,
We have sent an improved version of viewer.exe that does not have any limitations. However the viewer.exe is using the
ShellExecuteEx API (which is needed to launch mailto URLs) which has a limit of 2048 characters for the command line length as stated on this
MSDN Blog.
To overcome this limitation, you can follow these steps:
- on the Search page, create a new search with the name MAIL_CLIENT
- add a new Location for the search
- set the parameters for the Location to the following:
Code: Select all
Root: HKEY_CLASSES_ROOT
Key: mailto\shell\open\command
Name: [~]
Type: Retrieve the raw value
Note: the above search will effectively set the MAIL_CLIENT property to the path of the machine's default email client. Its value will look something like:
Code: Select all
"C:\Program Files\Mozilla Thunderbird\thunderbird.exe" -osint -compose "%1"
- on the Custom Actions page, add a script that will compose the message (the script that you posted above will work just fine). The script will also need to replace the "%1" part in MAIL_CLIENT with your message, and store the result in a new property, say MAILTO_COMMAND. This property should end up being set to something like:
Code: Select all
"C:\Program Files\Mozilla Thunderbird\thunderbird.exe" -osint -compose "mailto:support@TaskMap.com?Subject=TaskMap%20Locking%20Code&Body=Test%20message"
- schedule an "EXE with Working Dir" custom action after the previous VBScript custom action. Set the Full Path field to: [MAILTO_COMMAND]
Note: make sure you properly condition the two custom actions to only be executed if there is an email client present on the machine. The following condition:
Code: Select all
(Not Installed) AND (MAIL_CLIENT <> "")
should work just fine.
Attached is a sample project that implements this.
Regards,
Gabriel