Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1506
  • Last Modified:

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?
0
k3eper
Asked:
k3eper
  • 5
  • 4
1 Solution
 
MikeKaneCommented:
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....
0
 
k3eperAuthor Commented:
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?
0
 
MikeKaneCommented:
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.  




0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
k3eperAuthor Commented:
ok great ill have a play with it (i have no knowledge of scripting mind you i started learning yesterday lol) Thank you
0
 
k3eperAuthor Commented:
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?
0
 
MikeKaneCommented:
The numbers refer to how to open the shell for the external app.   3 = maximized window, 2  =minimized, 1 = normal.   True or False refers to whether or not the script will wait for that EXE to finish before continuing with the next commands....  

Each line has a comment in front of it explaining the example.
0
 
k3eperAuthor Commented:
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?
0
 
k3eperAuthor Commented:
Thank for your help
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now