Enumerate registry on remote computers?
Hi all,
The following works great on a local machine, however when I change the "."
to "Servername" The EnumKey fails. How can I enumerate on remote
computers?On Error Resume Next
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\WMI"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
WScript.Echo subkey
Next
Thanks in advance. Tag: Thanks Tag: 145621
Uninstalling Netware
I'm trying to write a vb script that will uninstall the Netware client and
IPX from Windows 2000 workstations - then I'll push it out via SMS.
Does anyone know if this is possible. Is there a vb/wsh api to remove
clients and protocols from Windows 2000?
Is there another way to do this?
Thanks for any help
Andy Tag: Thanks Tag: 145620
Wmi Install frozen under WinNT
Hello all,
sorry for cross-posting.
I tried several times to install WMI under NT. I downloaded this file:
http://www.microsoft.com/downloads/details.aspx?FamilyID=c174cfb1-ef67-471d-9277-4c2b1014a31e&DisplayLang=en
After starting the setup, I get this box:
"WMI Core Components Setup has detected an existing WMI installation of
the same version. Would you like to continue with this installation anyway?"
I answered "Yes", clicked through the wizard and chose "Reinstall Wmi
Core Components". After that the installer runs until a box with
"Configuring repository file format... Please wait" appears.
Her I can wait several hours, but nothings happens anymore.
I deleted all files unter "c:\Winnt\system32\wbem" an tried again, but
that did not help.
Can anybody help me, to solve this problem?
Thank you in advance.
Greetz, Stephan Tag: Thanks Tag: 145615
IE Settings
I've written a small script to turn the proxy settings
on/off but I can't find out how to uncheck
the 'Automatically detect settings' check box. I've
searched through the registery but I can't find where
it's set.
I have found the rest of the settings, Proxy etc, just
not this one!
Any ideas? Tag: Thanks Tag: 145613
MASS REGISTRY CHANGES
Hi Everyone;
I require some assistant. I have 400 workstations that require some
registry changes and every workstation is different. I am looking for and
Key, SUBKEY or Value of a Key with entry called SPROCKETS. By the way the
enviroment is all Windows2000. I thought about using Group Policies but
that would not work because the Keys could be different from one machine to
another. So my question is how can I automate the search and delete of
registry using scripts?? Tag: Thanks Tag: 145612
sendto
hi,
don't know if its script issue but i'd like to set my script so i can have
it in the windows 'sendto' folder and when i say send a text file to the
script it will go to work on it.
anyone know?
thanks,
Luke Tag: Thanks Tag: 145610
Trim and Trim$
Hi
As far I know (may be I am wrong), different between Trim and Trim$ is Trim$
works in binary format and that's way it is fast.
If this is true then we still people are still using Trim not the Trim$? Is
there any reason ?
MrBug Tag: Thanks Tag: 145607
My Script to run a Command-Line from ASP does not work.
Hi,
My Script to run a Command-Line from ASP does not work. No errors are
returned either.
It is on IIS. The directory where the script exists is on Drive I:, The
executable .exe is on Drive D:
Do you see any problems with the script below? Can you help me modify it?
<%
Dim objWSS
Const cCMD = "clw45.exe -i k:\o\1.wmv -o k:\o\2.ghh -w 128 -df 0 -m
2 -p"
Set objWSS = CreateObject("WScript.Shell")
objWSS.CurrentDirectory = "D:\Program Files\Program\The Program\"
objWSS.Run "%COMSPEC% /c " & cCMD,,True
%>
Thank you very much for your help.
Lucas Tag: Thanks Tag: 145591
Multiprocessor CPU Usage script
In a multiprocessor (8 way or 16 way) running Win 2K, I
need to determine (say via sampling thru' a script) for
each CPU, the CPU usage by each service, or conversely,
for each service/process the CPU time it consumed from
each CPU. Any ideas? Tag: Thanks Tag: 145583
Using IISWeb.vbs
I'm attempting to use the IISWeb.vbs script on Server 2003 IIS6 to automate
creating web sites. I have my own .vbs file, and the simple command:
IIsWeb /query
Yields the following error:
Windows Script Host
Script: C:\Windows\system32\_IISWebCreate.vbs
Line: 1
Char: 8
Error: Syntax error
Code 800A03EA
Source: Microsoft VBScript compilation error
I'm running this as administrator in the System32 folder itself... Am I
missing something fundamental here, or is there some feature that I need to
cut on? Tag: Thanks Tag: 145582
what's wrong ? (regular expression - vbscript)
I probed 5.5 and 5.6 versions and the script showed 0
matches, but I think all is right and the number of
matches would be 1
what's wrong ?
tia
<%@ LANGUAGE=VBScript %>
<%
num = "279"
Set regEx = New RegExp
regEx.Pattern = "/\d{1,3}/"
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(num)
response.write("matches=" & Matches.Count
& "<br>")
Set regEx = Nothing
%> Tag: Thanks Tag: 145576
Problem while sorting with Recordset
I use the following script to return folders on remote machines sorted
by size. Most times it works fine, but sometimes the size of the largest
folder (maybe around 5 gb) is returned as 0.
If I list the files sizes without sorting them, the size shows up fine.
So the problem is while sorting.
Does anyone have any idea why this happens? Thanks.
On Error Resume Next
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set sRootDir = oFSO.GetFolder("\\strComputer\c$\")
Const adInteger = 3
Const adVarChar = 200
Const MaxCharacters = 255
Set DataList = CreateObject("ADODB.Recordset")
DataList.Fields.Append "FName", adVarChar, MaxCharacters
DataList.Fields.Append "FSize", adInteger
DataList.Open
Set sSubDirs = sRootDir.SubFolders
For Each sDir In sSubDirs
DataList.AddNew
DataList("FName") = sDir.Path
DataList("FSize") = sDir.Size
DataList.Update
Next
DataList.Sort = "FSize DESC"
DataList.MoveFirst
Do Until DataList.EOF
WScript.Echo ConvBytes(DataList.Fields.Item("FSize")) & vbTAB & vbTAB
& DataList.Fields.Item("FName")
DataList.MoveNext
Loop
Public Function ConvBytes(SizeInBytes)
If isNumeric(SizeInBytes) Then
If Int(SizeInBytes) < 1000 Then
ConvBytes = Round(Int(SizeInBytes),2) & " bytes"
ElseIf Int(SizeInBytes) < 1000000 Then
ConvBytes = Round((Int(SizeInBytes)/1024),2) & " KB"
ElseIf Int(SizeInBytes) < 1000000000 Then
ConvBytes = Round((Int(SizeInBytes)/1048576),2) & " MB"
ElseIf Int(SizeInBytes) < 1000000000000 Then
ConvBytes = Round((Int(SizeInBytes)/1073741824),2) & " GB"
End If
End If
End Function
--
Posted via http://dbforums.com Tag: Thanks Tag: 145575
wish request
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C398A5.83673230
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Would it be possible to implement block commenting for vb and vbScript? =
I am finding it rather cumbersome to be placing single quotes (') at the =
beginning of each line I wish to comment... I would be nice to use:
/*=20
commented lines
commented lines
*/
Mike
------=_NextPart_000_0008_01C398A5.83673230
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.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Would it be possible to implement block commenting =
for vb and=20
vbScript? </FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>I am finding it rather cumbersome to be placing =
single quotes=20
(') at the beginning of each line I wish to comment... I would be nice =
to=20
use:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>/* </FONT></DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>commented lines
<DIV><FONT size=3D2>commented lines</FONT></DIV>
<DIV><FONT size=3D2>*/</FONT></DIV>
<DIV> </DIV>
<DIV>Mike</DIV></FONT></DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C398A5.83673230-- Tag: Thanks Tag: 145568
Using ADSI to get info from AD
I have an Active Directory with several different OUs containing user
accounts. I am trying to write a script to get the email address of any
user. I would like the only info going into the script to be the
username, because it will not know what OU any given user is in.
All the binding examples I have seen require you to specify the OU or
group name. How can I bind to an object if I don?t know where it is?
--
Posted via http://dbforums.com Tag: Thanks Tag: 145567
Inventory Script
I'm part of a small firm that is growing rapidly. I'm
looking to write a script that will inventory all of the
computers on our Windows 2000 network. The information
that I would like to capture would be the name and IP of
each machine on the network, the count of the machines on
the network, the number of processors for a giving machine,
and the number of monitors attatched to each machine. I
know how to get this information for a single, specified
computer, but I don't know how to iterate through all of
the computers on the network. I'd also like it to
atomatically discover any new systems that are put on the
network, as well as any changes to the name, IP, etc.
Thanks in advance,
Draft Tag: Thanks Tag: 145566
VBScript for updating Terminal Server settings in AD
Hello,
I need to update about 5000 user id's in a Windows 2000
Active Directory with Terminal Server settings.
These settings are:
Terminal Server Profile Path
Terminal Server Home Directory
Terminal Server Home Drive
Allow logon to terminal server
Create the Home Directory and set the appropriate
permissions. I have found several references to this on
the script site but nothing complete. We would like to be
able to feed the script a list of names to complete. I am
very new to scripting so if you have a document or a
sample script I could look at that would be very helpful.
Thanks Randy Becker Tag: Thanks Tag: 145565
Adding users to a group
Is there a way to add all users in a particular OU to a ditribution list
using a script... any help would be appreciated.
Thanks
Gavin... Tag: Thanks Tag: 145559
Limitations to WshShell.Run?
Can anyone tell me if there are limitations to length of characters
that WshShell.Run can handle. The reason I ask is that when I run a
script to CAb log files during the script I used a variable that
stores basically a list of files that meet a certain criteria of days
old and have no found out that if there are too many files listed it
apparently gives a permission denied error. SO I was just wondering
if there were any limitations on that and if so what they were.
Obviously there are some kind of limitations, because I change the
criteria of days to look for and have it find less files to put in the
list and it works fine.
Chris Tag: Thanks Tag: 145557
Java won't reinstall
I had a bunch of parasites on my machine, tons of
unwanted popup ads, that Ad-Aware seems to have removed.
However, I had an error message at startup that Java (Sun
version) was missing a library and couldn't run. I
uninstalled Java, went back to Sun's website, and now it
won't reinstall. Any suggestions? Tag: Thanks Tag: 145555
How to share a printer
Hello!
I want to share a local printer from a Terminal server session with a vbs
script.
Please help, I'm a real newbie to scripting.
Here is the part of my script that doesn't work... ;)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer Where Name = 'PrinterName'")
For Each objPrinter in colInstalledPrinters
objPrinter.Shared = True
objPrinter.ShareName = Sharename
objPrinter.Put_
Next
I have the name of the printer in a variable and I want to put it in
'PrinterName' in ("Select * from Win32_Printer Where Name = 'PrinterName'")
I have a Win2003 box.
Many thanks.
Jesper Tag: Thanks Tag: 145549
Help with File System Object
I am presently pulling information from a specific text file that has to be
on a floppy (don't ask why...I gave up asking why a long time ago).
The application takes the info from the file stores it in a session array
and all is good from there.
I'm trying to figure a 'nice' way of error trapping and alerting the user
that he hasn't put the disk in or that the file isn't there etc.
I have limited experience with the FileSystemObject so that's why I'm
turning here.
I'd like to alert the user that they have not yet put the disk in and not
let them go on until the correct disk with the correct file is in their
drive.
Anyone have any similar code or can point me in a good direction?
Pejo Tag: Thanks Tag: 145544
wmi scriptomatic - run time error at line 90
Apologies for any cross posting.
I'm having trouble with scriptomatic on my XP Pro box.
I run "scriptomatic.hta" and get a very small window (title bar only)
and then get this error in a dialog:
Line: 90
Char: 4
Error: The object invoked has disconnect from its clients.
Code: 0
URL: file://C:\Documents and Settings\msabia\Local
Settings\Temp\scriptomatic.hta
Do you wan to continue running scripts on this page?
The window never becomes populated. If I maximize the window, I get
the 4 buttons but no pull down.
I've tried some of the other posted solutions for problems with
scriptomatic, but they don't seem to help.
I have no pop-up blocker running. It works fine on another XP Pro box
(which I don't have regular access to)
Any ideas?
Thank you!
Mike Sabia
(add a "2" to my email address for direct communication, if desired) Tag: Thanks Tag: 145543
Hyper Link to script
All:
I have a Visio network diagram and I want to add a link to a VBS script.
I save the drawing as html, but wehen I click the link onb the web page,
it opens to a blank page.
Here is the address for the link: \\rwoca3\it_web\wscript
access_excel.vbs
Suggestions how to get this working?
--
Posted via http://dbforums.com Tag: Thanks Tag: 145542
Script within script - nesting scripts
How do I invoke a vbscript from within a vbscript. For
example: I have Main.vbs, One.vbs, and Two.vbs. I would
like Main.vbs to invoke first One.vbs and then Two.vbs.
What's the right way to do this? Tag: Thanks Tag: 145533
Getting info from a Registry Entry.
Hey People,
Here's the situation, I have made a VB script regarding some profile
relative settings on a client. However we thought it might be
interesting to get the script only to run if a surten entry on the
registry is 1.1 for instance.
so basically I made a key under HKCU/Software/Companyname/Profile "0"
So Default the key would be zero. Now when Im in the VB script I cant
seem to find a way to get that actual key into an IF construction.
so this is what I want: IF registryentry is 0 THEN Run script and at
the end create registry entry 1.1 (the creating an entry inst a
problem), and with that a line IF registryentry is 1.1 THEN stop te
script all together..
Can someone help me out here.. thnx in advance! Tag: Thanks Tag: 145532
VBScript to search external LDAP
I am trying to write a VBScript that will search an external UNIX
directory based on a person's last name and first name.
I currently have a script that can search for the user's login id and
give me the first and last name:
--Begin Script--
CONST ADS_NO_AUTHENTICATION = &H0010
CONST ADS_SERVER_BIND = &H0200
sLDAPsrv = "ldap.server.edu"
sLDAPsb = "ou=people,o=server.edu"
sCN = InputBox("Enter UNIX ID:")
sRoot = "LDAP://" & sLDAPsrv & "/uid=" & sCN & "," & sLDAPsb
sDN = "cn=" & sCN & "," & sLDAPsb
Set oDSP = GetObject("LDAP:")
Set oUser = oDSP.OpenDSObject(sRoot,vbNullString,vbNullString,ADS_SERVER_BIND
AND ADS_NO_AUTHENTICATION)
oUser.GetInfo
strName = oUser.givenName
strLast = oUser.sn
MsgBox strName
MsgBox strLast
wscript.Quit
--End Script--
That works great, but I am unable to determine how to search for the
last and first name using the same methods and get the uid. I have
searched everywhere I can think, but most of what I find is either
exclusive to AD or exclusive to UNIX.
Help?
Thanks in advance,
Dan Tag: Thanks Tag: 145530
IE Proxy setting script for a nOOb please!!
HELP I am new to the Win 2K server and need to set the proxy in the client
machines (XP). I have been doing it handraulically and it takes time and
dosnt set it for the users just the admin. I work volunteer in a small
school, my main work is electronics tech so I am in over my head. Please
help me...btw I am going back to school to learn networking so one day I
might be able help here.
TIA Michael Tag: Thanks Tag: 145522
Script for Copying profile
Hello,
We created script to upgrade pc to winxp and automatically add it to new
domain, now we need to figure out how to copy old users profile to new one.
Any ideas ?
Thank you
Eimis Tag: Thanks Tag: 145520
Capturing IE window content to text file
I have a web page that displays statistics which I would like to
periodically save. If I open the web page and hit CTRL+A to highlight the
text and then copy and paste it to a text document I get exactly what I
want. However, I would like to automate this with a vbscript. Can anyone
give me some idea of how to do this?
Thank you.
Ralph Tag: Thanks Tag: 145519
Monitor Registry Entry Level Events
Hey all
Im trying to monitor a registry key HKEY_CURRENT_USER\Control Panel\Desktop
to find when a user is changing the wallpaper (win 2000 network).
Can someone tell me whats wrong with this script?
The script was taken from microsoft and modified to my needs.
1. can i monitor HKEY_CURRENT_USER???
2. the script is returns an error - "invalid query"
***********************************
Original script
Set wmiServices = GetObject("winmgmts:root/default")
Set wmiSink = WScript.CreateObject("WbemScripting.SWbemSink", "SINK_")
wmiServices.ExecNotificationQueryAsync wmiSink, _
"SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_LOCAL_MACHINE'
AND " & _
"KeyPath='SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion' AND
ValueName='CSDVersion'"
WScript.Echo "Listening for Registry Change Events..." & vbCrLf
While(1)
WScript.Sleep 1000
Wend
Sub SINK_OnObjectReady(wmiObject, wmiAsyncContext)
WScript.Echo "Received Registry Change Event" & vbCrLf & _
"------------------------------" & vbCrLf & _
wmiObject.GetObjectText_()
End Sub
***********************************My script
Set wmiServices = GetObject("winmgmts:root/default")
Set wmiSink = WScript.CreateObject("WbemScripting.SWbemSink", "SINK_")
wmiServices.ExecNotificationQueryAsync wmiSink, _
"SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_CURRENT_USER'
AND " & _
"KeyPath='Control Panel\\Desktop' AND ValueName='Wallpaper'"
WScript.Echo "Listening for Registry Change Events..." & vbCrLf
While(1)
WScript.Sleep 1000
Wend
Sub SINK_OnObjectReady(wmiObject, wmiAsyncContext)
WScript.Echo "Received Registry Change Event" & vbCrLf & _
"------------------------------" & vbCrLf & _
wmiObject.GetObjectText_()
End Sub
*********************************** Thanks,
ITman Tag: Thanks Tag: 145516
RUN/execute a Command-Line command from an ASP page.
Hi,
I need to RUN/execute a Command-Line command from an ASP page.
This is the command:
sse45.exe -i k:\o\2.wmv -o k:\o\2.shh -w 128 -df 0 -m 2 -p
Can you show me a code how to run this command from an ASP page? I need to
run it from an ASP/VBscript?
Thank you very much for your help! Tag: Thanks Tag: 145513
Select variable "column name"
I'm having this code in VBscript and I want to select a column name
which is variable.
<%@Language="VBScript"%>
<%
Link = Request.QueryString("link")
oRS.Open "SELECT 'Link' FROM snowzone", oConn, 2, 3
%>
How should the SELECT statement be written correctly? Tag: Thanks Tag: 145510
Spaces and parameters query for VB Script
Hi all -
I need to run an application off a shared network drive. I am
having problems with writing the script that will access the network
drive (since I need to specify parameters and the network drive name
has a space in it). I have no problems running it off the command
line, but with the spaces and quotes in VBScript, things get messed
up.
I need to run this line with VB Script, anyone with any ideas ?
(All on one line)
\\Software share\Clients\W32Intel\Setup.exe -s -f1
\\Software share\Clients\W32Intel\setup.iss"
I'm looking for something like this :
set ws = wscript.createobject("wscript.shell")
ws.run("\\Software share\Clients\W32Intel\Setup.exe -s -f1 ... etc")
I have tried several combinations of """, "", and " with no luck :-)
Thanks for your help. Tag: Thanks Tag: 145497
CDONTS - What happens to bad mail?
When you use CDONTS to send mail through an active server
page... what happens to the email if the email address is
bad.
Is there a way to capture the bad email address and
forward it somewhere so we can tell the email was returned? Tag: Thanks Tag: 145491
msgbox alternative IE window
Hello,
How can I display a custom dialog using IE with 2 or 3 buttons?
I need to output the html code from running script including the input
buttons.
Schematic example:
<HTML>
"This is what happened, do you want to proceed?"
<form>
<input buttons YES NO CANCEL>
</form>
</HTML>(please ignore the bad syntax)
I want to loop the IE window function until the user clicks the button.
Then I want the button clicked value returned back to the script where I can
perform other actions based on the clicked button value.
If I have to pre-output the HTML file, this is acceptable but on the fly
output solution would be much better.
Many thanks,
Dave Tag: Thanks Tag: 145480
How to found out the local printer to connect or not
Does anyone know how to check whether the local printer
is attach to a workstation or not using vb script or WMI ?
The workstation (w2000) may have boths the network
printer and a local printer attach or just the network
printer. The Printer Driver(local/network) may be install
already, but the local printer may have remote from the
workstation, so check the driver exist or not is not a
good idea.
Thanks! Tag: Thanks Tag: 145478
default printer
Hi there
I use this code to set the default printer
Dim WSHNetwork
set wshnetwork = createobject("wscript.network")
on error resume next
WshNetwork.SetDefaultPrinter "\\server\hp1"
if err<>0 Then
wshNetwork.AddWindowsPrinterConnection "\\server\hp1"
WshNetwork.SetDefaultPrinter \\server\hp1
End if
it works fine for all my win2000 pro and XP pro computers. But not on the
NT4 worksstation. it's the SetDefaultPrinter that fails.
any good ideas?
Thanks
Brian Tag: Thanks Tag: 145473
How To: Disable Selections with OnSelectStart
I have observed several samples in JavaScript such as:
<BODY onselectstart="return false">
But, I am having troubles in VBScript. I want to avoid mixing Java and
VBScript in this page so as not to have to load both scripting engines.
Anyone been able to successfully do this? Thanks
-Tom Tag: Thanks Tag: 145468
Externally Reading a Form Input Field
I am trying to consistently read a hidden Input field in a
Form located in a HTML that was opened with the
objExplorer.Navigate statement. Sometimes I can read the
field after the Submit button is clicked, sometimes I
can't and I get the error: "Object doesn't support this
property or method: 'myForm'"
Here is the VB script statement (external to the HTML
file):
Do While TRUE
strTemp = objDocument.myForm.bWaiting.value
If strTemp <> "TRUE" Then
Exit Do
End If
Loop
Help.......... Thanks in advance.
Russell-S
Russell-S Tag: Thanks Tag: 145463
WMI call for files in a specific folder not modified in the past 7 days?
Hello all
I'm writting a script that renames files on a daily basis, and I want
to delete any files (in a specific folder) that have not been modified
in the past seven days.
I'm thinking that the query string should look like this:
Set colFiles = objWMIService.ExecQuery("Select * from CIM_DataFile _
where LastModified < convert(datetime,'10/21/03 21:00:00')")
but I don't seem to get anything back. If someone knows how I can fix
this, it would be greatly appreciated. I can't seem to find anything
on the Internet that addresses this issue.
any help is greatly appreciated!
--Gene Tag: Thanks Tag: 145462
Vbs populate ie web form with frames
Hello,
We have a website on our intranet that has frames and text boxes that
we need to populate with data automatically with VBScript. I have
been able to populate other web pages with VBScript when they don't
have frames, but cannot figure out how to populate them when they have
frames.
I have been trying to search the existing posts, but I still can't
seem to get this to work.
I found a website on the Internet that has frames and input boxes that
are similar to our intranet web page.
http://www.iopus.com/iim/demo/frames
Does anybody know how I could use VBScript to populate these text
boxes within the frames? This is the code I have figured out so far:
Const URL = "http://www.iopus.com/iim/demo/frames"
With WScript.CreateObject("InternetExplorer.Application")
.Visible = True
.Navigate URL
Do Until .ReadyState = 4
WScript.Sleep 50 ' wait for page to load
Loop
With .document.forms(1) ' I DON'T KNOW WHAT ELSE GOES HERE TO
REFERENCE TO FRAME
.T1.value = "Hello" ' enter company into a textbox
End With
Would anybody be willing to show me what I am missing in my code?
Thank you in advance,
Shawn Tag: Thanks Tag: 145455
QUESTION ON SESSION VARIABLES
Hi there....
i got a quick one for you guys. i've this session variable that is
updated by calling a server method (i set this value when the user
hits a submit button in my form. The server method is called when i
load all my asp forms.). I'd like to be able to update this session
variable, without being forced to submit my form or refresh my form
(something that will call my server method each 2 min lets say,
without refreshing my page or submit)...is there anyway to do this???
Maybe a remote scripting with the setinterval() method?? but i'm
having trouble using this with XP and IE 6 !!
Your help is with this matter is higly appreciated!! Tag: Thanks Tag: 145449
adding and deleting printers
Ok I'm trying to get my scripts to work and it's just not. I do have the
one for adding a printer working but for deleting is a different story.
Here is my adding a printer script. (It works)
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\tpl\plu1"
WshNetwork.SetDefaultPrinter "\\tpl\plu1"
Here is my deleting script.
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.RemovePrinterConnection "\\tpl\plu1"
The deleting script runs with no errors but the printer stays. What I would
like to do is use the add printer script as logon scripts so that when a
user logs on they get the correct printer. If I don't have a deleting
printer script run as a log off script will it screw up the next time the
user logs on and keep adding printers and does anyone know why my deleting
printer script doens't work? I run all W2k boxes. Tag: Thanks Tag: 145447
Service like script
Hi
I am sure its been asked many many times, but is there a way of creating a
script that runs from time to time, say every 5 mins that can check to see
if a certain time has elapsed and then send an email.
Basically, I want to build a reminder system into my intranet that checks a
calendar database and 1 hour or 1 day before sends out a reminder email.
Almost like a service.
Anyone any ideas as to where i look?
MC Tag: Thanks Tag: 145446
getting cell values from excel
I am needing to open an excel document, and extract the
values from column A of an excel document.
For example: I have an excel document that someone else
made with over 1900 rows. The data in each cell contains a
link to a file in the directory that the spreadsheet is
in. Each time you click on one of the cells you can see
the hyperlink data above in the cell property box.
How can I, with vbscript, open the worksheet and extract
the values from all cells in column A?
Thanks for any help. Tag: Thanks Tag: 145443
Setting printer destination with VB/Crystal on XP OS
Hello all,
I'm using VBA in Great Plains v6to call & print a v8
Crystal report to an Epson
LQ-870 ESCP2 printer. The code (very simple, I have to
admit) is below. It's
worked fine in Windows 95 for years but as soon as I
install XP and try it I get the
message 'Invalid Printer Specified.' I understand Windows
XP uses a universal driver
called UNIDRV.dll. Is that what's causing the problem?
If so, does anyone have
any idea how to get around it? I've a few things with no
success? I need help!
Thanks,
Don
The code:
' Save document
'SalesTransactionEntry.Save = 1
' Set report file name.. should be located in the
dynamics directory
PickingTicket.ReportFileName = "PickingTicket.rpt"
' Tell Crystal reports to discard any saved data
PickingTicket.DiscardSavedData = True
' Turn off progress dialog box
PickingTicket.ProgressDialog = True
' Set report destination
PickingTicket.Destination = crptToPrinter
PickingTicket.PrinterDriver
= "ESCP2MS.DRV" 'UNIDRV.dll ??
PickingTicket.PrinterName = "Epson LQ-870 ESC/P 2"
PickingTicket.PrinterPort = "LPT1"
' Print report.
PickingTicket.Action = 1 Tag: Thanks Tag: 145436
Configuering Internet Settings for remote machines
Hi All,
I would like to have a vb script which configures the Internet
settings for Remote machines.I have a script which does for local
machine.That script is using "wscript.shell".I dont know if this can
be used to alter the settings of remote machines.Pls give me a script
or tell me how to use the above mentioned method for remote
machines.Your responses will be highly appreciated.
Thanks
Gaurav Tag: Thanks Tag: 145435
Configuering Internet Settings for remote machines
Hi All,
I would like to have a vb script which configures the Internet
settings for Remote machines.I have a script which does for local
machine.That script is using "wscript.shell".I dont know if this can
be used to alter the settings of remote machines.Pls give me a script
or tell me how to use the above mentioned method for remote
machines.Your responses will be highly appreciated.
Thanks
Gaurav Tag: Thanks Tag: 145432