/build/static/layout/Breadcrumb_cap_w.png

Session object test failing

As regulars here may know, my scripts generally have a test for the Session object to dtermine if they're running in a Custom Action or not. That allows me to have one script which I can test outside of an MSI and punch straight into a Custom Action once I'm happy that it works.

Well, I have an incredibly simple MSI (8 files, 1 reg entry) with a copy of my generic SetACL script. Damn thing keeps insisting it's not running in a CA. The code goes:

[font="courier new"]Dim [font="courier new"]blnIsCustomAction
[font="courier new"]blnIsCustomAction = False

On Error Resume Next
If IsObject(Session) Then
'// We may have arrived here because error-trapping is off
If Err.Number = 0 Then
blnIsCustomAction = True
End If
End If
On Error Goto 0

I've moved the CA all over the place but it refuses to return True for the Session object. Any clues?

0 Comments   [ + ] Show comments

Answers (1)

Posted by: anonymous_9363 16 years ago
Red Belt
0
Stand easy...this particular script was using ExecuteGlobal as a kludge to get behaviour like ASP's INCLUDE. In the INCLUDEd file was a 'Dim Session' statement. Ah, th eperils of shared files....if I find who was responsible for that, I won't be answerable for my actions.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ