1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<html>
<head>
<title>Backup</title>


<hta:application
	showintaskbar = "yes"
	caption = "no"
	border = "thick"
	contextmenu = "yes" 
	innerborder = "no" 
	scroll = "no" 
	singleinstance = "yes"  
	resizable = "no" 
	#windowState = "maximize" 
>


<style type="text/css" media="screen">

html, body {
	height: 100%;
	background-color:#9cf;
	}
	
#container {
	width: 720px;
	height: 415px;
	text-align: center;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -360px;
	margin-top: -207.5px;
</style>




<script language="VBScript" type="text/vbscript">

//////////////////////////////////////////////////////////////////////
//																	//
// Variables used in Image for Windows Command.                     //
//																	//	
//////////////////////////////////////////////////////////////////////

Dim BackupPath
Dim BackupFileName
Dim BackupValidation
Dim BackupVerification



//////////////////////////////////////////////////////////////////////
//																	//
// Prompts user to select a backup location for their backup file.  //
//																	//	
//////////////////////////////////////////////////////////////////////

Sub ChooseSaveFolder
    strStartDir = ""
    userselections.txtFile.value = PickFolder(strStartDir)
End Sub

Function PickFolder(strStartDir)
Dim SA, F
Set SA = CreateObject("Shell.Application")
Set F = SA.BrowseForFolder(0, "Please choose a location to backup your system to.  A .tbi file will be created here.", 0, strStartDir)
If (Not F Is Nothing) Then
  PickFolder = F.Items.Item.path
End If
Set F = Nothing
Set SA = Nothing
End Function

//////////////////////////////////////////////////////////////////////
//																	//
// Handles the backup image filename        					    //
//																	//	
//////////////////////////////////////////////////////////////////////

Sub ChooseFilename


End Sub

//////////////////////////////////////////////////////////////////////
// 																	//
// Builds & Runs Image for Windows from the command line with		//
// specified parameters.											//
//																    //	
//////////////////////////////////////////////////////////////////////

Sub RunCommand
    BackupPath = userselections.txtFile.value
        If userselections.txtFile.value ="" Then
            msgbox "Please Select a Backup Location"
        Else
            msgBox "Your system will be backed up to: " & BackupPath
        End If
		
		
		set WshShell = CreateObject("WScript.Shell")
		WshShell.Run "testing.bat"
		window.close()
End Sub
		
	
</script>



<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<div id="container">



<form name="userselections">
Please choose a backup location: 
<input type = "text" name = "txtFile" size="15" />

<input type = "button" value = "Browse ..." onClick="ChooseSaveFolder" />
<p />
Backup Filename: <input type = "text" onChange="ChooseFilename" />.tbi


<p />
<p />

<input type="button" value="Start Backup" name="run_button"  onClick="RunCommand">
</form>


</div>
</body>
</html>