Hello

 I have defined a property and elevated custom action as follows:

<Property Id="DeleteConsoleFolder">
      <![CDATA[
                option explicit
                Sub Main()
                
                Dim fso,InstallPath,res,installer
                Set installer = CreateObject("WindowsInstaller.Installer")
                Set fso = CreateObject("Scripting.FileSystemObject")
                  InstallPath = Property("INSTALLDIR")
                  res = InstallPath & "Console"
                  msgbox res
               If (fso.FolderExists(res)) Then
                fso.DeleteFolder(res)
                msgbox "Folder found! Deleted!"
                Else
                msgbox "Folder not found!"
                End If 
                
               End Sub          ]]>
    </Property>

    <CustomAction Id="DeletePCCConsoleFolder.Property"
Property="DeletePCCConsoleFolder" Value="DeleteConsoleFolder"/>
    <CustomAction Id="DeletePCCConsoleFolder" VBScriptCall="Main"
Property="CustomActionData" Execute="deferred" Impersonate="no" 
Return="check"/>

And this is sequenced as :

      <Custom Action="DeletePCCConsoleFolder.Property"
Before="DeletePCCConsoleFolder">NOT Installed</Custom>
      <Custom Action="DeletePCCConsoleFolder" Before="InstallFiles" >NOT
Installed</Custom>

However i get the following error when i run the MSI

MSI (s) (70:54) [15:35:58:181]: Executing op:
ActionStart(Name=DeletePCCConsoleFolder,,)
Action 15:35:58: DeletePCCConsoleFolder. 
MSI (s) (70:54) [15:35:58:181]: Executing op:
CustomActionSchedule(Action=DeletePCCConsoleFolder,ActionType=3126,,Target=Main,CustomActionData=DeleteConsoleFolder)
MSI (s) (70:54) [15:35:58:181]: Creating MSIHANDLE (5) of type 790536 for
thread 2644
MSI (s) (70:E8) [15:35:58:181]: Creating MSIHANDLE (6) of type 0 for thread
1000
MSI (s) (70:AC) [15:35:58:181]: Generating random cookie.
MSI (s) (70:AC) [15:35:58:196]: Created Custom Action Server with PID 2628
(0xA44).
MSI (s) (70:B0) [15:35:58:227]: Running as a service.
MSI (s) (70:B0) [15:35:58:227]: Hello, I'm your 32bit Elevated custom action
server.
Error 1720. There is a problem with this Windows Installer package. A script
required for this install to complete could not be run. Contact your support
personnel or package vendor. Custom action  script error , :  Line , Column
,  
MSI (s) (70:E8) [15:35:59:321]: Product: PowerChute Central 1.0 Console --
Error 1720. There is a problem with this Windows Installer package. A script
required for this install to complete could not be run. Contact your support
personnel or package vendor. Custom action  script error , :  Line , Column
,  

MSI (s) (70:E8) [15:35:59:322]: Closing MSIHANDLE (6) of type 0 for thread
1000
MSI (s) (70:E8) [15:35:59:322]: Closing MSIHANDLE (5) of type 790536 for
thread 2644
Action ended 15:35:59: InstallFinalize. Return value 3.

As far as I know, the steps I have followed to pass the property value to
the deferred CA are right.Why is my script still fails then?
Any help?

-----
Andy
MSI Developer
Schneider Electric:working:
-- 
View this message in context: 
http://n2.nabble.com/Problem-passing-property-value-to-a-deferred-VB-Script-custom-action-tp1638102p1638102.html
Sent from the wix-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to