Custom code - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

gjandris
Posts: 15
Joined: Tue Jan 12, 2010 8:51 pm

Custom code

Is there any documentation on writing custom code in vbscript with Advanced installer?
I am new to doing vbscript and am learning it from google as I go. I know there is a Session object
I use it, Session.Property, to set or get installer properties. I need to be able to run an exe from
within vbscript and AI. I can run it successfully using the wscript. The command is like this:
dim command
dim wshShell

command = """C:\Program Files (x86)\Telcordia\Granite Inventory\ClientUninstallerData\Uninstall Granite Inventory Clients.exe"""
WScript.Echo "Hi There!"
Set wshShell = WScript.CreateObject("WSCript.shell")
wshShell.Run ( command & " -i silent"), 1, true
Set wshShell = nothing

This will run the comman I want ok, but not from within AI, any help would be appreciated.
Thanks
:?:
gjandris
Posts: 15
Joined: Tue Jan 12, 2010 8:51 pm

Re: Custom code

Figured it out to get done what I want to do.
But if there are docs somewhere about it, it would be helpful.
:D
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom code

Hello,

You can use a "New attach a custom action" to run a VBScript after a standard action, but not create one.
You can also use "Script Inline" for a small vbscript.
Here are some samples of custom actions used with Advanced Installer.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”