how do you notify one frame that another is done refreshing?
My question is regarding how to pass variables between frames.
So I have a page with 2 frames, lets say frame A and B. Frame A has a
form with a bunch of text boxes that get filled by an ASP SQL query
and Frame B
simply displays the results of frame A. I'm doing this so that frame
B
does not have to be refreshed.
However, frame A needs to be refreshed to conduct the query and I
can't copy the values into frame B until frame A is done. Does anyone
know of a way to tell frame B that frame A is done being refreshed?
I tried the "onload" method, but it doesn't work because it doesn't
fire during a refresh, only on a new load.
I'm totally stuck and would appreciate any suggestions. Tag: McAfee Update Hour ? Tag: 140234
variables vbs to asp ????
Hello to all,
Someone can you him to tell me recuper how the variable " msg " that gives
me
the state of my buttons of MsgBox under vbs to have him under asp?
Here is my test nothing passes ;o ((
Thank you for advance of your answer.
****************************************************************************
*****************************
<%
Auteur_msg="Daniel"
%>
<Script Language="VbScript">
Dim msg
msg=Msgbox ("ATTENTION, vous venez de recevoir une réponse de "& vbCr &
vbCr &" <% =Auteur_msg&" le "&now()%> "& vbCr & vbCr &"Cliquez sur son
pseudo dans la liste pour lui répondre ",68)
</script>
<%
response.write "msg= "&msg&"<br><br>"
response.write "request.servervariables
msg="&request.servervariables("msg")&"<br><br>"
response.write "Request msg= "&Request("msg")&"<br><br>"
response.write "Request.QueryString
msg="&Request.QueryString("msg")&"<br><br>"
%>
****************************************************************************
******************************** Tag: McAfee Update Hour ? Tag: 140231
GOTO Call in VBS
Is there a way of using a GOTO, for example,
test1 = "test1"
if test1 = "test1" then
goto test2
test2 = "test2" Tag: McAfee Update Hour ? Tag: 140223
dynamic checkboxes without submitting
I am trying to create a page using VBScript and ASP that in a loop
outputs a recordset with a checkbox next to each record, each checkbox
named the same. i need to be able to have the client check one of the
boxes and immediately see one of the values of that record in another
frame. when they check another one it adds that ones value to the
previous ones. if they uncheck the box it needs to subtract that
value. all of this has to be done without submitting it. infact i
dont even have it in a form. most of my problems are coming in
because of clientside/serverside issues.
heres the code i have so far:
<% 'vD_BWP_choose.asp takes the budget information given from
vL_query_BWP.asp and
' combines it with information gathered from
' the database into one recordset and uses it to create a table that
allows the
' user to create their own Best Work Package
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
<!--#include file="resources/script/tp_security.asp"-->
<%
vBudgeted = session("vbudgeted")
vSquareFoot = session("vsquarefoot")
sHull = session("hull")
public sumtotal
sumtotal=0
'creates the record set with all the values
%>
<!--#include file="resources/includes/BWP_createRS.asp"-->
<%
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'recordset created
'create table to view and choose tanks
' Print table header
%>
<table bgcolor='#ffffff' border=1 bordercolor='Black' cellpadding=1
cellspacing=0 width='100%'>
<%' print table
rs.movefirst%>
<tbody>
<%
do while not rs.eof
vtank=rs("tank")
vsides=rs("sides")
vtop=rs("top")
vbottom=rs("bottom")
vtbars=rs("tbars")
vapproxsqft=rs("approx_tank_sq_ft")
vtankcategory=rs("tank_category")
vdrydock=rs("drydock_blasted")
vtotalmoney=rs("totalmoney")
vchecked=rs("checked")
vID=rs("ID")
response.write "<tr>"
response.write "<td align='center' WIDTH=5% ><input type='checkbox'
language='VBScript' name=the checkbox OnClick=Clicked'"&vtotalmoney&"'
></td>"
%>
<td WIDTH=10% ><font class=LittleBlBd><b><img
src=images/redArrow.gif > <a href="vd_tank.asp?t=<%= vtank
%>&H=<%=shull%>" ><%= vtank %></a></b></font></td>
<td WIDTH=5% ><font class=LittleBlBd><b><%= vbottom
%></b></font></td>
<td WIDTH=5% ><font class=LittleBlBd><b><%= vsides
%></b></font></td>
<td WIDTH=5% ><font class=LittleBlBd><b><%= vtop
%></b></font></td>
<td WIDTH=5% ><font class=LittleBlBd><b><%= vtbars
%></b></font></td>
<td WIDTH=10% ><font class=LittleBlBd><b><%= vapproxsqft
%></b></font></td>
<td WIDTH=5% ><font class=LittleBlBd><b><%= vtankcategory
%></b></font></td>
<td WIDTH=10% ><font class=LittleBlBd><b><%= vid %>
</b></font></td>
<td WIDTH=10% ><font class=LittleBlBd><b><%= vtotalmoney %>
</b></font></td>
<%
rs.movenext
loop
%>
</tbody>
</table>
<script language="VBScript">
<!--
sumtotal=0
sub Clicked(vtotalmoney)
'this is where i need to check to see if the checkbox is checked or
not, but it
'doesnt know which one to check i think
'if checkbox.checked then
' sumtotal=sumtotal + vtotalmoney
'else
' sumtotal=sumtotal-vtotalmoney
'end if
'write to the other frame
PARENT.bottom.DOCUMENT.WRITE "<center> Total Money Spent=" &sumtotal&
"</center>"
PARENT.bottom.DOCUMENT.CLOSE
End sub
-->
</script>
<%
rs.close
set rs=nothing%> Tag: McAfee Update Hour ? Tag: 140172
80004005: Probs with firehose and transactions solved by udl
Hello,
I solved a problem we had with some vbscripts accessing MS SQL Server via
ODBC DSN Strings. Transaction sometimes ended in one of the following two
error messages:
Microsoft OLE DB Provider for ODBC Drivers error
[Microsoft][ODBC SQL Server Driver][SQL Server]The COMMIT TRANSACTION
request has no corresponding BEGIN TRANSACTION.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
Can not start transaction while in firehose mode.
Until this point we made use of DSN Strings on the vbscript operating
machine which where defined with odbcad32.exe.
In vbscript code we established connection like this:
set database = Server.CreateObject("ADODB.Connection")
connectString = "dsn=" & odbcSource
database.open connectString
Where odbcSource is the string defined with the ODBC Admin Tool.
After we had mentioned errors we changed this. Somewhere in the webdirectory
I placed a new text file and renamed it to something ending with "udl", e.g.
mysource.udl After double clicking this it is opened by the apropiate tool
(Rundll32.exe >--pathto--<oledb32.dll,OpenDSLFile %1) which allows you
configuring connection properties to desired database.
Then the above lines of VB Code are to be changed to this:
set database = Server.CreateObject("ADODB.Connection")
With database
.ConnectionString = "File name=" & Server.mapPath(">--pathto--<") &
"\mysource.udl"
.Open
End With
And what happens? All above errors disappeared and it runs as desired. In
addition, global.asa can access such udl files, too.
--
Marko Faldix
M+R Infosysteme
Hubert-Wienen-Str. 24 52070 Aachen
Tel.: 0241-93878-16 Fax.:0241-875095
E-Mail: marko.faldix@mplusr.de Tag: McAfee Update Hour ? Tag: 140168
Scripting NTFS Permissions
Hi there,
Have any of you any idea how to handle NTFS permissions w/ scripts ?, I
mean, any script to retrieve all permissions from a tree of folders and then
any other to change them
thanks a lot! Tag: McAfee Update Hour ? Tag: 140141
Recordset in RAM
Hi,
Normally when you show records from a database in a table
in .asp you create connectionstring, recordset and so on.
If the amount of data in the database is small ( < 20000
records) and easily will fit in RAM you could improve
performance dramatically by creating a recordset in RAM
and also do the sorting there as well.
An example:
Dim rstR
Set rstR = Server.CreateObject("ADODB.Recordset")
rstR.Fields.Append "myDate", adDate
rstR.Fields.Append "myAmount, adCurrency
rstR.Open
Now there is a recordset in RAM that can be used, although
empty still.
I also have a normal persistent table (initialised,
connected and named rstX) from where I fetch the records.
With rstX
.MoveFirst
Do While Not .Eof
rstR.AddNew
rstR.Fields("myDate") = .Fields("myDate")
rstR.Fields("myAmount") = .Fields("myAmount")
.MoveNext
Loop
End With
Now the rstR inline recordset in filled up with data.
Let's assume I want to let all sessions in a webapp share
the same inline table (rstR).
It's absolute critical that the rstR inline table should
ONLY be created ONCE on the webserver and that every
session can use it.
Should I use the application object to achive this?
Could someone give me some code and where to initialize
that code?
TIA
/Kenneth Tag: McAfee Update Hour ? Tag: 140139
Passing arrays to VBScript caveat
This is a caveat about passing/returning arrays to VBScript from an "external" source. This was alluded to in my
July 29 post on microsoft.public.scripting.vbscript entitled Returning arrays from a .vbs file. Unfortunately, the
situation seems worse than I originally thought. In that post I gave an example of invoking a VBScript file from
another one and using IE to pass back a result array. Unfortnately, this array seems to get corrupted, at least in
the arrangement that I have. It think even simple numeric values can sometimes not be passed back. The thing that
makes it really bad is that it seems to happen semirandomely.
The summary is that when I return an array from my OCX to the calling VBScript file, it is *sometimes* (but
consistently) corrupted. It especially likes to happen when I return arrays of IE DOM elements.
The fix that works for me is to put all the items from the array into a dictionary as keys (implies an array of
unique elements) and then return theDictionary.Keys array. Still, this is not good behaviour.
Hope this helps someone,
Csaba Gabor from New York Tag: McAfee Update Hour ? Tag: 140133
Type Mismatch ???
Ok, I'm about ready to leap out this office window and just end it all here
and now.......
The issue? I get a type mismatch error when trying to multiply a vbLong *
vbDecimal ( I got the data types by checking the value of the VarType ( 3
and 14 respectively). Now can anyone explain to me why these two (clearly
numerical expressions) can't be multiplied? Using my debugger, I can see
that the actual values are 1 and 120000 respectively.
And another thing, two lines prior to this, I converted both expressions to
Currency by using CCur(expression). However, when I look at the data types
as listed in the debuggers "Locals" window, under "Type", they both show up
as "User-defined Type".
Gee...I wonder if Truck Masters is hiring?
Dave Tag: McAfee Update Hour ? Tag: 140122
Call COM dll from ASP with an OUT variable
Hi,
I need to call a COM dll method with an signature (one
parameter is of OUT type say parameter sId).
This COM dll is in Delphi and this OUT type parameter has
to be a pointer (Delphi requirement). The problem is what
datatype do I use in ASP and how do I get the value of sId
(vbscript doesn't support pointers).
Please provide some suggesstions or directions please Tag: McAfee Update Hour ? Tag: 140121
translate "xcopy /s /d H:\WapRecords| M:\tmpWapRecords\" to vbscript
Hi all,
I have an Access database that once a month goes through a 30 gigs of
text files extracting that month's data. Of the 30 gigs, about 3-4
gigs is recent enough to relate to the last month's bill run.
By running a batch script along the lines of "xcopy /s /d
H:\WapRecords| M:\tmpWapRecords\" I can copy the relevent text files
and run the import in 2 hours as opposed to an overnight run.
The big advantage here is that my import script involves a lot of
dickering about with file headers, trailers, etc. and I wanna be there
in case it bombs out. Having it bomb out of a 14 hour run and then
having to re-run it would involve me having a none too pleasant chat
with the Chief Accountant along the lines of "If we miss month end
bill runs, what is it we pay you for?" Lets whip out those violins
and play a sad tune :-(
Anyway, I want to make the ability to make this functionality
available outside of Access. vbscript looks ideal in that I can use
the same function both in Access and in a desktop applet.
I've never written vbscript but if someone could direct me to a
tutorial or link where I can find out how to do a copy of all files
created/altered after a certain date with their directory structure
intact, I'd be grateful.
Patrick Tag: McAfee Update Hour ? Tag: 140107
works in vb.ide works not in vbscript and vb.exe
in fact i can make it work if i slow it down a bit by placing msgbox after
the verb.doit call...
is there a better solution?
Dim sl
Dim sf
Dim sfi
Dim sfiv
Set sl = CreateObject("Shell.Application")
Set sf = sl.NameSpace("shell:connectionsfolder")
For Each sfi In sf.Items
If StrComp("VMware Network Adapter VMnet1", sfi.Name, vbTextCompare)
= 0 Then
For Each sfiv In sfi.Verbs
If StrComp("En&able", sfiv.Name, vbTextCompare) = 0 Then
sfiv.DoIt
'msgbox("wait")
Exit For
End If
Next
Exit For
End If
Next Tag: McAfee Update Hour ? Tag: 140102
Seconds Parameter
Is there a seconds parameter that I can use for time to count seconds
elapsed, for example, I want to use,
if test1 = test2 then
seconds = 1
end if
usage = test1 - test2
wscript.echo usage (I want usage to be able to display how many seconds has
passed) Tag: McAfee Update Hour ? Tag: 140082
Value of field from other frame.
Hi,
How do you get the value of a field from a different
frame. I want to set up a menu bar on the left and have it
navigate to a different screen based on the values from
some another field in a different frame from the menu
frame.
Thank you,
Brandon H. Campbell
Database Administrator
------------------------------------ Tag: McAfee Update Hour ? Tag: 140073
get files from source control
I'm trying to automate the process to get files from source control in visual studio. I'm trying to find a way method to do this in any language that I can use to create an executable for and call from my main vbScript. Anyone have any insight on this subject? Thanks.
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources... Tag: McAfee Update Hour ? Tag: 140071
Icon Links and Session Objects
Is there a way to use an icon hyperlink and set a session
object?
Let's say we have a page with 3 icons. Each icon is a
hyperlink to 3 seperate pages. I would like to link to a
single page and pass a session object value (let's say 1,
2, or 3). The new, single page would read this session
object value and act accordingly.
Currently I use:
<a href="page1.asp>
<img ... src="icon1.gif" ... >
</a>
three times.
I'm sure there's a simple solution ... but I can't figure
it out!
Thanks. Tag: McAfee Update Hour ? Tag: 140068
GetRef memory leak
I've trying to use VBScript's GetRef in CE.NET 4.1 in order to
dynamically change the onkeypress handler of the window depending on
the current situation. While I have got the system working, I've
noticed a rather significant memory leak during repetitive testing,
and by commenting out the GetRef lines it goes away. Does anyone know
of a leak in GetRef, or do I somehow need to free the memory? I'm not
setting anything to "nothing" (and that doesn't seem to do anything
anyhow) as it's the window.onerror and pagebody.onkeypress handlers
I'm overriding -- or am I mistaken and that can be done? Any help is
GREATLY appreciated!
Richard Boggs Tag: McAfee Update Hour ? Tag: 140061
ADODB and Blobs in asp
In article Q258038 it shows how to read a blob from a
database using ADODB.Stream. I need to do this from asp
without writing a file. Any help would be appreciated. Tag: McAfee Update Hour ? Tag: 140060
NT 4.0 and Exchange 5.5 send e-mail
I need to send an e-mail from an NT 4.0 server running exchange 5.5. I've
tried a few various things that work fine on windows 2000, but not at all on
the NT 4.0 box. Can someone point me in the right direction?
--
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.
Mike Brearley Tag: McAfee Update Hour ? Tag: 140057
Cannot read HKEY_USERS subkeys
Hi all,
I cannot use "EnumKey" for the HKEY_USERS. The script below was
working smoothly with windows 2000 sp3. However, after installing sp4,
it does not run correctly; it enumerates HKEY_CURRENT_USER, instead of
HKEY_USERS. How can I enumerates HKEY_USERS?
const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
const HKEY_USERS = &H80000003
const strIEHomePageKeyPath = "\Software\Microsoft\Internet
Explorer\Main"
const strIEHomePageValue = "Start Page"
const strLogonKeyPath =
"\Software\Microsoft\Windows\CurrentVersion\Explorer"
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = ""
oReg.EnumKey HKEY_USERS, "", arrSubKeys Tag: McAfee Update Hour ? Tag: 140053
Have VBScript save a downloaded CSV file from a link
I have several shortcuts that link to an asp page which creates a CSV
file (based on the arguments that I provide to the ASP page).
Running these shortcuts and saving the files to my disk is now a
manual operation, which I would like to combine in a script, which
would execute each of the ASP pages, and save the resulting files.
However, I do not know how to tell my VBScript that it should press
the "Save this file to disk" button once the dialogue box pops up.
What would be the best technique to solve this problem (if possible at
all).
I am familiar with VBScript, object oriented programming, retrieving
html pages in a script by using Microsoft.XMLHTTP and adodb.stream.
Thanks in advance.
Bert Geenen - Belgium Tag: McAfee Update Hour ? Tag: 140051
Stop / start service
Hello,
I want to do something like this:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Set objServiceset = GetObject("winmgmts:").InstancesOf ("Win32_Service")
for each Service in objServiceset
if (Service.Name = NameService) AND (Service.State = "Running") then
Service.stopService
do while Service.State <> "Stopped"
Wscript.sleep 1000
loop
Service.startService
do while Service.State <> "Running"
Wscript.sleep 1000
loop
End If
next
Set objServiceset = Nothing
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This script stops the Service, but it seems that the Service.State is not
changing. So the script never start the service again. Why is this and what
must I do to get this script working, so the service is stopt and started.
F.Reijsbergen
Koninklijke Bibliotheek
fons.reijsbergen@kb.nl Tag: McAfee Update Hour ? Tag: 140044
Why doesn't my cdonts script send a msg??
Win 2K
Do I need to enable a service?
Dim MyBody
Dim MyCDONTSMail
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "jpmgt@NoSpamsbcglobal.net"
MyCDONTSMail.To= "jpmgt@NoSpamsbcglobal.net"
MyCDONTSMail.Subject="This is a Test"
MyBody = "bla bla bla bla bla " & vbCrLf
MyBody = MyBody & "bla bla bla bla bla " & vbCrLf
MyBody = MyBody & "bla bla bla bla bla "
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing
TIA
JeffP.... Tag: McAfee Update Hour ? Tag: 140043
Worksheets("Sheet1").Copy Before:=
Hello,
I'm trying to figure out how to use the
worksheet.copy function in a vbs script but it generates
an error saying expected statement. The code is below
XLFile = "c:\scripts\test\book1.xls"
Set objExcel = WScript.CreateObject("EXCEL.application")
objExcel.Visible = True
objExcel.Workbooks.Open XLFile
objExcel.Worksheets.Add.Name ="USERSLIST"
objExcel.Workbooks(XLFile).Worksheets("USERSLIST").Copy
After:=Workbooks(XLFile).Worksheets(2)
Any help at all would be greatly appreciated.
Thanks. Tag: McAfee Update Hour ? Tag: 140021
code signing
I have never done this before so I may be way off
base... If I am, please direct me :)
My understanding of the scripting.Signer sign method is
as follows:
----
Dim Signer, UnsignedText, SignedText, fso, SignedFile
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Signer = CreateObject("Scripting.Signer")
UnsignedText = InputBox("Enter the text of the code to be
signed.","Code Signer")
SignedText = Signer.Sign(".vbs",UnsignedText,"Code
Signature","Personal")
'Code Signature is the friendly name on my code signing
certificate.
Set SignedFile = fso.CreateTextFile
("C:\SignedCode.vbs",true)
SignedFile.WriteLine(SignedText)
SignedFile.Close
----
I keep getting an error on the InptBox line. I think it
has to do with accessing the certificate but none of the
documentation I have found on this object is very clear
as to how to access the certificate. It just says "a
string designating the name of the certificate store."
What method do I use to access the certificate or where
do I find the name of the certificate that was issued.
The friendly name is seeming not to be so...
Thanks for any assistance! Tag: McAfee Update Hour ? Tag: 140017
Read each line of a text file in an array
Help
I have a text file which has file locations within it
e.g
C:\Windows\Installer\12314.msi
C:\Windows\Installer\12224.msi
C:\Windows\Installer\13434.msi
I would like to read this text file a line at a time and do something with
each line. I have a function to do what I want, however I do not know how to
read the line act upon it and then get the next line and act upon it.
Can anyone help?
Thanks Tag: McAfee Update Hour ? Tag: 140011
Remote Server.CreateObject?
I would like to create an instance of a COM object in an ASP script where the COM object is installed on a remote machine. Is this possible? If so, can someone point me in the right direction?
Thanks.
Craig Buchanan
______________________________________________________________________________
Crystal Decisions USENET forums at http://www.cogniza.com/support/forums Tag: McAfee Update Hour ? Tag: 140008
continue after reboot...
I'm writing a script that gets the client name, creates a
folder of the client name on a server, then disable the
key and mouse and then I reboot the machine for the mouse
and keyboard to be disabled.
now what i want to do is allow the script to continue
from where it left off at.
how can i accomplish this task?
thanks for your help
thomas Tag: McAfee Update Hour ? Tag: 140002
Automate Source Control
I need to write a vbscript that opens a solution from source control in VS.Net 2003. I can't figure out what object to even use for scripting purposes. Any help please?
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources... Tag: McAfee Update Hour ? Tag: 139996
Almost there but missing a few things
I've currently got this script working to give me several variables that I
need to see. This will be added to our login script and will be captured
into a dump file.
I'm still missing two pieces of information:
1) username of user logging in and 2) cpu/processor output that's better
than what I've got coming back: (Processor: x86 Family 6 Model 8 Stepping 6
CurrentClockSpeed: 993)
And finally, I need to have it dump out to a text file, and have said file
append to have all the data in one file.
Thanks in advance!! ;-)
Script follows:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colSettings
Wscript.Echo "OS Name: " & objOperatingSystem.Name
Wscript.Echo "Service Pack: " & _
objOperatingSystem.ServicePackMajorVersion _
& "." & objOperatingSystem.ServicePackMinorVersion
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
Wscript.Echo "System Name: " & objComputer.Name
Wscript.Echo "System Model: " & objComputer.Model
Wscript.Echo "Total Physical Memory: " & _
objComputer.TotalPhysicalMemory
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_Processor")
For Each objProcessor in colSettings
Wscript.Echo "Processor: " & objProcessor.Description
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each objItem in colItems
Wscript.Echo "CurrentClockSpeed: " & objItem.CurrentClockSpeed
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_BIOS")
For Each objBIOS in colSettings
Wscript.Echo "BIOS Version: " & objBIOS.Version
Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\program files\microsoft
office\office\msaccess.exe")
Wscript.Echo "Name: " & objFile.Name
Wscript.Echo "Path: " & objFile.Path
Wscript.Echo "Size: " & objFile.Size
WScript.Echo "Version: " & objFSO.GetFileVersion("c:\program files\microsoft
office\office\msaccess.exe")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\program files\microsoft
office\office\winword.exe")
Wscript.Echo "Name: " & objFile.Name
Wscript.Echo "Path: " & objFile.Path
Wscript.Echo "Size: " & objFile.Size
WScript.Echo "Version: " & objFSO.GetFileVersion("c:\program files\microsoft
office\office\winword.exe")
Wscript.Echo objFSO.GetFileVersion("c:\program files\internet
explorer\iexplore.exe")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\program files\internet
explorer\iexplore.exe")
Wscript.Echo "Name: " & objFile.Name
Wscript.Echo "Path: " & objFile.Path
Wscript.Echo "Size: " & objFile.Size
WScript.Echo "Version: " & objFSO.GetFileVersion("c:\program files\internet
explorer\iexplore.exe")
On Error Resume Next
next Tag: McAfee Update Hour ? Tag: 139995
Framesets: How to change frames depending on content
Hi,
How do you change the src of a frame depending upon what
the main page displays.
I have a banner top named banner, a left Column named menu
and a right column named main. When the contents of Main
change, I would like to have in the OnLoad event a way to
change the contents of the frame menu. How do I do this?
I tried to use window.frames() but I don't know where to
go from here.
Thank you, Tag: McAfee Update Hour ? Tag: 139993
table
hello, I have a table made up of column and of line, I would like to assign
to a whole of line a value (example: table.rows(4).cells(1 with 4).innerhtml
= "ABC") currently I manage to isolate a cell but not a unit from cell. How
to make thank you? Tag: McAfee Update Hour ? Tag: 139990
Automated Enable of XP Firewall after Sysprep
Hello all-
It seems that, after sysprepping, Windows turns off the internet connection
firewall, which we use quite extensively here at UW-Milwaukee. However, we
want to roll out Windows XP to our campus computer labs.
Is there a way, either through GPO, VBScripting a WMI call, or some other
magic that will let us re-enable this?
Also, are there ways to programmatically control the firewall (such as add
new rules, enable or disable existing rules, etc.)?
Thanks,
chris.
/ Chris Hota (cghota@uwm.edu)
| ITPS Supervisor - (R&D)
| CSC/IT Purchasing & Support
| I&MT/Student Technology Services
| UW-Milwaukee
| Bolton 218 - (414)229-3186
\ Cell Phone - (414)840-4682 Tag: McAfee Update Hour ? Tag: 139981
Login Script
NetWare network with XP and Windows ME clients. Not using client32 due to
client request. I want to create a script that will automatically populate
the logon script property of the logged on user. The clients are in a
workgroup environment.
--
Michael Bell
Bell Consulting Services, Inc.
No emails please. Tag: McAfee Update Hour ? Tag: 139978
delprof utility within vbscripts
This is a multi-part message in MIME format.
------=_NextPart_000_003B_01C3569C.E29EA300
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi All,
I was helping someone in another newsgroup and got a little stuck =
and it is becoming a scripting issue, so I suggested we discuss the =
issue here.
Background
Basically, the writer has about 500 workstation and 2000 users. =
They for various reasons don't use network profiles and everyone uses =
local profiles. What he wants to do is delete from all the workstations =
any profiles that are number and leave any profiles that are letters =
(numeric profiles are the profiles that he wants removed). I came up =
with a script that would look at the subfolders of documents and =
settings and if the folder is a number to delete it and if not to not =
delete it. The problem is that unless the user logs in as an =
admistrator, he doesn't have the permissions to delete the folders. =
Plus as a microsoft person said, "Profiles shouldn't be deleted by =
whacking the "c:\document and settings\UserName" directory". =20
Now DELPROF is a command line utility that could do it. And he can =
even do it remotely. However, there is no way to specify which users =
profiles gets zapped.
The Question
Obviously you can do shell.run to run delprof. There is an option =
(/p) to prompt before deleting each profile. What I was wondering if =
there is a way to take the output and put it into a string and respond =
to the question. For example, if the thing asks should it delete a =
profile, vbscript can see what profile it is asking and then do an =
IsNumeric function and answer y or n at the command line accordingly
Or is there some other scripting solution? I don't know if WMI can =
delete folders like below (which is the script I suggested), but still =
that doesn't solve the problem that supposedly you shouldn't delete =
profiles by goign after the user's in document and settings.
Robert
=20
--=20
--=20
Regardless of whether my signature is long or short, I still welcome =
e-mails if you know my address but won't post it. But on the positive =
side, I don't try and impress by quoting others.
--=20
------=_NextPart_000_003B_01C3569C.E29EA300
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi All,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> I was helping =
someone in another=20
newsgroup and got a little stuck and it is becoming a scripting issue, =
so I=20
suggested we discuss the issue here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Background</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> Basically, the =
writer has about=20
500 workstation and 2000 users. They for various reasons don't use =
network=20
profiles and everyone uses local profiles. What he wants to do is =
delete=20
from all the workstations any profiles that are number and leave any =
profiles=20
that are letters (numeric profiles are the profiles that he wants=20
removed). I came up with a script that would look at the =
subfolders of=20
documents and settings and if the folder is a number to delete it and if =
not to=20
not delete it. The problem is that unless the user logs in as an=20
admistrator, he doesn't have the permissions to delete the =
folders. Plus=20
as a microsoft person said, "<FONT face=3D"Times New Roman" =
size=3D3>Profiles=20
shouldn't be deleted by whacking the "c:\document and settings\UserName" =
directory". </FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Now DELPROF is a =
command line=20
utility that could do it. And he can even do it remotely. =
However,=20
there is no way to specify which users profiles gets =
zapped.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The Question</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Obviously you can do =
shell.run=20
to run delprof. There is an option (/p) to prompt before deleting =
each=20
profile. What I was wondering if there is a way to take the output =
and put=20
it into a string and respond to the question. For example, if the =
thing=20
asks should it delete a profile, vbscript can see what profile it is =
asking and=20
then do an IsNumeric function and answer y or n at the command line=20
accordingly</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> Or is there some =
other scripting=20
solution? I don't know if WMI can delete folders like below (which =
is the=20
script I suggested), but still that doesn't solve the problem that =
supposedly=20
you shouldn't delete profiles by goign after the user's in document and=20
settings.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Robert</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><BR>-- <BR>-- <BR>Regardless of whether =
my=20
signature is long or short, I still welcome e-mails if you know my =
address=20
but won't post it. But on the positive side, I don't try and =
impress by=20
quoting others.<BR>-- <BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_003B_01C3569C.E29EA300-- Tag: McAfee Update Hour ? Tag: 139974
wsh upload puzzle :: fails when accessing server file
Hi Guys,
I would appreciate some help in my age-long struggle to wsh (ftp upload) a
small file (access .mdb) to our remote web host...
It works great when I do the upload from the local drive.
BUT, when I try to upload the file from across the networked server machine
the script hanges WITHOUT generating an error with the cmd.exe line showing:
ftp> ftp> _
Now, I know from past experience that this could be permissions error. But,
If I check the SECURITY for the parent folder I see:
Adminsistrator
Authenticated
Everyone
G Cuadros
Full Contol = yes/ticked
Modify = yes
Read and execute = yes
etc
etc
INHERITABLE PERMISSIONS =yes = allow inheritable permissions is enabled and
ticked
Thus, what is causing the script to hange and not upload the file when I
attempt this across the network towards our remote web host....??
This has been an ongoing battle for me and I really need somebody
knowledgeable to help me get a handle on this.
I have posed my short, full . VBS code below:
'//----------------------------------------
set fso=createobject("scripting.filesystemobject")
set sll=createobject("wscript.shell")
set f=fso.createTextfile("c:\inetpub\wwwroot\catamaranco\upload\put.txt",
true)
with f
.writeline "open site.maximumasp.com"
.writeline "username"
.writeline "password"
.writeline "put F:\Mydocu~1\MARKETING\imagine\databases\Inquiry.mdb"
end with
sll.run "ftp -s:c:\inetpub\wwwroot\catamaranco\upload\put.txt", 1, true
f.close
That's it - but something is making it unstuck and I am receiving no error -
it just hanges towards the end with the cmd.exe remaining open.
I would appreciate your help in solving this problem.
- Jason Tag: McAfee Update Hour ? Tag: 139973
Vbscript question in SQL DTS
In trying to make some changes to a file extract (we are pulling a text file
from another domain into the one our SQL server is in, and then loading a
database from it), we will have the need to "bind" the sets of text files
together.
In other words, for me to know which orderfile goes with which credit file
and shipment files, they'll all have the date appended to the files.
The way it is now, we get:
orderfile.txt which would be named orderfile20030731.txt in the proposed
changes.
tomorrows would be named orderfile20030801.txt and so on.
The other text files would be named in a corresponding manner, so that a
load of creditfile0731 isn't mixed with an orderfile of 0801.
I need to put a step into our existing DTS jobs to take the file, no matter
what the name is, and to rename it (or copy it) to our old filename and have
it be input to the DTS job. Either that, or make the DTS job pick up the
appropriate name.
To complicate matters, we run one database server on monday-wednesday &
friday, and another on tuesday-thursday-saturday.
Is there a way to do this in VBscript from within the DTS job? If so, how?
Any advice appreciated.
Thanks,
Steve Tag: McAfee Update Hour ? Tag: 139969
Regular Expression
Hi NG!
I am searching for a regular expression that matches if a specific
string only contains a-z, A-Z, -, _, and 0-9. Could anyone please tell
me how to do that and, may be, give me a little explanation? I am not
very good at regular expressions, yet. :)
Thanks in advance for any help.
Best regards,
Michael
--
Michael Kremser
business http://www.earthtv.com/
private http://great.dynu.com/ Tag: McAfee Update Hour ? Tag: 139968
Batching emails from a newsletter system
Hi Guys
Wonder if you can help me.
To give you some form of background info, I have created a web-based
newsletter system using ASP, ADO, Access 2000 and your JMail 4.3
component.
This newsletter system has been created so that I can send 1
newsletter to 300+ subscribers every 1 or 2 months. I wouldn't say
this was really hammering an SMTP server - would you?
Our ISP (FastHosts) will only allow 10 emails every 30 seconds or 50
emails every 10 mins. I've checked with FastHosts and they don't
support JMail's '.nq' queuing option, so do you know any other way
round this?
Is it possible to page the subscribers into say batches of 10 and send
these out every 30 secs without me having to do this manually?
Regards
Robbie Tag: McAfee Update Hour ? Tag: 139963
Outlook and Email
Hello,
I know how to do an href to send an email to the person,
but I would like to know how to do this with vbscript. I
have a client table that appears in a form. I would like
to be able to send an email to the client by double
clicking in the field.
Thank you, Tag: McAfee Update Hour ? Tag: 139953
Update Windows with a script
Any know how to run Windows Update (just Critical Updates actually) on a
client machine automatically by a script?
Of course you can set autoupdates to run everynight, only problem is that
users are often logged on as users, and Updates won't install. I suppose I
could just logon as an admin every night at ~3:00 AM, but that seems like a
kluge.
Must be some elegant (oops, sorry, I almost forgot - this is
vbscript...there is no elegance) way to push updates.
Thanks,
Jerry Tag: McAfee Update Hour ? Tag: 139951
VBS Class Issues
In c# this seems to work fine but in VBS it chucks errors,
can anyone explain why and how to correct please.
Class MyClass
Private tall
Private fat
Private Sub Class_Initialize
tall = 100
fat = 100
End Sub
Public Property Get Height
Height = tall
End Property
Public Property Get Weight
Weight = fat
End Property
Public Property Set Height( temp )
If Not IsNumeric( temp ) Then
tall = CInt( temp )
Else
tall = temp
End If
End Property
Public Property Set Weight( temp )
If Not IsNumeric( temp ) Then
fat = CInt( temp )
Else
fat = temp
End If
End Property
End Class
Set test = new MyClass
test.Height = 190
WScript.Echo "Test's Height is: " & test.Height & vbCrlf &_
"Test's Weight is: " & test.Weight Tag: McAfee Update Hour ? Tag: 139948
Get stored text file from access database
Hi !
In vbScript and ASP pages:
I have some code to store files in a database.
now i need to read the binary from the database.
The file is a text file and i need to be able to parse the file, like
do until EOF
some parsing here...
loop
It's easy to save the file to harddisk or display it in a browser. but how
can i place the text file in say an Array and programmatically loop the
array?
I hope it's possible, Thanks!!
Best regards
Jesper Harder
jh-spamremove-at-gts-dk Tag: McAfee Update Hour ? Tag: 139947
Install of VBScript components causing problem?
I recently installed and began using VBScript. Now when I boot I get a
cryptic message
XAUpdate.exe
Cannot find entry SHGetSpecialFolderPathA ... not in SHELL32.dll ...
It appears not to affect the system (after clicking OK), but I wonder if the
install of Scripting caused this?
I noted a post from Michael Harris that IE4 Desktop Update must be done.
Checking on that in KB, it appears that it can't be done without
uninstalling IE5.5 and reinstalling. I truly don't want to bother. My
shell32.dll is version 4.00 and this appears to be too old.
Any lazy way out?
--
Gary Tag: McAfee Update Hour ? Tag: 139944
Hi all,
Where can i found the McAfee Update Hour, for exploit in a vbs script ?