Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

New to MSI

1 reply to this topic

Ross Stanek

Ross Stanek
  • Members
  • 1 posts

Posted 04 May 2005 - 17:11

I am relatively new to this and am just installing a Help Package created in Visual Studio and registered in VS using the Visual Studio Help Integration Kit. The MSI is actully created in VS. After Installation I need to copy a file from the TARGETPATH to another directory which I got to work with a VBScript that has everything hardcoded. If the user decided to not use the default path for installation my script won't work. How do I get the Default Path for installation passed into my VBscript so it then can set my path correctly. Below is the VB Script that I am using in my custom action with the path hardcoded.

Dim destPath, srcPath, fileName, fso

srcPath = "C:\Program Files\Empower\Empower\Help\" <<< Needs to be Passed In Somehow
destPath = "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\HTML\XMLLinks\1033\"
fileName = "Empower.xml"

set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile srcPath & fileName, destPath & fileName
set fso = nothing

Please note that this is all being done in Visual Studio.

Thanks for any help,

Ross Stanek


  • Members
  • 121 posts

Posted 13 May 2005 - 14:21

srcPath = Session.Property("TARGETPATH")

Although the session object may not be available in deferred mode (most likely where your CA will execute). In this case you must do the following:

1) In the immediate sequence (where session is available), create a property having exactly the same name as your deferred execution CA and set the value to the value of the "TARGETPATH" property.

2) Use the following syntax in your deferred execution CA:

srcPath = Session.Property("CustomActionData")

See the following link for more information: