Solved

Vbscript to execute kix script

Posted on 2008-10-06
9
1,459 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:k3eper
Comment Utility
ok great ill have a play with it (i have no knowledge of scripting mind you i started learning yesterday lol) Thank you
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 33

Expert Comment

by:MikeKane
Comment Utility
0
 

Author Comment

by:k3eper
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thank for your help
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now