Hi,
I had a msi which has a VB script in a custom action. This script should be executed is a part of custom action. But I get the below error in the log:

=================================
Action start 10:45:04: add_to_ini_file.
Info 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 add_to_ini_file script error -2146827788, : Line 23, Column 1,
Action ended 10:45:04: add_to_ini_file. Return value 1.
=================================

Please help....

Thanks in advance...Praveen
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
1720 means beat your head against the wall repeatedly.

Wise published an article to assist with resolving the issue but ultimately I think VBScript is kinda pointless with MSIs until VBScript is properly supported.


http://www.wise.com/KBArticle.aspx?articleno=1418&keywords=1720
Answered 08/25/2004 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
0
Hi there,

I would recomend to test your VBScript before inserting it into the CustomAction.
Just create the text file with *.vbs extension and put all your VBScript code there.
it will simulate the Custom Action.
In most cases it works

Best wishes,
Answered 08/27/2004 by: wildcat966us
Senior Yellow Belt

Please log in to comment
0
Just a remember :

In custom action this : wscript.createobject isn't accepted but only CreateObject is well accepted.

Also the same for all the wscript.XXXX (For example wscript.quit; wscript.sleep ...)

Good Luck
Answered 08/27/2004 by: gvlaarho
Senior Yellow Belt

Please log in to comment
0
Hey, thanks Gvlaarho! Maybe that will ease some of my pain. I've found VBScript painful to use with MSIs because of the good ol 1720 error. Hopefully it's just the way I code that is causing some of the grief.
Answered 08/27/2004 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
0
KKaminsk, your about as confident about your programming capabilities as I am.
Answered 08/27/2004 by: cdupuis
Third Degree Green Belt

Please log in to comment
1
Gday Guys and Gals

Testing your vbs before putting it in the msi will not ensure it will work, due to what gvlaarho mentioned, that wscript functions are not supported. However, in most cases (i.e. if you are doing wscript.createobject) you can just drop the wscript. If you are doing wscript.quit or wscript.sleep etc though you'll have to find another way as it can't be done - in the installshield forum there are some rather lengthy posts on how to work around these issues if you really need to. Its a bit annoying that you have to modify your scripts for msis though.

For example, here is a way to do a sleep as a sub that I copied and pasted from some helpful soul:

Sleep(5)

Sub Sleep(ByVal iSleepPeriod)
' Note: Timer returns the number of seconds that have elapsed since midnight.

Dim iStartTime, iEndTime, iCurrentTime
On Error Resume Next

iStartTime = Timer
iEndTime = iStartTime + iSleepPeriod

Do While Timer <= iEndTime
Loop
End Sub

God bless google :)

Hope this helps

Rgds

Paul
Answered 08/29/2004 by: plangton
Second Degree Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity