Hi..
I was going through the Write-To-File custom action. These are the steps i did:
0. Dialogs : First Time INstal : WelcomeDlg -> Add Dialog -> Project -> NewSeqDialog :
Added an Edit Box
In Properties :
Property -> Property Name :
MY_WS_PROP
Property -> Default Value : C:\SmartE\workspace\
1. Files & Folders : Application Folder : Add File = i added a new file : "
cvs.txt"
2. Custom Actions : InstallExecuteSequence -> Install : Property set with Formatted :
Property :
MY_WS_FILE
Formatted : [APPDIR]cvs.txt
Execute Sequence Condition -> Condition : NOT Installed [Install checkbox checked]
3. I created a txt file, pasted the below vb-script; and renamed it to "
WriteToFile.vbs"
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Dim tokens
Dim file
file=Session.Property("CustomActionData")
tokens=Split(file,"|")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(tokens(0), ForWriting, True)
f.Write tokens(1)
f.Close
4. Custom Actions : InstallExecuteSequence -> Install : New Attached Custom Action
I selected the vbs file i created from desktop
•Source Path: C:\Users\254013\Desktop\
WriteToFile.vbs
•Source Type: Visual Basic Script (*.vbs)
•Function Name:
•Action Data:
[MY_WS_FILE]|[MY_WS_PROP]
•Execution Properties: Synchronous execution, check return code
•Execution Options: Deferred with no impersonation
•Execute Sequence Condition -> Condition : NOT Installed [Install checkbox checked]
5. Build
On running the EXE/MSI, i get the below error:

- MissingScript.png (67.9 KiB) Viewed 12407 times