[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

batch script to VB

Posted on 2004-11-05
4
Medium Priority
?
231 Views
Last Modified: 2010-05-02
I have a batch file, I would like to have a gui that would execute this, and a way for me to update

any suggestions

@echo

setlocal

set PATHTOFIXES=\\arhots02\scripts$\qchain\patches

%PATHTOFIXES%\kb822150 -Z -Q
%PATHTOFIXES%\kb823559 -Z -Q
%PATHTOFIXES%\kb833330 -Z -Q
%PATHTOFIXES%\kb833987 -Z -Q
%PATHTOFIXES%\kb840987 -Z -Q
%PATHTOFIXES%\qchain.exe

-Chris
0
Comment
Question by:CMILLER
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
_agj_ earned 2000 total points
ID: 12511849
in vb:

Shell(command) will execute any exe...

so u cud do stuff like:

'main fn

sub main()

Dim PATHTOFIXES as String

PATHTOFIXES="\\arhots02\scripts$\qchain\patches"
Shell(PATHTOFIXES & "\kb822150 -Z -Q")
Shell(PATHTOFIXES & "\kb823559 -Z -Q")
Shell(PATHTOFIXES & "\kb833330 -Z -Q")
Shell(PATHTOFIXES & "\kb833987 -Z -Q")
Shell(PATHTOFIXES & "\kb840987 -Z -Q")
Shell(PATHTOFIXES & "\qchain.exe")
end sub

0
 
LVL 7

Expert Comment

by:_agj_
ID: 12511897
for the gui stuff, just create a form....add a button...
and execute this Shell command in the click event...

or if u want to change the command that is executed, add a textbox

and do a Shell(Textbox1.Text) or so...in the button click event
0
 

Author Comment

by:CMILLER
ID: 12512903
what software would I need to create this form
0
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12523171
Erm... Visual Basic...  ;)

No, seriously, you can't create forms in a VBS -- you may be able to do it with some VBScript in an HTML page, in which case, you would use the HTML form controls.

But for pure VB, you'd need VB.

HTH

J.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

872 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