GetFile Problem with network drives
I'm running into the following problem and I was hoping someone can
help.
I have the following code snipet in a script I'm running from a DOS
prompt.
----------------------------------
qDriveFileName = "\\cgshare\share1\version.dat"
Set filesys = CreateObject("Scripting.FileSystemObject")
if filesys.FileExists(qDriveFileName) then
'Get a reference to the file
Set qDriveFile = filesys.GetFile(qDriveFileName)
if Err.Number <> 0 then
MsgBox "Error: " & Err.Number & ", " & Err.Description
wscript.quit
else
qDriveDate = qDriveFile.DateLastModified
end if
end if
---------------------------------
the FileExists returns true but the getFile give me error 53, File Not
Found. Anybody know what's going on here? I tried searching through
Google but couldn't find a solution. This code seems to work fine
when I'm dealing with local drives.
-- Mark Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159517
problems with activex object taking the top focus when creating a
Hi,
I`m trying to develop a menu system for one of my apps, the problem lies in the fact that there is a graphing activex control on every page.
Normally I would just create a menu using divs. But the activex object always takes the top focus and the index-z properties have no effect. After a bit of looking around I found that it's not possible to change the properties of an object in that way.
So I thought I could use window.createpopup to create multi windows for the menus. So far though I can only seem to keep one window on the screen at once.
Again after some reading it seems that once you move away from the popup the popup disappears automatically. I`m trying to write a heriachal menu system where the previous options stays as you navigate across, (the same as the microsoft menu system).
Anybody else having / had this problem or know of a way around this? I`m using vbscript for the client side of things.
thanks.
Scot. Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159515
problems with activex object taking the top focus when creating a
Hi,
I`m trying to develop a menu system for one of my apps, the problem lies in the fact that there is a graphing activex control on every page.
Normally I would just create a menu using divs. But the activex object always takes the top focus and the index-z properties have no effect. After a bit of looking around I found that it's not possible to change the properties of an object in that way.
So I thought I could use window.createpopup to create multi windows for the menus. So far though I can only seem to keep one window on the screen at once.
Again after some reading it seems that once you move away from the popup the popup disappears automatically. I`m trying to write a heriachal menu system where the previous options stays as you navigate across, (the same as the microsoft menu system).
Anybody else having / had this problem or know of a way around this? I`m using vbscript for the client side of things.
thanks.
Scot. Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159514
Capital Letters or Uppercase Letters
I was using this script four four years and it worked until I changed my Page.
<TD Width="3%"><Span Style="Text-Transform: Uppercase"><INPUT TYPE="Text" Name="txtPosA" Size="2" MaxLength="2"></Span>
Does anyone know what change was made for why this script no longer works?
Tnanks in Advance
Bill Barber Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159512
VBScript & Windows Media Services?
Is it possible to start a Windows Media Services publishing point
using VBScript? I found the following Visual Basic .NET code example
which will start a publishing point, but I've been unsuccessful in
converting it to vbscript.
------
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
' Declare variables.
Dim Server As WMSServer
Dim BCPubPoint As IWMSBroadcastPublishingPoint
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve a broadcast publishing point.
BCPubPoint = Server.PublishingPoints.item ("Test")
' Enable the archiving plug-in.
BCPubPoint.BroadcastDataSinks.Item("WMS Archive Data
Writer").Enabled = True
' Initialize the publishing point and start broadcasting.
BCPubPoint.Start()
' Start archiving the broadcast data locally for rebroadcast.
BCPubPoint.StartArchive()
Catch errCom As COMException
' TODO: Handle COM exceptions.
Catch err As Exception
' TODO: Exception handler goes here.
Finally
' TODO: Clean-up code goes here.
End Try
---------
TIA,
Joseph Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159504
VBScript & Windows Media Services?
Is it possible to start a Windows Media Services publishing point
using VBScript? I found the following Visual Basic .NET code example
which will start a publishing point, but I've been unsuccessful in
converting it to vbscript.
------
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
' Declare variables.
Dim Server As WMSServer
Dim BCPubPoint As IWMSBroadcastPublishingPoint
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve a broadcast publishing point.
BCPubPoint = Server.PublishingPoints.item ("Test")
' Enable the archiving plug-in.
BCPubPoint.BroadcastDataSinks.Item("WMS Archive Data
Writer").Enabled = True
' Initialize the publishing point and start broadcasting.
BCPubPoint.Start()
' Start archiving the broadcast data locally for rebroadcast.
BCPubPoint.StartArchive()
Catch errCom As COMException
' TODO: Handle COM exceptions.
Catch err As Exception
' TODO: Exception handler goes here.
Finally
' TODO: Clean-up code goes here.
End Try
---------
TIA,
Joseph Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159503
Getting version of Microsoft.XMLHTTP object prior to ADOB.Stream?
I'm _totally_ new at creating ADOB.Stream objects, etc. - and I've been able
to succesfully implement the code that Tom Lavedas supplied to me.
However, my question is this:
I also want to utilize this code to download the McAfee program, and I need
it to check the remote exe contained in the url for it's current version.
If the version on the server is newer than what I have in my folder, then I
want it to go ahead and download it.
I've had no luck in finding any information on how to pull the XMLHTTP
object version. Anyone have any ideas and know what the correct
properties/methods are to get such information?
Rob Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159502
Commas in the CN name
I am using scripts to create user logins in AD with Windows 2003 domain
controllers. When I try to create a user with the CN name being something
like "Blow, Joe" my script chokes. I can create a login with a CN name of
"Blow Joe", with a space, but not a comma. I get the rror message "Active
Directory: An invalid Active Directory pathname was passed." Same problem
when I try to read a specific CN that has a comma in it with a script. The
script chokes.
However, if you create a login using the utility Active Directory Users and
Computers, by default the CN name is created in the form of "Blow, Joe."
Also you can go in on the gui and manually change the CN name to contain a
comma.
Any suggestions on how to create a CN name with scripting? Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159500
Need to Display Heights of Individuals Corrcetly
I Can Enter the Heights of Individuals Correctly and it goes into Databases Correctly.
Examples 5'11", 5'9" and VWXYZ.
When I go to Display them on the Page for the school district police department they display as:
5'1, 5'9 and VWXYZ.
Does Anyone know why is the Double Quote " Will Not display?
Thanks in Advance
Bill Barber Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159499
newbie:arays in active x scripts
We are trying to import a binary file to a database table based on logic.To
do so, I am using stream functions and read the data into an array .How do I
read the array containing byte data .Here is an part of the script :
Dim CDTable
Dim s
Dim Buffer
Dim version
Dim FileName
Function Main()
fname="C:\Documents and
Settings\Pooja\Desktop\ConvergentGDRQ_05011200.CDR"
Set s = CreateObject("ADODB.Stream")
Const adTypeBinary = 1
'Open up the table for reading
s.Open
s.Type = adTypeBinary
s.LoadFromFile (fname)
'Determine the version
Buffer=s.Read(4)
'This part gives me error "type mismatch ' . It does not accept Buffer(0)
or anything.
If (buffer(0) = CByte(0) And buffer(1) = CByte(3) And buffer(2) = CByte(0)
And buffer(3) = CByte(0)) Then
version = 1
Else
version =0
End If
Main = DTSTaskExecResult_Success
End Function
Thanks,
Pooja Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159495
PSEXEC fails when doing a NetStat inside a vbscript
I am trying to run a netstat using psexec and wsh's
WScript.Shell. I keep getting the following error:
netstat.exe exited on ServerName with error code 1.
If I run the exact psexec command from the command line on
my machine(against another machine) it works just fine,
but as soon as I embed the whole thing in vbscript I get
the error above. Below is a summary of what I am doing.
Any help would be greatly appreciated!!! Thanks.
Mike
command_exec = "psexec.exe"
cmdNetStat = "-s netstat.exe -a " & Chr(124) & " find " &
Chr(47) & "C " & Chr(34) & ":33569" & Chr(34)
Set objStdOut = WScript.StdOut
If WScript.Arguments.Count > 0 Then
strComputer = WScript.Arguments.Item(0)
Else
strComputer = "."
End If
strPath = command_exec & " " & "\\" & strComputer & " " &
cmdNetStat
Set objWshShell = CreateObject("WScript.Shell")
Set objExec = objWshShell.Exec (strPath)
Set objStdOut = objExec.StdOut
strResult = objStdOut.ReadAll
WScript.Echo strResult
Set objExec = Nothing
Set objWshShell = Nothing
Set objStdOut = Nothing Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159493
Killing a Shelled Oracle SQLPlus Process
I have a VBS script running as a scheduled task once a
minute on a Win2K server which connects to a database
(populated from an intranet site) and checks for new jobs
to run in Oracle SQLPlus. My job table looks like this:
JOB PROCESSED SUBMITTED_BY
=============================================
interface1.sql Y user1
interface1.sql Y user2
interface2.sql Y user2
interface1.sql N user1
The idea is that if an outstanding job is found
(PROCESSED = N) then the script processes it by running
the following function and passing the name of the JOB
(SQL file) to it.
Function processRequest(jobName)
Dim wshShell
On Error Resume Next
Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.Run "SQLPLUS user/password@database @" & _
jobName, 0, True
Set wshShell = Nothing
If err.number = 0 Then
processRequest = True
Else
processRequest = False
End If
On Error Goto 0
End Function
After the job is processed (usually 2 or 3 seconds) the
job is flagged as process and the user is sent an email.
This all works fine.
HOWEVER! The problem I have with it, is that if I pass it
a Job that doesn't exist or is full of crap (for testing)
I get two process that sit there doing nothing (WScript
and SQLPLUS.EXE) and the whole script stops. The WScript
process gets killed after 1 minute by the task scheduler
automatically, but the SQLPLUS.EXE process never gets
killed unless I go in and kill it manually.
I am therefore trying to find a way to avoid this so that
the script can manage itself. Does anyone have any
suggestions on how this could be done? Or is there anyway
I can monitor SQLPlus to see if its stopped, or force it
to close?
TIA,
Colin Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159488
How to automate data input to Word template with VBScript
Can someone tell me how to use VBScript to populate a word document
with data automatically? Im putting a legal template together with a
bunch of contract stipulations and I'd like to be able to popup a
window and have each item be able to be checked by the user, then all
items with a check mark are sent to a new legal template and populated
in the appropriate sections of the template using Word bookmarks.
I've sucessfully used the Doc.Bookmark object to get data from the
user via Input boxes and populate a Word template, but popping up
windows with each contract item and asking the user yes/no if they
want to include it would be messy.
Any help would be most appreciated, thanks in advance!
Randy
randy-george@comcast.net Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159481
database access error
I am trying to access database from VBScript, just want to append a record
I have setup my dsn TC to point to taget database (\\...\....mdb).
I used following code and it says "Error, obejct requrited"
table name is "TC_Area" and field names are "TC_Area_Number", and "Area
Name"
Set conn = Server.CreateObject("ADODB.Connection")
'conn.Open "DSN=TC;uid=;pwd="
SQLStmt = "INSERT INTO TC_Area (TC_Area_Numbe, Area
Name)VALUES('02','My test')"
Set RS = conn.Execute (SQLStmt)
set rs = nothing
conn.Close
set conn=nothing
Thanks Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159476
Problem reading a DWORD key in XP
I am trying to retrieve the current value of the ExplorerFlags entry, which
is either 16 or 34 in decimal.
But the result I get with the code below is always 0! Any help would be much
appreciated.
TIA Phil
KeyToRead = "HKCR"
SubKey = "\Folder\shell\open\ExplorerFlags"
WshShell.PopUp KeyToRead & SubKey ' = HKCR\Folder\shell\open\ExplorerFlags
ValueToRead = WshShell.RegRead(KeyToRead & SubKey)
WshShell.PopUp ValueToRead ' return 0 instead of either 16 or 34 Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159474
VBScript how to call different pages
I'm writing a VBScript - all is going good, but it is getting extremely long.
I would like to know how I can "break up" some of this code.
There are some parts of it that I would like to put in a different page.
---page1.vbs
dim intCNT
intCNT = 6
call page2.vbs (pass variable intCNT to page2.vbs)
handle returned value from page2.vbs
---page2.vbs
MsgBox "hi - I'm here on page2.vbs" & intCNT
intCNT = 15
return back to page1.vbs (return "new" value of intCNT)
Can anyone show me what I will need to do to accomplish this?
Thanks in advance... Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159470
Help! How do i make this wav file play until stopped?
I have this script which makes a wav file play whenever somethign is
printed. Now I need it play that wav file over and over until someone
presses "OK" or hits stop or something. Can anyone modify my code so
that happens? Please help thanks.
Here is my script:
*****************************
Option Explicit
Dim strComputer, strTargetPrinter, strWaveFile, i, j, LoopVariable
Dim objWMIService, objPrintQueue, colPrintQueues, objShell
Const PAUSETIME = 500
strTargetPrinter = "LABSTAT"
strWaveFile = "c:\statlabelsoundscript\buzzer.wav"
LoopVariable = 1
Do Until LoopVariable = 0
strComputer = "LABDESK"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colPrintQueues = objWMIService.ExecQuery _
("Select * from Win32_PerfFormattedData_Spooler_PrintQueue Where
Name = '" & strTargetPrinter & "'")
For Each objPrintQueue in colPrintQueues
If objPrintQueue.Jobs <> "0" Then
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "sndrec32 /play /close """ & strWaveFile &
"""",0,True
Set objShell = Nothing
Wscript.Echo "Name: " & objPrintQueue.Name
Wscript.Echo "Current jobs: " & objPrintQueue.Jobs
End if
NEXT
Wscript.Sleep PAUSETIME
LOOP
********************************************8 Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159469
"Potential Scripting Violation" pop-ups for Dig. Certificates
Hi I am trying to write a script, that would involve issuing certs.
Whenever a cert is issued a 2 windows pop-ups entitled "Potential Scripting Violation" always appear. I am wondering if the title of this box suggest it impossible to script issuing certificates, or whether it is possible through act to somehow sendkeys to select yes on these dialogs.
Thank You Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159468
Arjen Jongeling, een oude bekende
Hoewel, Arjen Jongeling is hier nog nooit geweest en ik denk dat Arjen Jongeling hier ook nooit meer zal terugkomen. Sterker nog, Arjen Jongeling zit hier helemaal fout. Maar ja, het doet het goed in de Google archieven. Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159467
AllUsersStartup in Windows 98
I'm writing a script that lists all programs in the Startup folders in
any Windows version in any language. With the SpecialFolders
collection, this is relatively easy to do, with _one_ exception --
AllUsersStartup under Windows 98. For W98,
SpecialFolders("AllUsersStartup") returns an empty string, but in the
U.S. version of W98, any shortcut in %WINDIR%\All Users\Start
Menu\Programs\Startup _will_ launch when W98 starts up. Since the
spelling of "All Users\Start Menu\Programs\Startup" is
language-dependent, is there any way to find the location of shortcuts
in this folder via VBS in W98?
regards, Andy
--
**********
Please send e-mail to: usenet (dot) post (at) aaronoff (dot) com
********** Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159465
How to convert from ColdFusion?
I have taken over an application conversion from Cold Fusion to ASP and this
involves some LDAP work ...
I'm trying to determine how to make these conversions from Cold Fusion
<cfldap action="QUERY"
name="getDN"
attributes="cn,dn,givenname,sn,telephonenumber,orgpersonmanagersname,
manager"
start="ou=employees, o=ACME"
scope="SUBTREE"
filter="(&(objectclass=*)(uid=#username#))"
server="directory.acme.com"
secure ="cfssl_basic"
port = "636">
<cfset mgrname = listfirst("#getDN.orgpersonmanagersname#")>
<cfset mgrname = removechars(mgrname, 1, 4)>
<cfldap action="QUERY"
name="getmgr"
attributes="cn,dn,givenname,sn,telephonenumber, uid"
start="ou=employees, o=ACME"
scope="SUBTREE"
filter="(&(objectclass=*)(uid=#mgrname#))"
server="directory.acme.com"
secure ="cfssl_basic"
port = "636">
I was told ADSI was the way to go. But everything I've tried has been
unsuccessful.
Any pointer, insights, help would be most appreciated.
BBB Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159463
WMI + StdRegProv + REG_MULTI_SZ = no worky
I can't figure out why this isn't working (code below). Do I need to enum
the keys values first and get the data from the enumerated array or does it
just not work? I have other scripts like this that work fine only they get
other value types (REG_SZ, REG_DWORD, etc.). I've done test runs on a few
PCs, a few keys, and a few REMOTEs all with the same result (result below
code).
'---Start Code---
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
strComputer = "REMOTE"
'Get OemDuplicatorString
'==========
Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
sBaseKey = "SYSTEM\Setup\"
sValueName = "OEMDuplicatorString"
oRegistry.GetMultiStringValue HKLM, sBaseKey, sValueName, sValue
Wscript.Echo "OEMDuplicatorString: " & sValue
'---End Code---
'---Start Result---
Line: 11
Char: 4
Error: Type mismatch
Code: 800A000D
Source: Microsoft VBScript runtime error
'---End Result---
Any help is appreciated.
UNoHu Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159458
connected PC's/logged in users
Hi all,
Is it possible using vbscript to either list all logged on users on a
domain, OR get all connected PC's to a domain (W2K) - like when you
open up Network PLaces on your PC
I've already tried solutions involving LanManServer (for the users) or
listing all machines in a domain - I specifically need either all
logged on users or all connected machines (this is in order that net
sends (for an intranet messaging app) won't have to timeout when a
user/machine can't be found on the network - this is important when
sending out ~200 messages!)
Any help would be gratefully appreciated - have been scouting the
groups for a while with no success.
TIA,
rois. Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159457
New To Scripting - running script based on username
Hi,
I am new to scripting, and trying to find some code or the right syntax.
Just trying to create a script that would check the name of the user logging
on, and based on their username, goto or execute a different part of the
script.
Basically, if any part of the username has TEMP. Then the script should goto
a different step etc..
I hope this makes sense?
Tomi Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159455
implicit type coercion
hi there:
simple question :
Whey is that when
a=5
b="10"
c=a+b
msgbox typename(c)
returns double
but with a=5
b=10
c=a+b
msgbox typename(c)
returns integer
thanks
Biju Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159454
get ip adress
How can i catch the ip adress with vbscript and
use it to map my network drives ? Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159453
Remove Volume control icon
Does any know how to remove volume control in system tray with script? I
know how to do it manual by going in Sound and audio Devices and un-check
"Place volume icon in task bar". I like to do it with script. Thanks in
advance. Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159451
Excel Find/Replace Hyperlinks
Hi,
I have many Word documents and Excel spreadsheets that have links to an
intranet server database. This database has now moved to a new intranet
server with a different name.
I have a working vbscript that will open all Word docs and replace all old
hyperlinks with new. I now need to do the same with the Excel spread sheets.
I can modify the script to find and open them but I cannot find any way of
doing a global find and replace.
If I record a macro in Excel it gives me:
Cells.Replace What:="iisold", Replacement:="iisnew", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:= _
False, ReplaceFormat:=False
but I am lost as to achieve this from the script.
Any help appreciated.
RogerC Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159449
SendKeys In ACT 1.0
is there anyway I can use the SendKeys method in ACT?
if not
does act have a similar method? Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159445
Download file from Microsoft Bulletin page via vbscript?
Say I want to script an automatic download of a certain hotfix from
Microsoft's website (our remote sales people are bad at following
instructions).
I can write a script to go to a certain bulletin page, but I'd like it to
automatically download the file from the page instead.
For example:
http://www.microsoft.com/downloads/details.aspx?familyid=FF84E1A5-C90D-40F2-8CF5-23DA3AB296B4&displaylang=en
I'd like to pull the file from the download button here. Is there a way to
do this via vbscript?
Rob Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159443
Capturing Command Line Utility Output in VB6
Hi there
Got a need to run a command line utility and capture the output in my VB6
program.
I know I could used the WScript object and get the STDOUT data via a
textstream (all nice and neat)...HOWEVER....
Using the .exec method causes a DOS window to flick on/off.
Does anyone know a way that I could use WScript to run a command line
utility (so I can get the output in an ordered fashion) but NO window
showing.
The .run method (like shell) allows for a hidden window...but not easy to
get the output (or is it? Anyone know a good way...please let me know).
Any help much appreciated
Many thanks
Mike Finister Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159441
Automatically Populate Username and Password in Ie Windows Authentication Input Box
We are trying to automate the process of getting shipping rate quotes
from various shipping company web sites. Some of the web sites
present an input dialog box asking for a username and password when
you click login. (For example: when I navigate to
http://www.myyellow.com there is a logon link. When I click on the
link a separate authentication input box entitled "Connect to
www.myyellow.com" pops up and has a username field and a password
field. http://www.roadway.com does the same thing)
Is there anyway to programmatically populate the windows
authentication input box username and password field automatically
without using SendKeys? If so, does anybody have some example code
for doing this?
Thanks in advance,
Shawn Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159439
Parsing MSSecure.xml for a child node when the parent node is known, using vbscript
Ok, I'm parsing a shavlik output xml file (using HFNETCHK), which lists a
series of hotfixes that are not installed on a PC. I can successfully read
nodes/values from this XML file with no problems.
I am attempting to cross-reference two values from the output xml file - as
my script parses the output xml, it finds out
a) missing bulletin IDs
b) hotfix exe for each bulletin ID
In my function that is called when each missing patch is parsed, I wish to
pull information from mssecure.xml using those two parameters as identifying
selectors(?).
The end result is that I want to find out the patchlocationID from
mssecure.xml for that appropriate bulletin ID where it matches the patchname
(hotfix exe).
So, for example, my input parameters might be (BulletinID) MS02-055, and
(PatchName) Q323255_WXP_SP2_x86_ENU.exe.
I can get my script to select the appropriate bulletin ID node from the
mssecure.xml file, but I can't seem to get it to bring me the values of
certain child nodes and their attributes.
There are about 2 or 3 total patch nodes that appear under Bulletin, but
this is the one that I want it to find and return "PatchLocationID" for.
Anyone?
<BulletinDatastore DataVersion="1.1.2.115" LastDataUpdate="6/8/2004"
SchemaVersion="1.0.0.11" LastSchemaUpdate="6/1/2004" ToolVersion="4.0"
MBSAToolVer="1.1.1"
MBSAToolURL="http://www.microsoft.com/technet/security/tools/Tools/MBSAhome.
asp" EIToolVer="2.2.0" RevisionHistory="Shavlik MSSecure XML File" Fmt="MS"
SWLABR="blahblah">
<Bulletins>
<Bulletin BulletinID="MS02-055" BulletinLocationID="73" FAQLocationID="73"
FAQPageName="FQ02-055" Title="Unchecked Buffer in Windows Help Facility
Could Enable Code Execution (Q323255)" DatePosted="2002/10/02"
DateRevised="2002/10/02" Supported="Yes" Summary="Big ass description"
Issue="">
<BulletinComments/>
<QNumbers>
<QNumber QNumber="Q323255"/>
</QNumbers>
<Patches>
<Patch PatchName="Q323255_WXP_SP2_x86_ENU.exe" PatchLocationID="1502"
SBID="0" SQNumber="Q323255" NoReboot="1" MSSeverityID="1" BugtraqID="5874"
CVEID="CAN-2002-0693">
<PatchComments/>
<AffectedProduct ProductID="120" FixedInSP="0">
<AffectedServicePack ServicePackID="158"/>
<AffectedServicePack ServicePackID="216"/>
</AffectedProduct>
<AffectedProduct ProductID="121" FixedInSP="0">
<AffectedServicePack ServicePackID="158"/>
<AffectedServicePack ServicePackID="216"/>
</AffectedProduct>
<FileChgs>
<FileChg FileChangeID="2114"/>
</FileChgs>
<RegChgs>
<RegChg RegChangeID="1314"/>
</RegChgs>
</Patch>
</Bulletin>
</Bulletins> Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159431
Success creating remote folders... now I want to share the folders
Hello,
I've looked through previous posts and I've seem lots of discussion
regarding remotely creating folders... that's not the problem, I can
create them no problem but my question is how do I share the newly
created folders???
Here's a snip of the code...
1. Dim computerName = "oaw1"
2. Dim folderName = "Scenarios"
3. Dim shareName = "Scenarios"
4. ' I suppose I could just use one of the two variables twice in
line 14.
5. const FILE_SHARE = 0
6.
7. Set FSO = CreateObject("Scripting.FileSystemObject")
8. If Not FSO.FolderExists("\\" & computerName & "\c$\" & folderName)
Then
9. FSO.CreateFolder("\\" & computerName & "\c$\" & folderName)
10. End If
11.
12. Set objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
computerName & "\root\cimv2")
13. Set objNewShare = objWMIService.Get("Win32_Share")
14. makeShare = objNewShare.Create (folderName, shareName,
FILE_SHARE, , "Test Comments")
I'm good through line 10. I don't get any errors at all from this
script but when I go to the remote computer (oaw1), right click on the
newly created "Scenarios" folder, and select the Sharing tab from the
properties, the folder is not set to be shared.
Any suggestions on how to get the remote folders shared from this
script would be greatly appreciated.
Thanks,
--CW Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159430
paging in ASP - VBScript
hi,
I have a recordset that has about 200 records and I want to only display 20
records at a time. Is there a simpler way to do this other than inserting a
for loop?
thanks
rafael Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159428
Find Julian Date
Hello,
Is there a way to find the Julian Date using VBScript?
Thanks,
Andy. Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159426
Desperate need for help controlling the browser
Hello,
I have a web app that needs the follwing settings
Tools/internet options/settings/
Check for newer versions of stored pages.
I can not rely ont the users to do this.
Is there any way to did this programatically?
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159425
Using WSH Objects in ACT 1.0
I want to use a WSH object in Microsoft ACT 1.0. It doesnt naturally recognize the objects/methods, what do I need to include to get it to work? Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159423
Evaluate as Variable versus String?
Hey gang, I am probably missing something basic.
I have a bunch of arrays in one of my ASP scripts, and I need to construct
the reference to the variable through some string contatenations.
Example:
- one of my variables is 'strQ1a(13)' and earlier in the script I assign a
value.
- I construct the name of this variable through code like
response.write="str" & myQuestionNumber & "(" & myrs.fields("value") & ")"
- VBScript just evaluates this as a string and rather than displaying the
value of variable strQ1a(13), it justs displays "strQ1a(13)"
How can I get it to look at this as a variable and get the name? Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159422
Check User/Passwords with access to registry
Hello,
I want check the users and groups with have access to one registry
key. ¿How can i do this with vbscript?. I saw script in TechNet Script
Center, but it only show if "I" have access or not.
Thanks. Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159421
Reading from the registry
Hi,
Is there a way to export a registry key other than using
oShell.exec("cmd /C regedit.exe /e "& (sPath) & .....?
I have to export a few reg keys and using the exec method works fine for me
but some of the keys have a space in their name and that's where the exec
method fell.
Thanks,
Yaniv Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159417
Help running sql statements in vbscript
Hi all,
i am trying to run the following sql code from within vbscript
without any success; i can happily run simple select statements with
an ADO connection, but how do i pass this lot in? I cannot put it in a
file and execute because I need to replace MYDB with values already
returned by sql statements.
Any help much appreciated.
Thanks in advance.
Andy
DECLARE @DBNameVar VARCHAR (50)
DECLARE @DBIDVar VARCHAR (25)
DECLARE @Process2Kill VARCHAR (50)
DECLARE KillSpid CURSOR FOR SELECT sysprocesses.spid,
sysdatabases.name AS DatabaseName, sysdatabases.dbid AS DatabaseID
FROM sysdatabases
INNER JOIN sysprocesses ON sysdatabases.dbid = sysprocesses.dbid
WHERE (sysdatabases.name LIKE 'MYDB%') OR (sysdatabases.name LIKE
'40%')
OPEN KillSpid
FETCH NEXT FROM KillSpid INTO @Process2Kill, @DBNameVar, @DBIDVar
WHILE (@@FETCH_STATUS = 0)
BEGIN
PRINT N'CHECKING DATABASE... ' + @DBNameVar
DECLARE @Stmt VARCHAR (250)
SET @Stmt = ('KILL ' + @Process2Kill)
--PRINT @Stmt
EXEC (@Stmt)
PRINT 'Process ID ' + @Process2Kill + ' has been terminated...' +
CHAR(13) + CHAR(13)
FETCH NEXT FROM KillSpid INTO @Process2Kill, @DBNameVar, @DBIDVar
END
CLOSE KillSpid
DEALLOCATE KillSpid
GO Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159415
searching active directory using username
Hi all.
Is it possible to search active directory using a username. I have wrote an asp script that retrives user account details based upon their surename but would like to search aginst username if possible.
Can anyone help.
Thanks in advance Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159414
insertBefore method in VBScript
Can someone please explain: Why EXAMPLE 1 of JScript
works, but the EXAMPLE 2 of VBScript does not work?
Thanks,
Bob
/////////////////////////////
EXAMPLE 1:
<html>
<head>
<title>Sample code</title>
<script language="Jscript">
function testFunction() {
var x = document.createDocumentFragment();
var y = x.appendChild(document.createElement('h4'));
y.appendChild(document.createTextNode('Hello'));
var z = x.appendChild(document.createElement('p'));
z.appendChild(document.createTextNode('I am a document
fragment'));
var b = document.getElementById('writebefore');
b.parentNode.insertBefore(x,b);
}
</script>
</head>
<body onload="testFunction()">
<div id=writebefore></div>
</body>
</html>
/////////////////////////////
EXAMPLE 2:
<html>
<head>
<title>Sample code</title>
<script language="vbscript">
sub testSub()
dim x, y, z, b, c
set x = document.createDocumentFragment()
set y = x.appendChild(document.createElement("h4"))
y.appendChild document.createTextNode("Hello")
set z = x.appendChild(document.createElement("p"))
z.appendChild document.createTextNode("I am a document
fragment")
set b = document.getElementById("writebefore")
b.parentNode.insertBefore x,b
end sub
</script>
</head>
<body onload="testSub()">
<div id=writebefore></div>
</body>
</html> Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159411
How to pass th current cookie into automation object?
Hi:
I need to pass the user's cookie into the ActiveX control that is scripted.
Should I use document.cookie ? somehow it is NULL.
Thanks for your info.
Polaris Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159409
Anyone get Excel TextToColumns to work?
I am trying to get TextToColumns working from VBS on an Excel worksheet. I
do not get any errors when I run the following, but when I open the
workbook, the column A is selected, but the text to columns did not run.
I want my delimiter to be a semi-colon. I have defined xlDelimited to be 1.
Data exists only in column A on this worksheet.
set wrkSheet = wrkBook.Sheets("debug")
wrkSheet.Activate
set DebugCells = wrkBook.Sheets("debug").Range("A:A")
DebugCells.Select
var =
DebugCells.TextToColumns(wrkSheet.Range("B1"),xlDelimited,,,,,,,true,";",
Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5,1),
Array(6, 1), Array(7, 1), Array(8, 1),Array(9, 1), Array(10, 1)), true ) Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159404
Creating a text file on the IIS server
I am trying to write a script that creats on text file on the server. When I
run the script I get a permission denied.
The script is as follows:
Set fso = server.CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\PC_Info.txt", True)
MyFile.WriteLine("test" & vbCRLF)
MyFile.Close Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159401
basic store proc question
Hi all,
I am new to vbscript. How do I capture a return variable from a sql
store procedure? The store procedure has a return command like:
return @id
I call the store proc like this:
<% dim cn, id
set cn = Server.CreateObject("ADODB.Connection")
cn.open "dsn=mydb;uid=sa"
id = cn.Execute "my_proc @var=10"
%>
It does not work. Please advise. Thanks.
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159400
Table Rows or Cells Flashing
Hi
Does anyone know how to make a table row flash in a certain colour,
depending on a DB value?
I have a helpdesk application listing statuses of Agents and the calls
queued on the system.
When a call is queued, I wish to make that Agent's Table row, flash.
Or even a cell flash.
Any ideas?
--
Kind Regards
Rikesh
(V.InterDev6.0-SP5/W2K-SP4/SQL2K-SP3) Tag: Het zal toch niet zijn wie ik denk dat het is? Tag: 159391