I am using Visual Studio 2005. I have just figured out how to create a Custom Action during installation, but I can not figure out how to get data from the installer. Following is the simple test code that I am trying to use to call the directory that the user defines during installation, but the Path string is not returning anything.
Public Overrides Sub Install(ByVal stateSaver As System.Collecti ons.IDictionary )
MyBase.Install( stateSaver)
Dim Path As String = MyBase.Context. Parameters("tar getdir")
Dim AppConfigFile As String = Path & "\Files\AppConf ig.txt"
MsgBox("The target filepath is: " & AppConfigFile)
End Sub
I have tried many other things, such as...
Me.Context.para meters("targetd ir")
stateSaver.item ("targetdir" )
etc.
And I entered /INSTALLDIR="[TARGETDIR]\" in the custom action data property.
Nothing is working.
Thanks.
Public Overrides Sub Install(ByVal stateSaver As System.Collecti ons.IDictionary )
MyBase.Install( stateSaver)
Dim Path As String = MyBase.Context. Parameters("tar getdir")
Dim AppConfigFile As String = Path & "\Files\AppConf ig.txt"
MsgBox("The target filepath is: " & AppConfigFile)
End Sub
I have tried many other things, such as...
Me.Context.para meters("targetd ir")
stateSaver.item ("targetdir" )
etc.
And I entered /INSTALLDIR="[TARGETDIR]\" in the custom action data property.
Nothing is working.
Thanks.
Comment