Link to home
Start Free TrialLog in
Avatar of k3eper
k3eper

asked on

Vbscript to execute kix script

Is it possible to execute a kix script using vbscript. Im asking because we currently use a lot of kix scripts. Id like to be able to write a vbscript to execute various kix scripts. If it is possible how would it be done?
Avatar of MikeKane
MikeKane
Flag of United States of America image

For a kix script, you need to have the following available:
kix32.exe

If you are running this from 95 or 98, you will also need:
kx95.dll
kx16.dll
kx32.dll


Once those are available, you can execute a kix script from vbs by calling the executable like this:
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")

' open maximized and wait
WSHShell.Run "kix32 script.kix", 3, true
' open minimized and wait
WSHShell.Run "kix32 script.kix", 2, true
' open normal and don't wait
WSHShell.Run "kix32 script.kix", 1, false

Set WSHShell = Nothing
WScript.Quit(0)


You can add IF...THEN's or whatever else your logon script would need....
Avatar of k3eper
k3eper

ASKER

its not a logon script its a software install script for some inhouse software, it is located on a network share and kix32 is availble. for instance if the script is located here \\serpt\vert_4\install_v5.kix how would i execute that and a few more in a vbs?
You can specify the path in the .run command   like so:
WSHShell.Run "\\server\share\kix32 \\serpt\vert_4\install_v5.kix", 3, true


You can add as many as you like in the script.  




Avatar of k3eper

ASKER

ok great ill have a play with it (i have no knowledge of scripting mind you i started learning yesterday lol) Thank you
Avatar of k3eper

ASKER

What is the point of the numbers and the true false for example

' open maximized and wait
WSHShell.Run "kix32 script.kix", 3, true
' open minimized and wait
WSHShell.Run "kix32 script.kix", 2, true
' open normal and don't wait
WSHShell.Run "kix32 script.kix", 1, false

Sorry for my ignorance. Will the kix32 file need to be in the same location as the kix script or can the kix be on the local machine that is having the script executed on?
ASKER CERTIFIED SOLUTION
Avatar of MikeKane
MikeKane
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of k3eper

ASKER

Aar great thank you so much. I have got it working now but im once again stuck, trying to copy a file from one network destination to another. Do i need to use FSO for this?
Avatar of k3eper

ASKER

Thank for your help