vbs to logoff
Hello
I need to create a simple script that will run "shutdown -f -l -t00"
I want to schedule this script so that pcs will logoff at a specific time.
I know I can do this via a batch file but I would rather do this in a
script if possible.
Thanks in advance! Tag: Import LMHOST Tag: 184204
Adjust COM+/DCOM Activation/Launch permissions via vbscript?
Is it possible to adjust DCOM Activation and Launch permissions via a
vbscript? I'm looking to do this for a couple DCOM applications (Volume
Shadow Copy, and a few Removable Storage apps).
Thanks,
Trevor Tag: Import LMHOST Tag: 184203
Saved Event logs Reporting
I have a script that I'd like to modify. I first examine the event logs on a
server and report on any errors and audit failures to an HTML file. Then I
back up the logs and clear the logs. I would like to first backup the logs
then parse the saved logs to the script that creates the HTML file. My
question is how can I parse the backed-up event log file so as to capture the
needed errots for creating the HTML file. Shown below is the section of the
code that I use to create the HTML file from the Event Logs. Can some tell
me how I might modify it?
Thanks,
Frank
' +++++++++++++++++ Begin of VBScript Code +++++++++++++++++ '
Const ieCRLF = "<br>"
Const ieSPACE = " "
Const ForAppending = 8
sServer = "."
sFileName = "C:\Temp\EvtLog-Test.html"
Set oF_Sys = CreateObject( "Scripting.FileSystemObject" )
Set oWMIService = GetObject( "winmgmts:" & "{impersonationLevel=" & _
"impersonate}!\\" & sServer & "\root\cimv2" )
Set colEvents = oWMIService.ExecQuery( "Select * from Win32_NTLogEvent " & _
"Where Type = 'audit failure' or Type = 'error'" )
Set oAdd2File = oF_Sys.OpenTextFile( sFileName, ForAppending, TRUE )
oAdd2File.WriteLine "<html><head><title>Event Logs Errors Report, " & Now()
& _
" </title></head>" & vbCRLF & "<body bgcolor='white'>" & ieCRLF & vbCRLF & _
String( 108, "=" ) & ieCRLF & vbCRLF & "</big></b> <table width='100%'>" & _
vbCRLF & "<tr><td width='10%'> <b>LogFile</b></td>" & vbCRLF & _
"<td width='18%'><b> Date" & vbCRLF & " Time</b></td>" & _
vbCRLF & "<td width='10%'><b>EventCode</b></td>" & vbCRLF & _
"<td width='12%'><b>Source</b></td>" & vbCRLF & "<td width='50%'><b>" & _
"Message</b></td>" & vbCRLF & "</tr>"
If NOT IsEmpty( colEvents ) Then
For Each oService In colEvents
oAdd2File.WriteLine ("<tr><td width='10%'>" & oService.LogFile & _
"</td><td width='18%'>" & Left( oService.TimeGenerated, 14 ) & _
"</td><td width='10%'>" & oService.EventCode & "</td>" & _
"<td width='12%'>" & oService.SourceName & "</td>" & _
"<td width='50%'>" & oService.Message & "</td></tr><tr></tr>")
Next
'Else
' wscript.echo "Nada"
End If
oAdd2File.WriteLine ("<tr></tr></table>" & ieCRLF & "<big><i><b>End of
report " & _
"for server: " & sServer & ieCRLF & "</b></i></big>")
oAdd2File.Close
Set oAdd2File = Nothing
Set oF_Sys = Nothing
Set colEvents = Nothing
Set oWMIService = Nothing
' ++++++++++++++++++ End of VBScript Code ++++++++++++++++++ ' Tag: Import LMHOST Tag: 184202
is there a way to set user enviroment from vbscript?
I tried the example from the script help
Dim WshShell, WshEnv
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("USER") ' I replaced PROCESS with USER
hoping for better result
WshEnv("TestVar") = "Windows Script Host"
However when the script finishes, there is no TestVar around in the dos
prompt that executed the script..
I only need the set an environment variable just for the DOS prompt session. Tag: Import LMHOST Tag: 184199
Userdata limits
Hello,
Iâ??m using userdata.save to save sum info.
I have found that there are size and number limits for the userdata storage
area.
What will happen if I will try to save and userdata storage area will be full.
Is there a way to ensure that my data will be saved.
Thanks
Rami Tag: Import LMHOST Tag: 184196
Controllers
Using the code below, I am able to retrieve a SCSI Controller's name.
However, what I really need to retrieve is the SCSI Controller's
firmware version? Any suggestions?
strComputer = "."
set shell = createobject("wscript.shell")
set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
set colItems = objWMIService.ExecQuery("SELECT * FROM "_
& "Win32_SCSIController", "WQL", &h10 + &h20)
contCount = 1
For Each objItem In colItems
wscript.echo "Controller" & contCount& ": " & objItem.Name
contCount = contCount + 1
Next Tag: Import LMHOST Tag: 184195
Redirects - 301 vs. 302
Our site uses response.redirect statements intensively to simplify our
internal links. We have recently purchased a Google Search appliance, which
requires us to use 301 redirects (using Response.Status and
Response.AddHeader instead) to work correctly.
I have tested this method, and it appears to work correctly. I understand
that some browsers may change bookmarks to the destination URL, which is fine
as well. I am just wondering if there are any other differences that I
should be aware of before making this change.
Feel free to point me to a more appropriate newsgroup if this is OT. Thanks! Tag: Import LMHOST Tag: 184193
MS Cluster scripting question
I'm trying to pull all the Cluster Names in the domain using a
VBScript. I have seen this reference to the Cluster Automation Server
on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mscs/mscs/clusapplication_clusternames.asp
It looks like I should be able to do this with something similar to
this (which of course doesn't work). I am running this on the Cluster
server:
~~~~~~
Set objCluster = CreateObject("MSCluster.ClusApplication")
set objClust2 = objCluster.ClusterNames("acme.local")
For Each objClust In objClust2
WScript.Echo objClust.Item
Next
I have this script that works to pull the active node from a group so I
think I'm on the right track:
Set objCluster = CreateObject("MSCluster.Cluster")
objCluster.Open("sql1t")
WScript.Echo objCluster.ResourceGroups.Item("Cluster
Group").OwnerNode.Name
Set objCluster = Nothing
TIA
Chris Bodnar Tag: Import LMHOST Tag: 184192
scan log and send email
I have a spam blocker running on my exchange server (GFI MailEssentials). I
have it set to log any emails that were deleted by the keyword checking part
of it. I'd like to set up a script that runs once a day that will scan the
log file and send an email to the original recipient with a list of emails
that were deleted. Here's the layout of the log file: (also attached as a
text file)
"11/29/05 08:53:01","Anti-Spam Keyword
Checking","vxbhqfotnwl@hotmail.com","username1@domaina.com","Viagra Pro will
make you happy with life","Deleted","Found word(s) viagra in the subject"
"11/29/05 10:25:29","Anti-Spam Keyword
Checking","futzonscpqx@hotmail.com","username2@domaina.com","Soft Cialis -
ideal remedy for impotence.","Deleted","Found word(s) Impotence CIALIS in
the subject"
"11/29/05 16:11:57","Anti-Spam Keyword
Checking","dqndwfvdfhk@hotmail.com",username1@domaina.com," Spend money only
for the best quality. Buy software at OEM Software Store.","Deleted","Found
word(s) OEM Software in the subject"
What's the best way to go about creating a script that will scan the file
(by date) and send an email to the correct user? In this case username1
will receive an email with the first and last log entries and username 2
with the other one. There are many users on the server with quite a few
emails being deleted each day.
I appreciate any help.
Thanks...
--
Posted 'as is'. If there are any spelling and/or grammar mistakes, they
were a direct result of my fingers and brain not being synchronized or my
lack of caffeine.
begin 666 log.txt
M(C$Q+S(Y+S U(# X.C4S.C Q(BPB06YT:2U3<&%M($ME>7=O<F0@0VAE8VMI
M;F<B+")V>&)H<69O=&YW;$!H;W1M86EL+F-O;2(L(G5S97)N86UE,4!D;VUA
M:6YA+F-O;2(L(E9I86=R82!0<F\@=VEL;"!M86ME('EO=2!H87!P>2!W:71H
M(&QI9F4B+")$96QE=&5D(BPB1F]U;F0@=V]R9"AS*2!V:6%G<F$@:6X@=&AE
M('-U8FIE8W0B#0HB,3$O,CDO,#4@,3 Z,C4Z,CDB+")!;G1I+5-P86T@2V5Y
M=V]R9"!#:&5C:VEN9R(L(F9U='IO;G-C<'%X0&AO=&UA:6PN8V]M(BPB=7-E
M<FYA;64Q0&1O;6%I;F$N8V]M(BPB4V]F="!#:6%L:7,@+2!I9&5A;"!R96UE
M9'D@9F]R(&EM<&]T96YC92XB+")$96QE=&5D(BPB1F]U;F0@=V]R9"AS*2!)
M;7!O=&5N8V4@0TE!3$E3(&EN('1H92!S=6)J96-T(@T*(C$Q+S(Y+S U(#$V
M.C$Q.C4W(BPB06YT:2U3<&%M($ME>7=O<F0@0VAE8VMI;F<B+")D<6YD=V9V
M9&9H:T!H;W1M86EL+F-O;2(L=7-E<FYA;64Q0&1O;6%I;F$N8V]M+"(@4W!E
M;F0@;6]N97D@;VYL>2!F;W(@=&AE(&)E<W0@<75A;&ET>2X@0G5Y('-O9G1W
M87)E(&%T($]%32!3;V9T=V%R92!3=&]R92XB+")$96QE=&5D(BPB1F]U;F0@
D=V]R9"AS*2!/14T@4V]F='=A<F4@:6X@=&AE('-U8FIE8W0B
`
end Tag: Import LMHOST Tag: 184185
Can I compile / package up client side vbscript so an end user can't view it in a html file?
Hi,
Sorry if this is a stupid question, but I'm a bit new to vbscript...
We've got a client app written so it uses client side vb script in a few
html pages to provide basic functionality (don't ask why, someone else
designed it!). The problem is, you can do the classic 'right click, view
source' and find out exactly how it all works. Not too great eh?
My first question is: Is there a way to remove the vbscript and compile /
obfuscate it into a package which can be included into the project?
Now, we've also got a web site which is also vbscript heavy which has the
same problem. And so, same question again for this...
Thanks in advance,
Martin Pritchard Tag: Import LMHOST Tag: 184177
automatically resize a window ? (xp)
I need to automatically size all open and non-mimized windows
(specifically Explorer folder navigation) to the specified height/width
(in twips or whatever unit). Also maybe include a function that reports
the height/width in twips or whatever of the topmost open non-mimized
window. Any idea how to do this from code in either vb.net, vb6,
vbscript... Tag: Import LMHOST Tag: 184176
list and loop through files from just using an URL
Hi,
I would like to code in asp/vbscript, a program that will list each
file at a specific URL AND then allow me to loop through those files.
The folder on this remote browser would be set to "List Folder
Contents"
the problem is that the code using
_______________________
dim oxml
set oxml = createobject("msxml2.xmlhttp")
oxml.open "GET", "http://www.whatever.com/directorytobrowse/", false
oxml.send
response.write(oxml.responsetext)
_____________________________
just show returns the page with the listing of the files, which I can't
loop through the files
I would like some code that would allow something like this....
for each file in oxml
response.write(oxml.filename)
end
Thanks if anyone know how do this. (I would rather not parse through
oxml.reponsetext to try to extract the file names) Tag: Import LMHOST Tag: 184173
Rename Windows 2000 computer
Hi,
I'm trying to rename a Windows 2000 computer in a NT 4.0 domain by vbscipt
code. But the code as far as I found is not compatible with Windows 2000.
Appreciate any help, thanks.
ErsinC Tag: Import LMHOST Tag: 184172
remove exchange attributes
I have a vbscript that will create exchange mailboxes for my AD users.
I am interested in a script to remove those attributes. I am looking for a
way to automate the Exchange Tasks\Remove Exchange attributes task.
Hopefully someone can help me.
Paul Tag: Import LMHOST Tag: 184169
Start Access Application from vbScript
I am totally new to vbScript.
I have an Access application that I want to kick-off using VBscript, but I
have not been able to figure out how to do it. I would like the script to
open the application in hidden mode, then execute the Autoexec macro that is
in the app.
Can anyone suggest a format for this operation? How about a good text for
someone that has been programming in VBA (mostly Access, but some Excel) for
about 7 years. Tag: Import LMHOST Tag: 184168
Another Question:(
Hi Again Group,
I have the following code which deletes all file over 7 days old.
sDateTime = Year(dDate) & Right(100 + Month(dDate),2) _
& Right(100 + Day(dDate),2) & "_" & Right(100 + Hour(dDate),2) _
& Right(100 + Minute(dDate),2) & Right(100 + Second(dDate),2)
sFilename = sDateTime & ".zip"
'Delete OLD Data - This Keeps 7 Days worth of Backups
Set Folder = FSO.GetFolder("C:\zips\DataBackup\HFSdata")
For Each File in Folder.Files
If DateDiff("d", CDate(File.DateLastModified), Now()) > 7 Then
FSO.DeleteFile File
Next
What I would like to be able to do is if the file is Less than 24 Hours old
copy the Data to a Zip Disk on Drive Z:
I guess I would Add in something like:
If DateDiff("d", CDate(File.DateLastModified), Now()) > 7 Then FSO.CopyFile
File?? but I can`t find any info on the net tho:( Anybody kindly give me
some code or point me in the right direction?
Many Thanks
Regards
NSC Tag: Import LMHOST Tag: 184167
Automatically Do IP and Docs
Hi Group,
Sorry if this is a simple on but im a newbie to all this scripting. I have
the following as part of my VB Script:
Const DriveLetter = "H:"
Const SharePath = \\10.109.220.10\c$\Documents and
Settings\Holderness.Road\My Documents
As Im deploying this to many machines, I would like to be able to
automatically get the Machines IP Address and Logged on Users My Documents
Path.
Could somebody possible point me in the right direction.
Many Thanks
NSC Tag: Import LMHOST Tag: 184166
Pick List is displaying but cannot pick from
New to VBScript.
I've written a script which brings back a list of recent entires, the
idea beign our users pick the one they require rather than having to
remember their references. I've got the list to display but it doesn't
allow them to click on any. Code is below, where ABCDEF is our
database. Appreciate your help here, thanks.
-----------------------------------------------------------
sub main()
Set cnABCDEF = CreateObject("ADODB.Connection")
cnABCDEF.ConnectionString =
"ODBC;DATABASE=ABCDEF;DSN=ABCDEF;UID=xxx;PWD=xxx;APP=ABCDEF"
cnABCDEF.Open
Set cmdQuery = CreateObject ("ADODB.Command")
With cmdQuery
Set .ActiveConnection = cnABCDEF
.CommandText = "Select mattercode, matter from vw_refno where fe =
'JEH' and status = 'O' order by lasttime"
.CommandType = adCmdText
End With
Set matters = CreateObject("ADODB.Recordset")
Set matters.Source = cmdQuery
matters.Cursortype = adOpenForwardOnly
matters.CursorLocation = adUseClient
matters.LockType = adLockReadOnly
matters.Open
If matters.State = adStateOpen Then
Do While Not matters.EOF
strMsg = strMsg & matters.Fields("mattercode").Value
strMsg = strMsg & ":" & vbTab
strMsg = strMsg & matters.Fields("matter").Value
strMsg = strMsg & vbNewLine
matters.MoveNext
Loop
Matters.Close
MsgBox strMsg
Else
MsgBox "Recordset not opened"
End If
Set matters = Nothing
Set cmdQuery = Nothing
cnABCDEF.Close
Set cnABCDEF = Nothing
end sub Tag: Import LMHOST Tag: 184165
Help, script to find user not logged in for a number of time (usiing LastloginTimeStamp)
Hi,
Well, my script (below) is supposed to find all user's on the domain
which have "password cannot expire" falgged, aswell as a list of all
users (by name) who have not logged on for a month.
If we only use the line:
(userAccountControl:1.2.840.113556.1.4.803:=65536); in the LDAP search
query, the script works fine, and returns a list of all user by name.
But when (lastLogonTimeStamp<= 127751249340000000) is added in the
search, the script returns nothing,
any advice would be great appreciated.
Regards
Khurram
Orion4_@hotmail.com
'
------------------------------------------------------------------------------------------------
' UserAudit_2.vbs
' Creates a report based on AD user properties for security auditing
purposes
'
------------------------------------------------------------------------------------------------
On Error Resume Next
'set parameters for ADOB Connection
Set objADConnection = CreateObject("ADODB.Connection")
Set objADCommand = CreateObject("ADODB.Command")
objADConnection.Provider = "ADsDSOObject"
objADConnection.Open "Active Directory Provider"
Set objADCommand.ActiveConnection = objADConnection
objADCommand.Properties("Page Size") = 1000
'connect to AD using LDAP, and search for users with
'the "ADS_UF_DONT_EXPIRE_PASSWD" flag (use value 65536)
objADCommand.CommandText = _
"<LDAP://DC=rfs,DC=nsw,DC=gov,DC=au>;" & _
"(&(ObjectCategory=Person)(objectCategory=User)(lastLogonTimeStamp<=
127751249340000000)(userAccountControl:1.2.840.113556.1.4.803:=65536));"
& _
"Name;Subtree"
'Define Record set
Set rsAD = objADCommand.Execute
'start at beggining of Record Set
rsAD.MoveFirst
'Print out the names of all users in RS
Do Until rsAD.EOF
Wscript.Echo rsAD.Fields("Name").Value
rsAD.MoveNext
Loop Tag: Import LMHOST Tag: 184156
bug?
I found my .bat file setting environment variable from result of vbscript
but the value disappear right away/
bat file statements
@@rem some code that set up values for strdate with values like
strdate=Nov 29 18:38
echo %strdate%| For /F "usebackq tokens=1-2" %%i in (`cscript //nologo
"D:\util -misc\ConvertMMM_DD_HH_MM.vbs" `) do set DtRapidLstDnlod=%%i %%j
@@echo @debug newdt=%dtnew%
@@echo @debug DtRapidLstDnlod=%DtRapidLstDnlod%
@@echo stop for debug
@@rem end of bat file
Now I see output
c:\>set DtRapidLstDnlod=2005-11-29 %J
@debug newdt=Nov 29 18:38
@debug DtRapidLstDnlod=
stop for debug
here is the code for vbs file
dim newDt , sDt, str
str = wscript.stdIn.ReadLine
newDt = Cdate(str)
sDt = "" & newDT
if len(sDt) = 17 then
sDt = "20" & sDt
End If
wscript.echo sDt
what did I miss?
from the output the vbscript does seem to function correctly, but somehow,
the value of variable being set gets lost. and become some funny empty
value.
If I enter in command prompt
set dt
I get
DtRapidLstDnlod= Tag: Import LMHOST Tag: 184155
Can I detect the Serial Number of a PC in a start up script
I would like to gather the Make, Model, and Serial Number of a PC during the
boot process. I am having difficulty doing so under restrictive user
accounts in my domain and am hoping a startup script running under the
system account would work.
Any ideas would be appreciated. Tag: Import LMHOST Tag: 184152
List user's mapped drives on a remote PC
I'm trying to come up with a scripted methodology of listing the mapped
drives of the current user on remote PCs. I've found an article on Technet's
Hey Scripting Guys archive
(http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct05/hey1027.mspx
) that describes what I want to do perfectly. I have built my script around
this code, but have found that, although the article states "As usual, you
can modify this script to run against a remote computer simply by assigning
the name of that machine to the variable strComputer", you cannot enumerate
the shares on a remote PC (XP in this case) - the response always comes back
blank. The same methodology works great when run locally on the PC.
How would I go about listing the mapped drives used by the current user of a
remote PC?
TIA
--
Scott McWilliams
EDS Canada Tag: Import LMHOST Tag: 184144
Option Explicit Issue
Hi,
I'm using Option Explicit to force all variables to be declared in my
script, however this doesn't seem to be the case. It seems from a
certain point forward in my script I can use variables without
declaring them first. Any idea what has happened here? I know this
obviously sounds a little odd, I'm sure there's a sensible solution to
whatever has happened.
Thanks,
Steve Tag: Import LMHOST Tag: 184141
WMI Chipset Model and revision
Does anyone know how to get the Chipset model name (i845, i955) and revision
using WMI.
I've searched several classes but none returning this information. Whats
interesting is the registry has this info??? but it is stored differently
with each machine.
Thanks
C- Tag: Import LMHOST Tag: 184136
How do I run this in VBscript?
I am trying to run this in a vbscript and i am not quite sure how to do
this, if I run it in a .bat file it runs no problem... any help would be
appreciated...
\\testdc\mailsend\MailSend -from test@test.com -smtp mail.test.net -to
test@test.com -msg "Your Files have been uploaded to the following FTP Site
ftp://192.168.0.1 please use the following username - test and password -
password to access the site. Thank You "
Thanks
Gavin... Tag: Import LMHOST Tag: 184134
Applying Hex Value to Registry
Hello,
I'm new to vbscript and i'm having a problem when i try to apply a registry
key. Here is my line of code:
WshShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState",
0c0002001b01e77760000000 "REG_DWORD"
I'm having trouble with the hex syntax. Would anyone know how to write this
correctly?
Thanks
--
-Maro Tag: Import LMHOST Tag: 184131
Find SP2 - [WILDPACKET]
Any body has a script which will find all the Windows XP Clients running SP2
our find SP1 in our domain?
******************************
Have this LDAP Query.
(&(&(&(&(&(objectCategory=Computer)(operatingSystem=Windows XP
Professional)(!operatingSystemServicePack=Service Pack 1))))))
This query works but also picks up all the XP PCs which are also running
SP2. I just want the query to pick SP1 PCs. Any ideas any thing wrong with
this query?
Please advise.
Thank you Tag: Import LMHOST Tag: 184128
replace string
i have a log file in this format...
a,b,c,d,e,f,g
a,b,c,d,e,f,g
a,b,c,d,e,f,g
a,b,c,d,e,f,g
it finish with double newline ( /n)
i need to replace the last caracther of the file, like typing a backspace.
any idea?? Tag: Import LMHOST Tag: 184119
Run Logon Script on Workstations Only
I am creating a script that I want to run at logon in a Windows NT
domain, but want it to execute on Windows 2000 or XP Professional
Workstations only, not on Servers. We have several admins that use the
same username to log on to both their workstations, and servers,
creating issues if the same script executes when they log on to their
servers.
While I am able to use the System environment variable to determine
that the OS is Windows_NT, and use a subsequent registry read of
HKLM\Software\Windows NT\CurrentControlSet\CurrentControlSet to
determine the OS version as 5.0 or 5.1. This doesn't tell me whether
the machine is XP/2000 professional, or server 2000/2003.
This sounds real easy, but I have been researching this, and, as of
yet, have been unable to locate an efficient way to tell whether the
local machine is a workstation or server. Do you have any suggestions
that will work in a large environment (10000 + workstations and
servers)? Tag: Import LMHOST Tag: 184115
Executing Applications on a Server Through an ASP Page
pardon me if this is a wrong group to post this question...!
I am trying to invoke a batch file on the server using a link/button on the
ASP web page.
I tried
Set WShShell = Server.CreateObject("WScript.Shell")
RetCode = WShShell.Run("C:\test1.bat")
-***-
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd.exe"
Executor.Parameters = "/c c:\test1.bat"
Executor.ShowWindow = False
strResult = Executor.ExecuteWinApp
Neither of them work......
any ideas.....
thanks in advance,
_Uday Tag: Import LMHOST Tag: 184108
How do I remove 8 Characters from the Right of a variable?
How do I remove characters from the right of a populated variable, removing
@bla.com from a UPN for example? Assume variableA = first.last@bla.com
I've tried using things like - variableB = Right(variableA, 8), I know it
returns the last 8 as the variable I'm using - variableB =
StripRightNCharacters(variableA, 8), this one returned nothing so I may be
using it wrong.
I know the characters I want to remove, they are always on the right and
always the same number, and always the same characters, like @bla.com
Everything seems to be geared towards counting from the left and trimming,
but the number of characters on the left change in my example...
Is there a simple function I can call that I'm not seeing?
Thank you,
--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org Tag: Import LMHOST Tag: 184103
Error loging in VBscript
I have a script that is doing a few thing like running out to the web
and unzipping files is there any way to have the script create and send
all error to a log file. Tag: Import LMHOST Tag: 184102
Logging a script timeout
I have a login script that i have set to timeout if it runs for more than 30
secs using wscript.timeout. But now i would like to be able to write this
timeout event to the event log. Is this possible. Tag: Import LMHOST Tag: 184100
OU printing
Below is a printer script I am running through a GPO on an OU, If the
computer and printer are in a top level OU then it works ok. Once the
computer goes into an OU that is one OU level deeper it doesnt work. Have
configured each OU the same as far as printers computers an policies. I just
move the printer and computer to the next OU and it doesnt work. It's like
the script isn't reading deep enough.
DOMAIN.COM
OU 1 (works)
OU 2 (No working)
OU 3 (works)
OU 4 (No working)
Can anyone help?
__________________________________________________________________________________________________________________________
Option Explicit
Dim objWshNetwork '<Windows Script Host Network Object>
Dim strComputerName '<CN= + Computer name string>
Dim strDomain '<Domain Name string>
Dim strLDAPDomain '<String to query the LDAP server>
Dim arrayDomain '<Temp Array>
Dim intCount '<Temp Counter>
Dim objOUPrintQues '<Object to hold the list of Printers>
Dim objPrinter '<Printer Object>
Dim objOUComputers '<List of computer objects>
Dim objComputer '<Computer object>
Dim strComputerOU '<String of the OU the computer is in>
Dim objOUList '<List of OU objects>
Dim objOU '<OU Object>
Dim boolFound '<Flag that the computer is found>
'********************* Very important, change only this
*********************************************************
strDomain = "home.com" '<Enter the Domain name, KEEP THE QUOTES>
' Notes:
' Use the DNS name! ie domain.com
'
'*****************************************************************************************************************
Set objWshNetwork = WScript.CreateObject("WScript.Network") '<Make a new
network object>
strComputerName = "CN=" & objWshNetwork.ComputerName '<Get the current
computer name and add "CN=" to the begining
'strComputerName = "CN=JaysPC" '<Debugger>
strLDAPDomain = "LDAP://"&strDomain '<Set the LDAP string to get all
the AD OU Objects
On Error Resume Next '<Turn on Error Handling>
Set objOUList = GetObject(strLDAPDomain) '<Get all the AD OU Objects>
If err <> 0 Then '<Catch the error, exit if error>
WScript.Echo "Error: " & err.number & " The Domain: "&strLDAPDomain& " was
not found. Check the logon script or network connection. REF:AD Objects"
Set objWshNetwork = Nothing
Set objOUList = Nothing
WScript.Quit
End If
On Error Goto 0
'<---------------------------------------- FIND WHAT OU THE COMPUTER IS
N --------------------------------------------------------------------->
For Each objOU In objOUList '<Step through each OU in domain>
strLDAPDomain = "LDAP://"&strDomain&"/" &objOU.Name '<Add the OU to the
end of the LDAP string>
arrayDomain = split(strDomain,".") '<Break up the domain name into
parts>
For intCount = 0 to ubound(arrayDomain)
strLDAPDomain = strLDAPDomain & ", DC=" & arrayDomain(intCount) '<Add
the search base>
next
On Error Resume Next '<Turn on error handling>
Set objOUComputers = GetObject(strLDAPDomain) '<Get all the objects in
the current OU>
If err <> 0 Then '<Catch the error, exit if error>
WScript.Echo "Error: " & err.number & " The Domain: "&strLDAPDomain& " was
not found. Check the logon script or network connection. REF:OU Objects"
Set objWshNetwork = Nothing
Set objOUList = Nothing
Set objOU = Nothing
Set objOUComputers = Nothing
Set arrayDomain = Nothing
WScript.Quit
End If
On Error Goto 0
objOUComputers.Filter = Array("Computer") '<Filter the objects, only
care about computers>
For Each objComputer In objouComputers '<Step through each computer
in the OU>
If objComputer.Name = strComputerName then '<If the current computer
is in this OU...>
boolFound = TRUE '<Set found to TRUE>
Exit For '<Stop searching this OU>
end if
Next
If (boolFound) Then
Exit For '<Found the computer in this OU, stop searching the OUs>
End If
Next
'<------------------------------------------------------------------------------------------------------------------------------------------------------->
On Error Resume Next '<Turn on error handling>
Set objOUPrintQues = GetObject(strLDAPDomain) '<Get all the objects in
the current OU>
If err <> 0 Then '<Catch the error, exit if error>
WScript.Echo "Error: " & err.number & " The Domain: "&strLDAPDomain& " was
not found. Check the logon script or network connection. REF:Printer
Objects"
Set objWshNetwork = Nothing
Set objOUList = Nothing
Set objOU = Nothing
Set objOUComputers = Nothing
Set arrayDomain = Nothing
Set objComputer = Nothing
Set objOUPrintQues = Nothing
WScript.Quit
End If
On Error Goto 0
objOUPrintQues.Filter = Array("PrintQueue") '<Filter the objects, only
care about printers>
For Each objPrinter In objouPrintQues '<Step through each printer in
OU>
If Trim(LCase(objComputer.Description)) =
Trim(LCase(objPrinter.Description)) Then '<If the printer and computer
description are same>
'<----Descriptions are the same, install the printer AS
DEFAULT ----------------------------------------------->
'WScript.Echo "Adding the printer: " & objPrinter.strPrinterPath & " - as
Default" '<debugger>
SetUpPrinter objPrinter.PrinterPath, TRUE '<Install the Default
Printer>
'<------------------------------------------------------------------------------------------------------------->
Else
'<----Descriptions are different, install the printer
anyway -------------------------------------------------->
'WScript.Echo "Adding the printer: " & objPrinter.strPrinterPath & " - NOT
as Default" '<debugger>
SetUpPrinter objPrinter.PrinterPath, FALSE '<Install the Printer>
'<------------------------------------------------------------------------------------------------------------->
End If
Next
'<-- Clean up memory -->
Set objWshNetwork = Nothing
Set arrayDomain = Nothing
Set objOUPrintQues = Nothing
Set objPrinter = Nothing
Set objOUComputers = Nothing
Set objComputer = Nothing
Set objOUList = Nothing
Set objOU = Nothing
WScript.Quit
'<End of Main Program>
'<---------------------------------------------------------------------------------------------------------------------------------------------------->
Function SetUpPrinter(strPath,boolSetToDefault)
On Error Resume Next '<Turn on error handling>
objWshNetwork.AddWindowsPrinterConnection strPath '<Add the printer>
If err <> 0 Then '<Catch the error, return if error>
WScript.Echo "Error: " & err.number & " The Printer: "& strPath & " was
not found. Logoff and Login again or check the logon script or network
connection. If this persists, restart your server."
Exit Function
End If
On Error Goto 0 '<Turn off error handling>
If (boolSetToDefault) Then
objWshNetwork.SetDefaultPrinter strPath '<Set the printer to default>
End If
End Function
_________________________________________________________________________________________________________________________ Tag: Import LMHOST Tag: 184093
Newbie Needing Help
Hi there Group,
Hope somebody wouldn`t mind helping me out here?
I`ve Created the following VB Script:
Set objShell = CreateObject("WScript.Shell")
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
dDate = Now
sDateTime = Year(dDate) & Right(100 + Month(dDate),2) _
& Right(100 + Day(dDate),2) & "_" & Right(100 + Hour(dDate),2) _
& Right(100 + Minute(dDate),2) & Right(100 + Second(dDate),2)
sFilename = sDateTime & ".zip"
'WScript.Echo sFilename
'Set a Backup job to PKZip
objShell.Run "C:\pkware\pkzip25\pkzip25 -add -path=relative
C:\zips\DataBackups\HFSdata" & sFilename _
& " c:\hfsdata\*.*"
objShell.Run "C:\pkware\pkzip25\pkzip25 -add -path=relative
C:\zips\DataBackups\BomTrans" & sFilename _
& " c:\bomtrans\*.*"
objShell.Run "C:\pkware\pkzip25\pkzip25 -add -path=relative
C:\zips\DataBackups\MyDocuments" & sFilename _
& " c:\Documents and Settings\%USERNAME%\My Documents\*.*"
'Delete OLD Data - This Keeps 7 Days worth of Backups
Set Folder = FSO.GetFolder("C:\zips\DataBackups\HFSdata")
For Each File in Folder.Files
If DateDiff("d", CDate(File.DateLastModified), Now()) > 7 Then
FSO.DeleteFile File
Next
Set Folder = Nothing
Set FSO = Nothing
Set Folder = FSO.GetFolder("C:\zips\DataBackups\BomTrans")
For Each File in Folder.Files
If DateDiff("d", CDate(File.DateLastModified), Now()) > 7 Then
FSO.DeleteFile File
Next
Set Folder = Nothing
Set FSO = Nothing
Set Folder = FSO.GetFolder("C:\zips\DataBackups\MyDocuments")
For Each File in Folder.Files
If DateDiff("d", CDate(File.DateLastModified), Now()) > 7 Then
FSO.DeleteFile File
Next
Set Folder = Nothing
Set FSO = Nothing
What I would like to do is at the end of the running, send e-mail to the
User to Tel Them the Filenames of the 3 Files Created, and Weather of Not
the backup was sucessfull of wether it failed. How would I go about this?
Like i said Im a newbie so would be greatfull if somebody could explain
simply for me?
Many Thanks
NSC Tag: Import LMHOST Tag: 184092
Table querying in ASP
This is a simple question, so sorry for my newbieness. How do I query
data about a html table? Specifically I want to know how many columns
there are currently. I thought something like this would have worked:
<% NumCols = Request("Columns") %>
But it doesn't. Any help greatly appreciated. Thanks.... Tag: Import LMHOST Tag: 184090
QUERY: auto clean VB editor
Is there any way to auto clean indent the VB code? If not, anyone know an
additional 3rd party program to do so? Such cleaning eg. removing trailing
whitespace, formating/correct indentation, etc. Tag: Import LMHOST Tag: 184089
deleting users in AD
Hi
I've written a script to delete some users from Windows 2000 Active
Directory, I would also like to remove their home folders and Exchange
mailboxes.
I'm using the code below:
--------------------------------------------------------------------------------------------------------------------
dim fso
set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.OpenTextFile("C:\temp\DelUser.txt")
Do While not f1.atEndOfStream
strUser = f1.readline
Set objItem = GetObject("LDAP://CN=" & strUser &_
",ou=Management,dc=NA,dc=fabrikam,dc=com")
strprofilePath = objItem.Get("profilePath")
' WScript.Echo "profilePath: " & strprofilePath
strhomeDirectory = objItem.Get("homeDirectory")
' WScript.Echo "homeDirectory: " & strhomeDirectory
fso.deletefolder strhomeDirectory, True
Set objOU =
GetObject("LDAP://ou=Management,dc=NA,dc=fabrikam,DC=com")
objOU.Delete "User", "CN=" & StrUser
Loop
----------------------------------------------------------------------------------------------------------------------------
The code to delete the users works fine (their names are all in a text
file which the script reads). I can also read the users home folder
but I cannot work out a way to delete the folder once it is read. I'm
also unsure as to how to go out about removing the users Exchange
mailboxes as I am deleting them.
Any help greatly appreciated.
Tony Tag: Import LMHOST Tag: 184088
Read csv text file and write new file without header or eof char
All,
Can anyone tell me hoe or provide a sample vb script that will read a
csv text file and write it to a new file without the header and the
end of file character ?
TIA!
cmoorhead@mindspring.com Tag: Import LMHOST Tag: 184080
pc performance troubleshooting
Anyone have a nice script that will report some common config issues /
problems that might affect pc performance? I am thinking vbs version of
PCPitstop or some similar tool. Tag: Import LMHOST Tag: 184076
File extension and ftp problem
I'm sorry for my bad english but I'm Italian...
How I can write a vbs script for search file with "xml" extension and copy
them on a remote machine...
Thank's Tag: Import LMHOST Tag: 184075
Cross site / cross domain question
Hi folks,
I need your help!
I need to set values of a form from a page inside a frameset at other domain.
OR
Take the value of a hidden field value in a form from a page inside a
frameset at other domain.
Thanks in advance. Tag: Import LMHOST Tag: 184073
Replace text within file based on file name
Hello:
I am working on a script that takes a .txt log file and puts it in a
database. I have everything working on this script with the exception of one
small item: Date Conversion (which I am manually doing at this time).
I need to replace the format of the date (YYYY-MM-DD) in the text file to be
the same format as the filename.
Filename:
11-27-2005-PingLogs.txt
Sample text:
2005-11-27 00:00:47,192.168.2.1,Ping: No Response
2005-11-27 00:00:47,192.168.2.1,Ping: No Response
2005-11-27 00:00:47,192.168.2.1,Ping: No Response
2005-11-27 00:00:47,192.168.2.1,Ping: No Response
2005-11-27 00:00:47,192.168.2.1,Ping: No Response
Converted date:
11-27-2005,00:00:47,192.168.2.1,Ping: No Response
11-27-2005,00:00:47,192.168.2.1,Ping: No Response
11-27-2005,00:00:47,192.168.2.1,Ping: No Response
11-27-2005,00:00:47,192.168.2.1,Ping: No Response
11-27-2005,00:00:47,192.168.2.1,Ping: No Response
How can I find each occurrence of the YYYY-MM-DD format and replace it with
the same format in the filename?
P.S. I cannot get the date to export any other way to the log file.
Thanks
CADstillo Tag: Import LMHOST Tag: 184071
newbie: errorhandling on wshshell.regread
dear vbs gurus
the following code reports an error -> invalid root in registrykey, if the
registry key is not existent. why does my error handling not return ->
Function False instead of the error box displayed. thanx alot
tim
snip.........................
If CheckRegKey(strMapNameKey)= True then
MsgBox " Function True "
Else
MsgBox " Function False "
End If
Function CheckRegKey(RegStr)
On Error Resume Next
WshShell.RegRead RegStr
If Err Then
CheckRegKey = False
Else
CheckRegKey = True
End If
On Error Goto 0
End Function Tag: Import LMHOST Tag: 184060
Please critique this HTA (Change Database Remotely)
Hello. As a novice in both VBScript and HTML, I usually find code
snippets, tweak 'em to my specifications, then bolt 'em all together to
accomplish what I need. Like in this case. The following script works
fine, but I'm sure it can be streamlined, corrected, and the redundancy
removed.
This HTA will be used to "change the database" of a remote server,
which involves 3 major tasks:
A. Make specific changes to the Registry (using .REG files)
B. Copy a specific Configuration.xml file
C. Restart IIS
The high level functions of the HTA are as follows:
1. Enter or select a server (opens that server's version.ini file once
selected)
2. Select a "release" (determines the source PATH for the
Configuration.xml and .REG files)
3. Select a "database" (determines the source Configuration.xml and
.REG files to be copied)
4. If the target Configuration.xml and .REG files exist and are Read
Only, remove the Read Only attribute
5. Enable the "Change Database" button only when the server, release
and database have been selected.
6. After the "Change Database" button is clicked and the script is
executed:
- reset all variables
- reset text and list boxes
- disable the "Change Database" button
Some obvious things that I imagine can be addressed:
- The conditional IF statement used to enable the "Change Database"
button...I've had to put it in multiple subroutines. Is there a better
way?
- I'm using the sysinternals.com utility PSEXEC to remotely change the
Registry. Is there a better way?
- I'm using the sysinternals.com utility PSEXEC to remotely restart
IIS. Is there a better way?
- I'm using repeated entries of the HTML " " to insert a large
number of spaces in between text and listboxes. Is there a better way?
Any suggestions would be greatly appreciated. Thanks!
- Dave
Watch for word wrap:
===== BEGIN Change_Database_Remotely.hta ====================
<html>
<head>
<title>Change Database Remotely</title>
<HTA:APPLICATION
ID="HTAUI"
APPLICATIONNAME="HTA User Interface"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximized"
>
</head>
<style>
BODY
{
background-color: buttonface;
font-family: Helvetica;
font-size: 12pt;
margin-top: 2px;
margin-left: 8px;
margin-right: 3px;
margin-bottom: 3px;
}
</style>
<SCRIPT language="VBScript">
Dim strServer
Dim strVersionFile
Dim strRelease
Dim strReleasePath
Dim strDatabase
Dim strNewREGFile
Dim strREGPath
Dim s
Dim r
Dim fso
Dim f
Dim sFILE
Dim objShell
Dim objWshScriptExec
Dim objStdOut
Dim objFSO
Dim strREGFileSourcePATH
Dim strREGFile
Dim strTargetPATH
Dim strEXEFile
Dim strConfigPath
Dim strNewConfigFile
Dim strConfigFileSourcePATH
Dim strTargetConfigFile
Dim strREGImportCMD
Dim strIISResetCMD
Sub Window_Onload
self.Focus()
self.ResizeTo 600,500
self.MoveTo 200,50
' Clear all variables in order for the
' "Enable Change Database button" IF statement to work
strServer = ""
strRelease = ""
strDatabase = ""
End sub
Sub ServerButton
strServer = txtServerInput.Value
strCMD = "notepad"
Set objShell = CreateObject("WScript.Shell")
If strServer = "" Then
strServer = cboServerSelection.Value
strVersionFile = "\\" & strServer & "\D$\Program Files\Adss\Patch
Level\Version.ini"
Set objWshScriptExec = objShell.Exec (strCMD & " " & strVersionFile)
Else
strVersionFile = "\\" & strServer & "\D$\Program Files\Adss\Patch
Level\Version.ini"
Set objWshScriptExec = objShell.Exec (strCMD & " " & strVersionFile)
End If
' Enable Change Database button when all criteria is selected
If strServer <> "" and strRelease <> "" and strDatabase <> "" Then
ChangeDatabase_button.Disabled = False
spServer.InnerHTML = strServer
End Sub
Sub ReleaseSelectList
strRelease = ReleaseSelection.Value
If strRelease = "July" Then
strReleasePath = "July 2005 Release\"
Else
strReleasePath = ""
End If
' Enable Change Database button when all criteria is selected
If strServer <> "" and strRelease <> "" and strDatabase <> "" Then
ChangeDatabase_button.Disabled = False
spRelease.InnerHTML = strRelease
End Sub
Sub DBSelectList
strDatabase = DBSelection.Value
strNewREGFile = strDatabase & ".REG"
' Enable Change Database button when all criteria is selected
If strServer <> "" and strRelease <> "" and strDatabase <> "" Then
ChangeDatabase_button.Disabled = False
spDatabase.InnerHTML = strDatabase
End Sub
Sub ChangeDatabase
' Copy REG.EXE and Database REG file to target server temp folder
strREGPath = "\\ServerName\D$\ASISS Team\Tools\Reg Keys\"
strREGFileSourcePATH = strREGPath & strReleasePath & strNewREGFile
strTargetPATH = "\\" & strServer & "\C$\TEMP\"
strEXEFile = "\\ServerName\D$\ASISS Team\Tools\Batch\Reg.exe"
' Modify the Read Only attribute if necessary
If CreateObject("Scripting.FileSystemObject").FileExists(strTargetPATH
& strNewREGFile) Then
' Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(strTargetPATH & strNewREGFile)
' If the first bit of the attributes byte is set to 1,
' the file is Read Only.
' If this is the case, clear the first bit.
If f.attributes and 1 Then
f.attributes = f.attributes - 1
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile strREGFileSourcePATH, strTargetPATH, True
objFSO.CopyFile strEXEFile, strTargetPATH, True
Set fso = Nothing
Set f = Nothing
Else
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile strREGFileSourcePATH, strTargetPATH, True
objFSO.CopyFile strEXEFile, strTargetPATH, True
End If
' Copy Database CONFIG file to target server Webview folder
strConfigPath = "\\ServerName\D$\ASISS Team\Tools\XML Config Files\"
' Check to see if "TEST" is in the file name
s = "TEST"
r = InStr(strDatabase, s)
If r = 1 Then
strConfigDatabase = right(strDatabase,2)
strNewConfigFile = "Configuration-" & strConfigDatabase & ".xml"
Else
strConfigDatabase = strDatabase
strNewConfigFile = "Configuration-" & strConfigDatabase & ".xml"
End If
strConfigFileSourcePATH = strConfigPath & strReleasePath &
strNewConfigFile
strTargetConfigFile = "\\" & strServer &
"\D$\Inetpub\wwwroot\WebView\Configuration.xml"
' Modify the Read Only attribute if necessary
' Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(strTargetConfigFile)
' If the first bit of the attributes byte is set to 1,
' the file is Read Only.
' If this is the case, clear the first bit.
If f.attributes and 1 Then
f.attributes = f.attributes - 1
End If
Set fso = Nothing
Set f = Nothing
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile strConfigFileSourcePATH, strTargetConfigFile, True
' Change Registry
strREGImportCMD = "Psexec" & " \\" & strServer & " " & "cmd /c
C:\TEMP\REG IMPORT"
Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec(strREGImportCMD & " " &
strNewREGFile)
' Restart IIS
strIISResetCMD = "Psexec" & " \\" & strServer & " " & "cmd /c
C:\WINNT\system32\IISRESET /RESTART"
Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec(strIISResetCMD)
Set objStdOut = objWshScriptExec.StdOut
' Display the output of strIISResetCMD
strOutput = objStdOut.ReadAll
MsgBox strOutput, vbInformation, "Change Database Remotely -
COMPLETED."
' Disable Change Database Button
ChangeDatabase_button.Disabled=True
' Clear variables
strServer = ""
strRelease = ""
strDatabase = ""
' Reset all text and list boxes
txtServerInput.value = ""
cboServerSelection.value = ""
DBSelection.value = ""
ReleaseSelection.value = ""
End Sub
' Cleanup
Set strServer = Nothing
Set strVersionFile = Nothing
Set strRelease = Nothing
Set strReleasePath = Nothing
Set strDatabase = Nothing
Set strNewREGFile = Nothing
Set strREGPath = Nothing
Set s = Nothing
Set r = Nothing
Set fso = Nothing
Set f = Nothing
Set sFILE = Nothing
Set objShell = Nothing
Set objWshScriptExec = Nothing
Set objStdOut = Nothing
Set objFSO = Nothing
Set strREGFileSourcePATH = Nothing
Set strREGFile = Nothing
Set strTargetPATH = Nothing
Set strEXEFile = Nothing
Set strConfigPath = Nothing
Set strNewConfigFile = Nothing
Set strConfigFileSourcePATH = Nothing
Set strTargetConfigFile = Nothing
Set strREGImportCMD = Nothing
Set strIISResetCMD = Nothing
</SCRIPT>
<BODY>
<H2 align="center">Change Database Remotely</H2>
<p align="left"><font face="serif" size="4"><b>Enter or select a server
(it's version.ini file
will open):</b></font><br/>
<align="left">
<input type="text" id="txtServerInput"/><br/>
<align="right">
<select id="cboServerSelection">
<option value="0"></option>
<option value="Server1">Server1</option>
<option value="Server2">Server2</option>
<option value="Server3">Server3</option>
<option value="Server4">Server4</option>
<option value="Server5">Server5</option>
<option value="Server6">Server6</option>
</select><br/>
<button onclick="ServerButton">Submit</button>
<p align="left"><font face="serif" size="4"><b>Select a
release: Select
a database:</b></font><br/>
<align="left">
<select id="ReleaseSelection" onChange="ReleaseSelectList">
<option value="0"></option>
<option value="July">July</option>
<option value="December">December</option>
</select> <select
id="DBSelection" onChange="DBSelectList">
<option value="0"></option>
<option value="TESTAJ">TESTAJ</option>
<option value="TESTAP">TESTAP</option>
<option value="TESTAT">TESTAT</option>
<option value="TESTZB">TESTZB</option>
<option value="TESTZE">TESTZE</option>
<option value="TESTZF">TESTZF</option>
<option value="TESTZG">TESTZG</option>
<option value="TESTZH">TESTZH</option>
<option value="TESTZJ">TESTZJ</option>
<option value="TESTZL">TESTZL</option>
<option value="TESTZS">TESTZS</option>
<option value="TESTZT">TESTZT</option>
<option value="TESTZU">TESTZU</option>
<option value="FPT">FPT</option>
<option value="PIONEER">PIONEER</option>
<option value="Production_Training">Production_Training</option>
<option value="PRODUCTION">PRODUCTION</option>
</select><br/>
<p>
<hr>
<span id =spServer></span>
<p>
<span id =spRelease></span>
<p>
<span id =spDatabase></span>
<hr>
<p align="left">
<input id=ChangeDatabaseButton class="button" type="button"
value="Change Database"
name="ChangeDatabase_button" onClick="ChangeDatabase" Disabled=True>
</BODY>
</html>
===== END Change_Database_Remotely.hta ==================== Tag: Import LMHOST Tag: 184057
Hi,
Is there a way to create a vb script to import LMHOST file automatically?