mokhans
Posts: 9
Joined: Fri Sep 23, 2005 8:21 am

Custom Action not behaving properly

Hi,
I've added a VB Script as a custom action for "Install" phase only.But,When i Remove my application this script is executed again.Kindly,Help me out with it.I only want my script to be executed when we "Install" application.Thanks.
Regards,
Owais
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi Owais,

The problem probably resides with the execution condition for the custom action.

In order to fix this error please change the condition to "NOT Installed" (without the quotes).

Please let me know if you need further help.

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
mokhans
Posts: 9
Joined: Fri Sep 23, 2005 8:21 am

Thanks and few more questions

Hi,
Thanks a lot for your reply.It solved the problem.But,I've few more questions.I'll be very thankful for your reply.

1) Is it possible to install DirectX runtime by using a VBScript from custom actions.How can i get the version installed of directX through VBS? or If i install DirectX runtime as a pre-requisite.Will our installer continue after the restart?As,DirectX runtime restarts PC after installing,Giving no other option.

2) I've executed Graphics Driver Installation by using a VBScript as a custom action.When Graphics Driver Installation ends,It asks for a restart if i say yes then it returns to our orignal installer and finish it showing me OK Button.I was expecting machine to restart.But it didn't.Can you help me out in it?

I'll be very thankful for you help.Thanks.
Regards,
Owais.
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

1. My suggestion would be to install DirectX runtime as a prerequisite. If the computer reboots after the installation of the prerequisite, when the PC restarts the installation will continue with the rest of the package.

2. Could you please give us more details? What driver are you installing ? How is it packed?

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
mokhans
Posts: 9
Joined: Fri Sep 23, 2005 8:21 am

1) I've tried installing DirectX Runtime with this package "directx_9c_Jun05sdk_redist.exe" available at Microsoft's site.Now,Problem is that this redistributable of DirectX only Extract files and asks you a folder where they should be written.It doesn't launch the "DXSetup.Exe" which it has extracted.Kinldy,Help me out with this as to how i can do proper DirectX Runtime Installation as a pre-requisite.

2)I'm installing following driver from Intel for Intel® 82865G Graphics Controller.

http://downloadfinder.intel.com/scripts ... l&lang=eng

And here's the .VBS Code i'm executing as a custom action.Driver's EXE is placed with .MSI not packed within it.

Function DriverCheck()
set wmi = getobject("winmgmts:")

wql = "select DriverVersion from win32_videocontroller"

set results = wmi.execquery(wql)

for each obj in results
s = s & obj.DriverVersion
next

result = StrComp("6.14.10.4384",s)
if result = 1 then
ret = msgbox ("You have older version of VGA driver.Do you want to update it?",vbYesNo+vbQuestion+vbApplicationModal,"OperationNOVA")
if ret = vbYes then
set WshShell = CreateObject("WScript.Shell")
s = Session.Property("SourceDir")
s = Chr(34)& s & "win2k_xp1416.exe" & Chr(34)
WshShell.Run s,1,true
end if
else
msgbox "Congratulations you have correct version of VGA driver",,"OperationNOVA"
end if

DriverCheck=0
End Function[/code]
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

1. I'm afraid that Advanced Installer cannot launch "DXSetup.exe" after the files had been extracted.

The only thing to do is to extract the files from the archive and then repack them. The repackaging should be done with a tool that allows you to launch a file after the files had been extracted. By my knowledge there is such a tool.

Use this newly created archive in Advanced Installer.

2. Unfortunately we couldn't figure out what goes wrong.

If you execute the script outside Advanced Installer is the machine rebooted?

All the best,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
mokhans
Posts: 9
Joined: Fri Sep 23, 2005 8:21 am

1) Can you tell me such a software which can repackage files and run the exe in it,When we unpack it?It'll help me in launching DirectX Setup through,Advance Installer pre-requisite section.

2) Script doesn't not restart machine.It just launches the VGA Driver setup.When the setup is finishing,It asks to restart.Which doesn't happen even if i want to restart.

Finally,What i've learnt from experimenting,Whatever i lauch through .VBS and if it needs to restart PC,Advance Installer will supress it's restart.
Like If you install DirectX runtime.It has to restart machine with no other option.But,If you invoke the DirectX installation through a VB Script.
Advance Installer supresses it and doesn't restart.

Hoping to hear from you,Thanks for rendering me help and suggestions.
Regards,
Owais.
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi Owais,

1. To download such a tool please go to this URL location:
http://www.ioncube.com/bundler/index.ph ... 7a2e195cd7

2. Try setting the custom action to be executed as "Asynchronous execution, do not wait for return".

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”