Simon336697
asked on
Batch file to hta
HI everyone,
I have the following batch file that I would like to convert to a hta.
Syntax for running it is as follows:
checkhotfixes.bat <computer_name> <hotfixes_list>.txt <output_results>.txt
What id like to do is:
a) Convert this to a hta
b) Have a list box on the hta that takes the place of the text file that lists all hotfixes to be checked.
c) Have a text box that enables you to input the computer name you wish to check
d) A "Run" button that allows you to execute the script
e) Output would be seen in the hta and not written to a text file
Any help on converting this script to a hta would be much appreciated.
I have the following batch file that I would like to convert to a hta.
Syntax for running it is as follows:
checkhotfixes.bat <computer_name> <hotfixes_list>.txt <output_results>.txt
What id like to do is:
a) Convert this to a hta
b) Have a list box on the hta that takes the place of the text file that lists all hotfixes to be checked.
c) Have a text box that enables you to input the computer name you wish to check
d) A "Run" button that allows you to execute the script
e) Output would be seen in the hta and not written to a text file
Any help on converting this script to a hta would be much appreciated.
@echo off
rem -------------- checkhotfixes.bat
rem -------------- checkhotfixes.bat <computer_name> <hotfixes_list>.txt <output_results>.txt
rem -------------- eg. checkhotfixes.bat serverA kb.txt kbresults.txt
SETLOCAL ENABLEDELAYEDEXPANSION
ECHO System: %1>>%3
ECHO KBs to check from %2:>>%3
ECHO KB: Status:>>%3
ECHO ------------------------->>%3
FOR /f %%k in ('type "%2"') do (
Set Status=Not installed
reg query "\\%1\hklm\software\microsoft\windows nt\currentversion\hotfix\%%k" /v Installed | FIND /i "Installed" | FIND "0x1"
IF NOT ERRORLEVEL 1 Set Status=Installed
ECHO %%k !Status!>>%3
)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER