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.
Photo

VB Script Custom Action Failing


1 reply to this topic

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 04 December 2003 - 22:57

I have a VB Script Custom Action that is failing and I have no idea why. Here is a snippet of the code at it's failure point:

Set objTS = objFSO.CreateTextFile("C:\Registration.txt", True)

objTS.WriteLine (Session.Property("INSTDIR"))
objTS.WriteLine (sRegCode)
objTS.WriteLine (Session.Property("VT_EDITION"))
objTS.WriteLine (Session.Property("VT_EDITION_TYPE"))
objTS.Close

Set objTS = Nothing
Set objFSO = Nothing.

It is failing at Set objTS = objFSO.CreateTextFile("C:\Registration.txt", True)

I used message boxes to trap it there.

Here is a segment of the verbose log I created:

Action start 15:29:52: RegCode.
Action ended 15:30:14: RegCode. Return value 3.
DEBUG: Error 2896: Executing action RegCode failed.
Internal Error 2896. RegCode
MSI © (FC:04): Invoke wait timed out
Action ended 15:30:14: InstallWelcome. Return value 3.
MSI © (FC:04): Doing action: SetupCompleteError
Action start 15:30:14: SetupCompleteError.
Action 15:30:14: SetupCompleteError. Dialog created
Action start 15:30:16: CleanUp.
Action ended 15:30:16: CleanUp. Return value 1.
Action ended 15:30:16: SetupCompleteError. Return value 2.
Action ended 15:30:16: INSTALL. Return value 3.


This action works on almost every system. If it does fail, we usually get some type of visible error message. This is occurring on an XP system, but we are getting no visible clue as to what is going on!

Does anyone have any ideas on this?

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 04 December 2003 - 23:35

Just the first thing that came to mind: could it be that windows scripting host is disabled? Could it be that the location where you try to write the file is "locked down" using NTFS rights? Maybe it fails if you use an environment variable to get the path to write to and there are special characters or spaces in the path name?
Regards
-Stein Åsmul