Thanks guys (or girls,

) for your help, it is
very appreciated.

Now i hope i can help you one day.
EDIT: Hello,

. Code tweaked by Mua:
<!-- ORIGINAL HTA AND SCRIPT BY YZOWL
HTA EDIT BY GUNSMOKINGMAN
HTA RE-EDIT BY BETA4ME -->
<HTML><HEAD>
<TITLE>Owner, Organization & PC Name</TITLE>
<HTA:APPLICATION
applicationname="Owner, Organization & PC Name"
maximizebutton="no"
minimizebutton="yes"
scroll="no"
showintaskbar="yes"
singleinstance="yes"
Icon="%SystemRoot%\explorer.exe">
<STYLE type="text/css">
Body
{
font:10.75pt;
font-family: arial, Verdana, Palatino Linotype;
color:#E3E3E3;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0, StartColorStr='#00CC00', EndColorStr='#4E4E4E');
padding-top:1;
padding-bottom:1;
Text-Align:;
}
.Button
{
font: 8.25pt;
font-family: Verdana, Palatino Linotype;
color:#E1E1E1;
font-weight:bold;
Text-Align:Center;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#d0d0d0',endColorStr='#008C80');
padding-top:1;
padding-bottom:1;
cursor:Hand;
Height:19; width:93;
border-left: 1px Transparent;
border-right: 2px Transparent;
border-top: 1px Transparent;
border-Bottom: 2px Transparent;
}
.TextBackGround
{
font-family: arial, Verdana, Palatino Linotype;
color:#1E1E1E;
font-weight:bold;
filter:progid:DXImageTransform.Microsoft.Gradient (GradientType=0,StartColorStr=#e2ded8,EndColorStr=#e8e2de;
padding-top:1; padding-bottom:1;
border-left: 3px none Transparent;
border-right: 2px none Transparent;
border-top: 3px none Transparent;
border-Bottom: 2px none Transparent;; font-style:normal; font-variant:normal; font-size:8.25pt
}
</STYLE>
<script Language="JavaScript">
var Act = new ActiveXObject("Wscript.Shell");
var Fso = new ActiveXObject("Scripting.FileSystemObject");
/* CLOSE THE HTA -> */
function ExitThis() { window.close();}
/* RUN BUTTON CHANGE TEXT -> */
function Button1ChangeText() { if (Run_Button.value =="Submit Data")
{Run_Button.value ='Press To Add'
Txt1.innerHTML= 'All Three Text Boxes Must Be Filled In. <BR>If Any ' +
'Text Box Is Not Filled In It Will Not <BR>Run The Script!' }
else {Run_Button.value ='Submit Data', Txt1.innerHTML= '';}}
/* CLEAR BUTTON CHANGE TEXT -> */
function Button2ChangeText() { if (Clear_Button.value =="Clear Text")
{Clear_Button.value ='Clear Text'} else {Clear_Button.value ='Clear Text';}}
/* CLOSE BUTTON CHANGE TEXT -> */
function Button3ChangeText() { if (Close_Button.value =="Close App")
{Close_Button.value ='Close App'} else {Close_Button.value ='Close App';}}
</SCRIPT>
<script language="VBScript">
Dim strName, strOrg, strPC
'/-> TEXT BOXES SCRIPTS
Function RegEdit()
strOrg = TextBox0.Value : strName = TextBox1.Value : strPC = TextBox2.Value
If strOrg = "" Then
window.alert "Alert" & vbcrlf & "You need to fill in " & chr(34) & "Organization" & chr(34)
document.getElementByID("textbox0").select
ElseIf strName = "" Then
window.alert "Alert" & vbcrlf & "You need to fill in " & chr(34) & "Owner" & chr(34),64,"Alert"
document.getElementByID("textbox1").select
ElseIf strPC = "" Then
window.alert "Alert" & vbcrlf & "You need to fill in " & chr(34) & "PC Name" & chr(34),64,"Alert"
document.getElementByID("textbox2").select
Else
Set strScript = Fso.CreateTextFile("Add2Reg.vbs")
strScript.WriteLine "Set Act = CreateObject(" & chr(34) & "WScript.Shell" & chr(34) & ")"
strScript.WriteLine "Set Fso = CreateObject(" & chr(34) & "Scripting.FileSystemObject" & chr(34) & ")"
strScript.WriteLine "strRoot = " & chr(34) & "HKLM" & chr(34)
strScript.WriteLine "strOne = " & chr(34) & "\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" & chr(34) & ""
strScript.WriteLine "strTwo = " & chr(34) & "\System\CurrentControlSet\Control\ComputerName\ComputerName\" & chr(34) & ""
strScript.WriteLine "strThree = " & chr(34) & "\System\ControlSet001\Control\ComputerName\ComputerName\" & chr(34) & ""
strScript.WriteLine "strFour = " & chr(34) & "\System\ControlSet002\Control\ComputerName\ComputerName\" & chr(34) & ""
strScript.WriteLine "strFive = " & chr(34) & "\System\CurrentControlSet\Control\ComputerName\ActiveComputerName\" & chr(34) & ""
strScript.WriteLine "strSix = " & chr(34) & "\System\ControlSet001\Control\ComputerName\ActiveComputerName\" & chr(34) & ""
strScript.WriteLine "strOrg = " & chr(34) & strOrg & chr(34)
strScript.WriteLine "strName = " & chr(34) & strName & chr(34)
strScript.WriteLine "strPC = " & chr(34) & strPC & chr(34)
strScript.WriteLine "Act.RegWrite strRoot & strOne & " & chr(34) & "RegisteredOrganization" & chr(34) & ", strOrg"
strScript.WriteLine "Act.RegWrite strRoot & strOne & " & chr(34) & "RegisteredOwner" & chr(34) & ", strName"
strScript.WriteLine "Act.RegWrite strRoot & strTwo & " & chr(34) & "ComputerName" & chr(34) & ", strPC"
strScript.WriteLine "Act.RegWrite strRoot & strThree & " & chr(34) & "ComputerName" & chr(34) & ", strPC"
strScript.WriteLine "Act.RegWrite strRoot & strFour & " & chr(34) & "ComputerName" & chr(34) & ", strPC"
strScript.WriteLine "Act.RegWrite strRoot & strFive & " & chr(34) & "ComputerName" & chr(34) & ", strPC"
strScript.WriteLine "Act.RegWrite strRoot & strSix & " & chr(34) & "ComputerName" & chr(34) & ", strPC"
strScript.WriteLine "Fso.DeleteFile(WScript.ScriptFullName)"
strScript.Close
call RunScript
End If
End Function
'/-> RUN NEW SCRIPT AND THEN DELETE THE SCRIPT
Function RunScript() : Act.Run("Add2Reg.vbs"), 1, True : End Function
'/-> CLEAR THE TEXT BOXES
Function ClearText() : TextBox0.Value = "" : TextBox1.Value = "" : TextBox2.Value = "" : End Function
'/-> ON LOAD EVENT
Function window_Onload() : window.ResizeTo 440,260 : TextBox0.focus() : End Function
</SCRIPT>
</HEAD><BODY><CENTER>
<!-- TEXT BOX TABLE START --><TABLE width='90%' border='1' cellpadding='6'><TD>
<!-- TEXT BOX 01 START -->
<TABLE><TD Width='125'><B>» Organization</TD><TD> :</B></TD>
<TD colspan="2"><Input type="text" Class='TextBackGround' size="36" name="textbox0">
</TD></TABLE>
<!-- TEXT BOX 02 START -->
<TABLE><TD Width='125'><B>» Owner</TD><TD> :</B></TD>
<TD colspan="2"><Input type="text" Class='TextBackGround' size="36" name="textbox1">
</TD></TABLE>
<!-- TEXT BOX 03 START -->
<TABLE><TD Width='125'><B>» PC Name</TD><TD> :</B></TD>
<TD colspan="2"><Input type="text" Class='TextBackGround' size="36" name="textbox2"></TD>
</TABLE></TD>
<!-- TEXT BOX TABLE END --></TABLE>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<!-- BUTTON TABLE START --><TABLE>
<!-- RUN BUTTON START -->
<TD Width='125' Align='Center'><Input type="button" Class='Button' Value="Submit Data" name="Run_Button"
OnMouseOver="Button1ChangeText(),this.style.color='#004f1a';"
OnMouseOut="Button1ChangeText(),this.style.color='#E1E1E1';"
onClick="RegEdit()"></TD>
<!-- CLEAR BUTTON START -->
<TD Width='125' Align='Center'><Input type="button" Class='Button' Value="Clear Text" name="Clear_Button"
OnMouseOver="Button2ChangeText(),this.style.color='#004f1a';"
OnMouseOut="Button2ChangeText(),this.style.color='#E1E1E1';"
onClick="ClearText()"></TD>
<!-- CLOSE BUTTON START -->
<TD Width='125' Align='Center'><Input type="button" Class='Button' Value="Close App" name="Close_Button"
OnMouseOver="Button3ChangeText(),this.style.color='#004f1a';"
OnMouseOut="Button3ChangeText(),this.style.color='#E1E1E1';"
onClick="ExitThis()"></TD>
<!-- BUTTON TABLE END --> </TABLE></CENTER>
<!-- Yzöwl TABLE START -->
<TABLE><TD WIDTH='236' HEIGHT='47' Style='font:8.75pt;Color:"#E1E1E1"'><SPAN ID='Txt1'></SPAN></TD>
<TD><FONT color="#E1E1E1" size="1.25">© 2006 Yzöwl. All Rights Reserved</FONT></TD></TABLE>
<!-- Yzöwl TABLE END -->
</BODY></HTML>
Tell me what you think!
This post has been edited by mandrake10: 06 October 2006 - 02:07 AM