Solved

Vbscript to execute kix script

Posted on 2008-10-06
9
1,470 Views
Last Modified: 2010-04-21
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
Comment
Question by:k3eper
  • 5
  • 4
9 Comments
 
LVL 33

Expert Comment

by:MikeKane
ID: 22650541
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
 

Author Comment

by:k3eper
ID: 22652692
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
 
LVL 33

Expert Comment

by:MikeKane
ID: 22653213
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:k3eper
ID: 22653234
ok great ill have a play with it (i have no knowledge of scripting mind you i started learning yesterday lol) Thank you
0
 
LVL 33

Expert Comment

by:MikeKane
ID: 22653319
0
 

Author Comment

by:k3eper
ID: 22653342
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
 
LVL 33

Accepted Solution

by:
MikeKane earned 50 total points
ID: 22654567
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
 

Author Comment

by:k3eper
ID: 22658797
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
 

Author Closing Comment

by:k3eper
ID: 31503427
Thank for your help
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question