I am trying to run a vbs script from a Custom Action but I cannot get the install directory. In the code below, Session.Property("APPDIR") returns an empty string.
dllFileName = Session.Property("APPDIR")
msgbox dllFileName
set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.GetFolder("C:\Windows\Microsoft.NET\Framework")
Set sf = f.SubFolders
For Each fl in sf
If fso.FileExists(fl.Path & "\regasm.exe") Then
regasmPath = fl.Path & "\regasm.exe"
End If
Next
set wshShell = CreateObject("wscript.shell")
dllFileName = dllFileName & "CopyProps.dll"
commandName = Chr(34) & regasmPath & chr(34) & " " & chr(34) & dllFileName & Chr(34) & " /codebase"
wshShell.Run commandName
What am I doing wrong? This forum has been helpful in getting me this far.