HTA_Help.vbs (In the book)

Jan
25
2013

 

'Script : HTA_Help.vbs
'From the book "Group Policy" by Jeremy Moskowitz

'The contents of this script are provided "as is".  
'No warranty of any kind, either express or implied, is made in relation 
'to the availability, accuracy, reliability or content of this script.
'ALWAYS test scripts before using in your production network!

Sub AddHTML(HTML,Data)
HTML = HTML & Data
End Sub

Function BrowseForFolder
Dim Shell, Folder
Set Shell = CreateObject("Shell.Application")
Set Folder = Shell.BrowseForFolder(0,"Browse for folder",0,0)
If Folder Is Nothing Then
	BrowseForFolder = ""
Else
	If Not (LCase(Left(Trim(TypeName(Folder)), 6))= "folder") Then 
		BrowseForFolder = ""
	Else
		BrowseForFolder = Folder.self.Path
	End If
End If
Set Shell = Nothing
Set Folder = Nothing
End Function

Function GetDefaultFolder(WithDate)
Set shell = CreateObject("Wscript.Shell")
GetDefaultFolder = Shell.SpecialFolders("MyDocuments") & "\" 
If WithDate Then
	GetDefaultFolder = GetDefaultFolder & GetDateName
End If	
End Function
Copyright © GPanswers.com. All rights reserved. GPanswers.com is a service of PolicyPak Software