Custom action script error (1720) - 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!

nitin9
Posts: 6
Joined: Thu Oct 26, 2006 7:22 am

Custom action script error (1720)

Hi,

What is the cause for the following , even though the scripts run fine and execute correctly to give the results. I saw that in the log 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 script error , : Line , Column ,

Best Regards,
Nitin
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I think you choose to ignore the return code of the custom action, that's why the installation continue even if the script fails.

Also you can try to execute the script from Windows Explorer to see if it's executed ok. However if the problem persist please post here the .vbs file that gives this error so I can take a look.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
AlexCrane
Posts: 4
Joined: Tue Dec 12, 2006 12:45 pm

Ok, I seem to have this problem as well.

Ive attached the script as a "new attached custom action" and have the following settings:

Function Name: <blank> (possibly the problem??)
Asych execution, wait for return code at the end of the sequence
Immediate Execution


The code is (where as_crew is an existing user):

set WshShell = WScript.CreateObject("WScript.Shell")
set filesys = Wscript.CreateObject("Scripting.FileSystemObject")
target = "C:\Documents and Settings\as_crew\Custom"

IF NOT filesys.FolderExists(target) THEN
filesys.CreateFolder(target)
filesys.CreateFolder(target & "\Desktop")
filesys.CreateFolder(target & "\Programs")
filesys.CreateFolder(target & "\bin")
END IF

set oShortCutLink = WshShell.CreateShortcut(target & "\Desktop\Formalise.lnk")
oShortCutLink.TargetPath = "C:\FormaliseXP\Formalise.exe"
oShortCutLink.WorkingDirectory = "C:\FormaliseXP"
oShortCutLink.WindowStyle = 1
oShortCutLink.Description = "Shortcut to Formalise"
oShortCutLink.Save

set oShortCutLink2 = WshShell.CreateShortcut(target & "\Programs\Formalise.lnk")
oShortCutLink2.TargetPath = "C:\FormaliseXP\Formalise.exe"
oShortCutLink2.WorkingDirectory = "C:\FormaliseXP"
oShortCutLink2.WindowStyle = 1
oShortCutLink2.Description = "Shortcut to Formalise"
oShortCutLink2.Save

set oShortCutLink3 = WshShell.CreateShortcut(target & "\Desktop\JRCALC.lnk")
oShortCutLink3.TargetPath = "C:\FormaliseXP\HelpFiles\JRCALC\arqFRAMESETwrapper.HTM"
oShortCutLink3.WorkingDirectory = "C:\FormaliseXP\HelpFiles\JRCALC"
oShortCutLink3.WindowStyle = 1
oShortCutLink3.Description = "Shortcut to JRCALC"
oShortCutLink3.Save

Im certainly no pro at VBS, but this code works when I open it in Windows Explorer. But when i try attaching it to the installer I get the same error message as above
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The problem is the first two lines:

Code: Select all

set WshShell = CreateObject("WScript.Shell")
set filesys = CreateObject("Scripting.FileSystemObject")
But what this script does (same folder structure and shortcuts) can be done very easy in the "Files and Folders" page of AI. Shortcuts, "Property Based" or "Regular" folders can be created.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
AlexCrane
Posts: 4
Joined: Tue Dec 12, 2006 12:45 pm

as_crew isnt the user that will be installing the package, so I cant simply put it all in "My Documents" in Files/Folders. Is there a way to be able to put it in as_crew's documents? Had a quick look at property based stuff but didnt really understand it.
AlexCrane
Posts: 4
Joined: Tue Dec 12, 2006 12:45 pm

ah, possibly ignore this. Just noticed the Search tab, I assume if I successfully find the folder it becomes a property I can use?
AlexCrane
Posts: 4
Joined: Tue Dec 12, 2006 12:45 pm

The previous bit was solved fine, but now I have exactly the same script problem having added this little snippet of vbscript:

strComputer = "MYCOMPUTER"
Set objUser = GetObject("WinNT://" & strComputer & "/as_crew,User")
objUser.SetPassword "ThePassword"
objUser.SetInfo

Again, this works from Windows Explorer, but not in the installer. Any workaround??
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I test this script on my computer and works fine. Please run the installer on other computer to see if you get the same behavior.

Best Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”