Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Running a program in HTA

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,37154
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Running a program in HTA
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Running a program in HTA - 8/21/2006 8:27:18 PM   
  Tolle

 

Posts: 4
Score: 0
Joined: 8/21/2006
Status: offline
Hi,

I want to start the IIS Manager from a HTA program to add a website, and then change that website's parameters.
I know there is a utility called iisweb.vbs, but I can't do all the things I want to do with this script, like changing the path of the log files, change the anonymous user, and some other things.

Can anyone help me how i can do this in a HTA?
I know my way around HTA but can't find the proper commands to do this
I use vbscript in the HTA program.

I tried with sendkey and sendkeys, but both commands gave an error...

Thanks

< Message edited by Tolle -- 8/21/2006 10:21:04 PM >
 
 
Post #: 1
 
 RE: Running a program in HTA - 8/21/2006 11:42:11 PM   
  Country73


Posts: 732
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
Can't say that I'm familiar with the iisweb.vbs, so I really don't know what all you are trying to run.
There's quite a few individuals out here that have made some pretty robust HTA's; so just show some of the script you are trying to run and maybe someone out here will know a good way to run that in an HTA.

(in reply to Tolle)
 
 
Post #: 2
 
 RE: Running a program in HTA - 8/22/2006 12:05:35 AM   
  Tolle

 

Posts: 4
Score: 0
Joined: 8/21/2006
Status: offline
iisweb.vbs is a script that is available on any W2K3 server. You can find a lot of info about it on Yahoo or whatever.
This script allows me to create a website, and set some parameters, but I would like to finetune the parameters.

So manually running the IIS manager and set all the parameters is an option, but not on a regular base.

(in reply to Country73)
 
 
Post #: 3
 
 RE: Running a program in HTA - 8/22/2006 12:57:08 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
Post what you have so far, so we can build upon that

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to Tolle)
 
 
Post #: 4
 
 RE: Running a program in HTA - 8/22/2006 4:58:01 PM   
  Tolle

 

Posts: 4
Score: 0
Joined: 8/21/2006
Status: offline
This is my code so far,
I need to ad a lot of things, but this has to work first offcource


<HTML>

<HEAD>
<TITLE>HTA Application Tag</TITLE>

<HTA:APPLICATION
ID =
"oApp"
APPLICATIONNAME =
"Domain Creator"
BORDER =
"thick"
CAPTION =
"yes"
SHOWINTASKBAR =
"yes"
SINGLEINSTANCE =
"yes"
SYSMENU =
"yes"
WINDOWSTATE =
"normal"
SCROLL =
"no"
SCROLLFLAT =
"yes"
VERSION =
"1.0"
INNERBORDER =
"yes"
SELECTION =
"no"
MAXIMIZEBUTTON =
"no"
MINIMIZEBUTTON =
"yes"
NAVIGABLE =
"yes"
CONTEXTMENU =
"no"
BORDERSTYLE =
"normal"
SCROLL =
"no"
>
</HEAD>

<script language="VBScript">
option explicit

Sub reloadHTA
()
location
.reload( True )
End Sub

Sub Createall
' Variables worden gedefinieerd
Dim strComputer
Dim Domeinnaam
Dim objIIS

' Variablen worden ingevuld
strComputer
= "This_Computer"
Domeinnaam
= aanmaak.fDomeinnaam.Value & aanmaak.fDomext.Value

' Creatie website
in IIS
Msgbox
("Domein wordt op IIS Manager aangemaatk")
Set objIIS
= CreateObject("Wscript.Shell")
objIIS
.Run("%SystemRoot%\system32\inetsrv\iis.msc")
objIIS
.sendkeys("{HOME}")
objIIS
.sendkeys(strComputer)
objIIS
.sendkeys("{RIGHT}")
objIIS
.sendkeys("Web Sites")
objIIS
.sendkeys("%A")
objIIS
.sendkeys("N")
objIIS
.sendkeys("W")
' Start Wizard here
objIIS
.sendkeys("%N")
objIIS
.sendkeys("www.")
objIIS
.sendkeys(Domeinnaam)
objIIS
.sendkeys("%N")
objIIS
.sendkeys("www.")
objIIS
.sendkeys("Domeinnaam")
objIIS
.sendkeys("%N")
' Etc
...

' Variablen worden gecleared
Msgbox
("Variablen worden gecleared")
set objIIS
= Nothing
strComputer
= ""
End Sub
</script>

<BODY STYLE=
"font:14pt arial; color:white;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=
370371, StartColorStr='#800000', EndColorStr='#DB7093')">
<center><font size="+2"><b>Creatie domein</b></font>
<br><br>
<table border="0" cellpadding="0" cellspacing="0">
<form name=
"aanmaak">
<tr>
<td>Domeinnaam:</td><td><input type="text" name="fDomeinnaam"></td>
<td>&nbsp;</td>
<td>Extensie:</td><td><select name="fDomext">
<option value =
".be">.be</option>
<option value =
".nl">.nl</option>
<option value =
".com">.com</option>
</select>
</td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td><td align="center"><input type="button" value="Creëer" onclick="Createall"></td><td>&nbsp;</td><td align="center"><input type="button" value="Begin opnieuw" onclick="ReloadHTA"></td><td>&nbsp;</td>
</tr>
</form>
</table>
</center>
</BODY>
</HTML>

 
Some things are in Dutch, but that's pure decoration
 
I am running this on Windows Server 2003 Web Edition
I tried to run in on Windows XP, but I don't have the wizard there
I know there are other ways to create a site (see previous post regarding IISWEB.VBS) but after the site has been created I need to set a few things maulally, like log path, Change Anonymous User, .... and the IISWEB.VBS doesn't allow me to do that.

I also wat to use this kind of scripting to run a 3rd party mail program.

Thanks for taking a look at it
 

(in reply to Snipah)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Running a program in HTA Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts