Problem in deferred CA - Advanced Installer Community
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Problem in deferred CA

Hi,

I am using a deferred CA (no impersonation) because of UAC problems on Vista and above. It is written in VBScript.

I have the following string: -
strFilePath = "RegAsm.exe BTS.Gen.Config.dll /tlb:BTS.Gen.Config.tlb > " & Chr(34)& "C:\" & "regasmconfig.log" & Chr(34)

I am getting the APPDIR as part of the CustomActionData property. Ideally C:\ above will be set to this in the above string. The type library is loaded but output file (regasmconfig.log) is not generated. This is achieved using Run(strAPPDIR, strFilePath): -

'************************************************************
' Subroutine: Run
'
' Description: Run an executable file from a named directory.
'
' Parameters: strFilePath File to run.
' strWorkingDirectory Directory to run command in.
'
' Notes:
'************************************************************
Sub Run(strFile, strWorkingDirectory)
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.CurrentDirectory = strWorkingDirectory
' Now run the command 0 = Hide the window and activate another window
' False = immediately returns to script execution rather than waiting
' on the process termination (and returns an error code of 0).
' We need to wait for it to execute because we are actually deleting the
' executable as the next operation so set parameter to True.
' See http://ss64.com/vb/run.html
shell.Run strFile, 0, true
Set shell = Nothing
End Sub
8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<8-<

Is there a known bug/problem that would cause the log not to be produced?

Regards,
John
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem in deferred CA

Hi John,

I'm not sure what is the problem, maybe the custom action is not correctly configured. You can find an example of how to use the "CustomActionData" property in the How do I write text to a file article. Also, you can debug your custom action by inserting message boxes at different steps.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Problem in deferred CA

Thanks I will keep trying.

John
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem in deferred CA

You're welcome. Do not hesitate to ask us any question.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Problem in deferred CA

By using >> instead of > the log is produced.

John
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem in deferred CA

Hi John,

Thank you for sharing the solution to your problem, I'm sure it will help other users in the future.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”