Page 1 of 1

Creating a package from VBS

Published: November 20, 2018 - 10:53 AM
by Xav
Hello everyone.
My first question is: Is it possible to create packages using a VBScript?
If so, I'm having trouble because I'm getting an error message.

My command line is:
C:\>wapt-get make-template C:\waptdev\xxxx-xxxxx-FusionInventoryAgent\fusioninventory-agent-deployment-xx.vbs xx-FusionInventoryAgent.

The x's represent regular characters, not special characters, just lowercase and uppercase letters and numbers.

The error message is:
FATAL ERROR: TypeError: not enough arguments for format string.

Do you have any ideas?

Thanks in advance.

Re: Creating packages from VBS

Published: November 20, 2018 - 11:04 AM
by htouvet
You need to create an empty template
then copy the VBScript into the package development directory
then modify the installation procedure in setup.py to call the VBScript

Code: Select all

wapt-get make-template xx-fusioninventoryagent
Copy the VBScript to c:\waptdev\xx-fusioninventoryagent-wapt

Code: Select all

from setuphelpers import *

def install():
    with disable_file_system_redirection():
        run('WScript.exe "fusioninventory-agent-deployment-xx.vbs"')
then build and sign the package

Code: Select all

wapt-get -i build-upload c:\waptdev\xx-fusioninventoryagent-wapt

Re: Creating packages from VBS

Published: November 20, 2018 - 11:46 AM
by Xav
Thank you for the quick reply.
I'll test it