Novice needs HELP with VBScript Code
Please help I am looking for any help I can get in converting this into
VBScript. Thanks for your assistance! I greatly appreciate it.
<html>
<title>Convert Ampesands</title>
<head>
<script language="JavaScript">
<!-- Begin
function replaceChars(entry)
{
out = "&"; // replace this
add = " and "; // with this
temp = "" + entry; // temporary holder
while (temp.indexOf(out)>-1)
{
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add +
temp.substring((pos + out.length), temp.length));
}
document.subform.text.value = temp;
}
// End -->
</script>
</head>
--
Direct access to this group with http://web2news.com
http://web2news.com/?microsoft.public.scripting.vbscript Tag: Repost: Verify Password Complexity Tag: 137905
Please Advice - Desperate for Solution
I am currently working on converting this to VBScript and don't have any
idea on where to start. I have spent countless hours with no resoution
It is suppose to be a program that totals the checkboxes selected.
Thanks!
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Generated by AceHTML Freeware http://freeware.acehtml.com -->
<!-- Creation date: 7/5/2003 -->
<html>
<title>Convert Ampesands</title>
<head>
<script language="JavaScript">
<!-- Begin
function replaceChars(entry)
{
out = "&"; // replace this
add = " and "; // with this
temp = "" + entry; // temporary holder
while (temp.indexOf(out)>-1)
{
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add +
temp.substring((pos + out.length), temp.length));
}
document.subform.text.value = temp;
}
// End -->
</script>
</head>
--
Direct access to this group with http://web2news.com
http://web2news.com/?microsoft.public.scripting.vbscript Tag: Repost: Verify Password Complexity Tag: 137904
Show serial for date in messagebox
Hello newsgroup,
I need a little gadget that will show me the serial number for a date I
enter. I have come up with the code below, but I can not get it to show the
serial number that the computer uses for the input date. The date keeps
getting converted to the systems (short) date format. In Excel, I can do it
by entering a date in a cell that is not date-formatted, but I need a
quicker way, to fire from my desktop. Here's the basic code I'm
experimenting with:
===============================================
Dim time1, time2
result = InputBox("Type a date in the dd-mm-jjjj format and click OK",
"Serial number for date", Date, 100, 100)
time1 = FormatDateTime(result, 1)
time2 = result
Response = MsgBox (time2, vbokonly, time1)
================================================
A related problem: I wanted to concatenate a string for the messagebox that
shows the result, but I keep coming up with errors that I think say that I
cannot use text together wit a set variable or a function. I can do this in
Excel VBA without any problem, so I suppose there must be a way. Here's the
gist of what I tried (with the above code):
Response = MsgBox ("The serial number for " + time1 + " is " + time2 + ".",
vbokonly, "Serial number for date")
I know I should have taken the course, but please help me out.
Have a nice day,
--
Eric van Uden
at the foot of the 'bridge too far' Tag: Repost: Verify Password Complexity Tag: 137901
VBScript amatuer needs expert advice
I having a problem converting a program from javascript need expert
advice to point me to a book that can help. This is a very tuff one,
and I know would take hours to write please help. This program is
suppose to add only selected checkboxes.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Generated by AceHTML Freeware http://freeware.acehtml.com -->
<!-- Creation date: 7/5/2003 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="generator" content="AceHTML 5 Freeware" />
<SCRIPT LANGUAGE="JavaScript">
var form_total=0;
function CheckChoice(whichbox)
{
if (whichbox.checked == false)
{ form_total -= eval(whichbox.value); }
else { form_total += eval(whichbox.value); }
document.myform.total.value = '$'+eval(form_total);
}
function InitForm()
{
document.myform.total.value='$0';
for (xx=0; xx < document.myform.elements.length; xx++)
{
if (document.myform.elements[xx].type == 'checkbox')
{
document.myform.elements[xx].checked = false;
}
}
}
</SCRIPT>
</head>
<body onload="InitForm();" onreset="InitForm();">
<CENTER><font size="7" color="#008000"><b><u>Cubicle
Buildout</u></b></CENTER></font><br><br><br>
<CENTER><form method="POST" name="myform">
<font size="5"
color="#800000">Computer
<font color="#0000ff">$700.25</font>
<input type="checkbox" name="Build1" value=700.25
onclick="CheckChoice(this);"><br><br>
Monitor &nbs
p; <font color="#0000ff">$912.00</font>
<input type="checkbox" name="Build2" value=912.00
onclick="CheckChoice(this);"><br><br>
Phone(Rolm240) <font color="#0000ff">$118.75</font>
<input type="checkbox" name="Build3" value=118.75
onclick="CheckChoice(this);"><br><br>
Pod1 &
nbsp; <font
color="#0000ff">$1515.25</font>
<input type="checkbox" name="Build4" value=1515.25
onclick="CheckChoice(this);"><br><br></font>
<br><br><br><br><br><br>
<br>
<font size=+3>
<font color="#008000"><b>Your total is: </b><input type="text"
name="total" readonly onFocus="this.blur();">
</font>
<br><br>
</font>
</form>
</body>
</html>
--
Direct access to this group with http://web2news.com
http://web2news.com/?microsoft.public.scripting.vbscript Tag: Repost: Verify Password Complexity Tag: 137900
popup.show() no workie!
Hi,
I ported the following code from MS's documentation, which
was written in JScript. It executes without error, but
the popup doesn't display. Anyone have any idears?
Alex B.
<Head>
<script language="vbscript">
sub ButtonClick()
dim oPopup
dim oPopBody
set oPopup = window.createPopup
set oPopbody = oPopup.document.body
oPopBody.innerHTML = "Help for <B>Test</B>
page..."
'This line produces nothing, but original
JScript works fine!
oPopup.show 100,100, 100, 100,
document.body
'This works fine
msgbox "Hi"
end sub
</script>
</HEAD>
<body>
<INPUT onclick="ButtonClick()" style="Z-INDEX: 108; LEFT:
41px; WIDTH: 169px; POSITION: absolute; TOP: 280px;
HEIGHT: 24px" type="button" value="Help" id="btnHelp">
</body> Tag: Repost: Verify Password Complexity Tag: 137893
Sample, Tips?
Hi, Everybody,
I am looking for some samples that can put the real-time clock on my web
page, I was told that there is a simple VB script will do the trick. Also I
am wondering are there web sites will offer some general web developing tips
and learning materials?
Thanks for any help,
Wayne Tag: Repost: Verify Password Complexity Tag: 137885
* Newsgroup doc. and 6949 Tips, Tricks, and Registry Hacks - 07-Jul-2003 14:15.22 *
07-Jul-2003 14:15.22.
Please see the Microsoft Newsgroups page at
http://communities.microsoft.com/newsgroups/default.asp
Visit Windows & .NET Magazine's 6949 tips at http://www.jsiinc.com - press the
"Tips & Tricks" button.
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com Tag: Repost: Verify Password Complexity Tag: 137881
how to close locked file - network
Problem: User opens the file sample.xls on the share \\nts_server_001\share\
and does not close it. He only wants to look the content, not to change it.
So this file is locked. Now I want to run a VbScript on NTS_SERVER_001 that
changes the content of this xls-file. The problem is, that the user has
locked the file so i cannot save it with the same name.
Is there a possibility with WMI or an other way to close this file on the
server so i can make the changes? Tag: Repost: Verify Password Complexity Tag: 137872
Checking Audit Information
Is there a way to set / check the audit policy settings
(e.g. Audit Logon events, Audit Privilege use, etc) of a
Windows 2000 Server using vbscript? Tag: Repost: Verify Password Complexity Tag: 137868
Running Wscript in HTML
I don't have any trouble creating and using a Wscript shell in a web page (with
appropriate permissions), but I can't run Wscript functions. For example, this
works fine:
Set WshShell = CreateObject("WScript.Shell")
ret=WshShell.run("e:\wallpaper\scripts\webread.vbs",0,true)
But if I try to run "Wscript.sleep 10," I get an error telling me there is no
Wscript object. How can I instantiate a Wscript object in a HTML file?
Dave Tag: Repost: Verify Password Complexity Tag: 137864
A question about FileSystemObject
I'm using the FileSystemObject in a client-side script that is
intended to be used in Internet Explorer 5.5 or later only on an
intranet.
I developed the script on a Win2K machine that has WSH installed on
it. I actually did not expect it to work on other computers but was
surprised to find out that it did (on 3 machines so far - Win2K and
NT4).
So, my question is: WHERE is FSO (that is, which DLL)? Is it part of
Windows? Or is this working only because Visual Basic is installed on
all of the computers I've tried it on so far? Tag: Repost: Verify Password Complexity Tag: 137863
Date Range
Hi
I have a booking form where people enter a FromDate and a ToDate and select
a recurring day like Tuesday.
So that data is for instance 7-jul-2003 to 28-jul-2003 and recurring on
Tuesday.
What I want to be able to do is calculate the dates for the Tuesday's within
the FromDate ToDate range and submit them to a database.
And even better still be able to calculate 2 days like Tuesday and Friday
with in the range.
Is this possible ????
Regards
Dave Tag: Repost: Verify Password Complexity Tag: 137855
CDONTS attach file is not working right
Hi
I am using the CDONTS object to create a new email, and I used the
attachfile method.. It seems the attach file wont work if the file size more
than 100 KB , does anybody know if there is a size limit or certain encoding
method need to be applied her? the attached file I am using is in a form of
acrobat PDF
PS when file is sent it will show on the attachment only with 0 bytes. Or if
attachment were in html format I would get gibberish.
Thank you
Maher Tag: Repost: Verify Password Complexity Tag: 137845
Object required: Session
Hi,
I'm trying to check on each asp page whether the
session("UserId") has expired before it redirects to
login page. Here how the process goes.
1. I am able to initialise the session("UserId") after
login to the web
Set session("UserId") = "ID"
2. However problems occurs for subsequent pages because
now the session("UserId") always remains blank.
Since I include a checking on each page for session
timeout, therefore it always redirect to login page.
If Session("UserID") = "" Then
Response.Redirect("Login.asp")
End if
3. Hence, I try to harcode the session for testing.
Set Session("UserID") = "Test"
If Session("UserID") = "" Then
Response.Redirect("Login.asp")
End if
However, it prompts an error for the new line I have
added.
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Session'
For your information, it works fine on the production
server, but problem occurs in the development server (both
running Win2K Server SP3, IIS 4.0.2.4022)
Please help!! Appreciate any feedbacks. Thanks.
Regards
Wilson Tag: Repost: Verify Password Complexity Tag: 137835
SMTP event sinks
Hello,
I don't know if this is the right group but I need help with writing a SMTP
event sink to send a copy of a message from/to a particular domain to
another address. Any ideas?
TIA Tag: Repost: Verify Password Complexity Tag: 137833
validate date
Hi,
This may be simple question for your all, how can I validate a date
variable, like 02/30/2003 is an invalid date? thanks.
Atse Tag: Repost: Verify Password Complexity Tag: 137830
automate powerpoint
i would like to automate the running of a powerpoint presentation, and when
it finishs, i want to quit powerpoint
thank you very much Tag: Repost: Verify Password Complexity Tag: 137827
SessionVariables - INSERT INTO Command
How can I use Session Variables to populate a field using the Insert Into
command?
troyo@troyo.net Tag: Repost: Verify Password Complexity Tag: 137819
how do I determine language version of IE programatically?
I want to distribute IE 6 SP1 to the few thousand employees in my
organization (Windows 98 machines). While most have the Hebrew version of IE
5, some have the English version. My script that distributes the IEAK
package automatically was built on the Hebrew version. When I run the script
on the English version, it doesn't work. I have since added a package built
on the English version of IE6, but obviously I can't install that version
automatically on the computers with the Hebrew browsers.
I would like to add a section to the script that will programmatically
determine the language version (I assume by VB script)and install the proper
version. I have found no setting in the registry that points out the
language version. The only place I've found note of it is in the advanced
version properties of the iexplore.exe file, but I have found no way of
pulling out that value with a script. Any ideas on how to make such a
script?
Alternatively, is there any way to have the IEAK determine on it's own what
the current language settings for the browser are on the machine and install
the right version by itself?
Thanks,
Dave Curwin
tobyndave@hotmail.com Tag: Repost: Verify Password Complexity Tag: 137815
Sending data to database via radio button choice.
Hi all! I was wondering does anyone have any ideas on how I can send
info to a SQL database by choosing a radio button. What I want to do
is set one radio button to "Max" and one to type "Avg". When a user
clicks on a radio button I want the value of whatever button was
chosen to be placed inside the "type" field in my database after they
hit submit. Also, if anyone knows of the best sites or books I can use
about VBScript or ASP please let me know. I'm learning them both right
now. Thank you very much!
Renie83 Tag: Repost: Verify Password Complexity Tag: 137813
.HTA + InternetExplorer.Application = out of memory
I am trying to create an InternetExplorer.Application ActiveX from .hta
and getting "out of memory" error.
Here is the test code:
----------------------------
<html>
<head>
<HTA:APPLICATION ID="oMyApp">
<script language="VBScript">
sub initVB()
Dim oIE
Set oIE = CreateObject("InternetExplorer.Application")
End sub
window.onload = GetRef("initVB")
</script>
</head>
<body>
</body>
</html>
----------------------------
It works fine being saved as .htm, but fails as .hta
I am using IE 6.0 on XP Pro
Thank you for any help!
Regards,
Anton
--
Posted via http://dbforums.com Tag: Repost: Verify Password Complexity Tag: 137811
vb 4 uninstall
I installed vb4 in windows xp. SInce I did I have been getting many error
messages and explorer errors. I have looked but can't find out how to
uninstall vb4. I can't find it in the add remove programs. What do I need
to do to uninstall it? Tag: Repost: Verify Password Complexity Tag: 137808
Random Number
Hi all,
Just wondering if anyone knows a quick way in VB
to generate a random number of characters in a
a database field?
Thanks.
--
| jim@pandakunda.com | aLsO nOBiE | Tag: Repost: Verify Password Complexity Tag: 137802
WMI and asp using Win32_Process method
I am trying to run WMI scripts from .asp pages. The problem is when trying
to use the Win32_Process method to create a remote process, I have to be
logged into the client and web server under the same credentials for it to
run. Of course, this is defeating the purpose of trying to call the process
on the remote server to begin with. This works fine from a local .vbs
script, but I am calling it via a web browser on the remote server.
Is anybody else trying to do the same thing or have a fix? I am receiving
an "error 8" when it fails.
Thanks,
MHW
'Create process to call Script1001a.vbs
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & _
"\root\cimv2:Win32_Process")
errReturn = objWMIService.Create("cscript
C:\inetpub\adminzone\Scripts\Common\Script1001a.vbs " & strOS _
& " " & strADSearchPath & " " & strAcctName & " " & strPassword & " " &
strAdmin & " " & strPCSupport & " " & strManagers, null, null, intProcessID) Tag: Repost: Verify Password Complexity Tag: 137798
Urgent, How to include web link
I am nre in ASP! Please help to resolve the problem.
I am trying to retireve the data from the database with a
url link. For example, When I retireve the "Microsoft"
from the Company Field, it will include the url link for
the microsoft.
Please tell me what's the appropriate way to do this. I
have tried the following but the url link includes the
orginal url:
...
...
....
urlink= Item.value
Response.Write("<a href="&urlink&">" & urllink)
It works but when I click the microsoft, the URL address
appeared to
be "http://www.myserver.com/index.asp#http://www.microsoft.
com"instead of "http://www.microsoft.com"
pls help and thanks in advance Tag: Repost: Verify Password Complexity Tag: 137797
Connecting WMI on server in another domain?? Help
This is a script that works fine loccaly, but i want to use it on several
other server in all different domains.
How can i do this? (I tried to send the admin credentials along, but i am
doing something wrong. I can't get it to work)
So if anyone knows how to adjust this so i can use it, you would make my day
less frustrating ;-))
Thanks in advance
Patrick
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.493 / Virus Database: 292 - Release Date: 25/06/2003 Tag: Repost: Verify Password Complexity Tag: 137794
weekdays
Hi,
I have 2 questions about counting weekdays.
1. How can I count how many business days there are from date1(variable) to
date2(variable)?
like,
x(weekdays) = date2() -date1()
2. How can I know the day, moving x business days from date1(variable)?
like,
date2() = date1 + x(weekdays)
Thanks for any idea.
Atse Tag: Repost: Verify Password Complexity Tag: 137784
Masking for WMI
Hello all,
can anyone help me with a (perhaps) very simple problem?
I have to mask a the cahracter ' when creating an object with VBScript
and WMI in a piece of code like
strPath = "D:\RK's"
Set WMI = GetObject("winmgmts:\\.\root\cimv2")
Set NewInstance = WMI.Get("Win32_LogicalFileSecuritySetting='" &
strPath & "'"
I get an error message here stating "Invalid Path", obviously because
of the ' in the path. Changing it to '' does not help.
Does anyone know how to mask this character?
Thanks in advance.
Markus Tag: Repost: Verify Password Complexity Tag: 137770
create job in task scheduler
Hi
I know how to create a job in task scheduler using vb script, but do not
know how to set it up using aother user account to run it e.g.
administrator.
Anyone can advice me how to do?
thz
SB Tag: Repost: Verify Password Complexity Tag: 137765
Using VBS to Run Multi vbs Scripts
Hi there,
I have 6 vbs scirpts which I would like to run from a
batch file however I need them run in sequence so that
the first vbs script completely finishes before the second
one is exicuted. I am finding this will not work with a
batch file because the batch file will not wait for the
first one to finsish before running the second one. And
putting a delay counter won't work either because the
scripts do not always take the same amount of time to run.
My question is how can I use a vbs script to run each of
my 6 other vbs scripts One at a time and have the 2nd vbs
script not start exicuting untill the first vbs script is
completed and so on ......
Any thoughts ???
Thanks in advance Dan Thompson Tag: Repost: Verify Password Complexity Tag: 137757
no. of Files not count?
Hi all,
I got this problem. I have an asp-file containing only this piece of
script. Though all other asp-based files work, this piece doesn't.
IUSR_server has all the rights on the directory, and on scrrun.dll (as
somebody suggested).
Does anybody have an idea? Your help is greatly appreciated.
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("d:\webroot\testing\images\Large\")
Set objFiles = objFolder.Files
response.write objFiles.count
Grtz
Bart Tag: Repost: Verify Password Complexity Tag: 137749
Select UNIQUE
Hello,
I am in the early stages of writing a script that will query a database and then
create an Excel spreadsheet. Does WQL support "Select UNIQUE" ? If not, is
there a way to select unique records in a database using VBScript?
Your suggestions are appreciated.
TIA,
Bill
bill@2burkes.com Tag: Repost: Verify Password Complexity Tag: 137748
Problem while getting the File Name with AspUpload
Hi,
I need to upload a file to server and save the file name to the
database. I wrote some code and from that i couldnt get the Uploaded
filename. Is there any mistake in the code. I could only access the
size,type,width,height and server path. I need the filename of
uploaded image. I searched the net and went through the documentation,
but i couldnt make out where the problem is. Could any one please help
me regarding this. I am very much thankful to you.
Thanks and Regards,
Bindu.
The code is like this:
--------------------------------
<%
On Error Resume Next
Set Upload = Server.CreateObject("Persits.Upload.1")
' Uncomment this line if unique file name generation is necessary
Upload.OverwriteFiles = False
'limit file size
Upload.SetMaxSize 25000, True
' Intercept all exceptions to display user-friendly error
On Error Resume Next
' Perform upload
Count = Upload.Save(Server.MapPath("images/"))
' 8 is the number of "File too large" exception
If Err.Number = 8 Then
Response.Write "Your file is too large. Please try again."
Else
If Err <> 0 Then
Response.Write "An error occurred: " & Err.Description
Else
Response.Write "Success!"
End If
End If
If Count > 0 Then
Response.Write Count & " file(s) uploaded." & "<br>"
End If
For Each File in Upload.Files
If File.ImageType = "UNKNOWN" Then
Response.Write "This is not an image."
Response.End
End If
Response.write "Size: " & File.Size & "<br>"
Response.write "Type: " & File.ImageType & "<br>"
Response.write "FileName: " & File.FileName & "<br>"
Response.write "Ext: " & File.Ext & "<br>"
Response.write "Folder: " & File.Folder & "<br>"
Response.write "Width: " & File.ImageWidth & "<br>"
Response.write "Height: " & File.ImageHeight & "<br>"
Response.write "Original File Name: " & File.OriginalFileName & "<br>"
Response.write "Original Folder: " & File.OriginalFolder & "<br>"
Response.write "Path: " & File.Path & "<br>"
Next
%>
---------------------------------------------------------- Tag: Repost: Verify Password Complexity Tag: 137739
orphaned entries in the acl
Anyone know where i can get a script that will create a list of all the AD
objects that have orphaned objects in their ACL's ?
I want to do some house keeping on the permissions for the objects in AD Tag: Repost: Verify Password Complexity Tag: 137730
Cookies
I need a way to use one and the same cookie over multiple websites? Does
anybody know how to do this...?
Many thanks,
Robbie Tag: Repost: Verify Password Complexity Tag: 137729
Checking group membership
I would like to check if a group is member of another group in Active
Directory. I am using the following lines of code, but they don't work
(the program doesn't recognize that GG_I_CA is member of GG_I.
Set oSysInfo = CreateObject("WinNTSystemInfo")
sDomain = oSysInfo.DomainName
Set oGroup = GetObject("WinNT://" & sDomain & "/" & "GG_I")
IsMember = oGroup.IsMember("WinNT://" & sDomain & "/" & "GG_I_CA")
IF isMember Then wscript.echo "Group is member"
If I try to check if a user is member of a group, everything works fine.
Is there another method to check group membership (I wouldn't like to
have the list of members and recursively check it)?
Thanks,
Marta
--
Posted via http://dbforums.com Tag: Repost: Verify Password Complexity Tag: 137728
Leading spaces
Been out of this for too long!
Can someone please remind me of the code to remove spaces from a string?
Thanks Tag: Repost: Verify Password Complexity Tag: 137727
MSXML2.XMLHTTP compatibility with IE 5.0 and above
Object:
We are using the Microsoft.XMLHTTP component for uploading data from
the IE Client.
The VBScript code required for a CLIENT - SIDE is:
Sub Sendit
dim sfileName
dim sType
dim xmlhttp
sfileName="c:\\voir.txt"
sType=2
sData = getFileBytes(sfileName, sType)
sfileName= mid(sfileName,
InstrRev(sFileName,"\")+1,len(sfileName))
set xmlhttp=createobject("MSXML2.XMLHTTP")
strURL = "http://localhost/INGEB/uploads/" & sFileName
msgbox "URL is: " & strURL
xmlhttp.Open "PUT", strURL, false
xmlhttp.Send sData
show.innerText= "Status: " & xmlhttp.statusText
set xmlhttp=Nothing
End sub
Questions:
The Client side use the IE version 5 and above.
What version of Microsoft.XMLHTTP is required to execute the
previous script ?
Is it included by default with IE5 and above?
Thanks!!! Tag: Repost: Verify Password Complexity Tag: 137723
auto send mail using Pop3
I am automating the tasks.
After it finished, it will send a e-mail using Outlook to
notify the people.
But under office XP / latest service pack on Office 2000,
It will come up a dialog box, and I need to confirm it 2
times manually, so that the message can be sent.
Can anyone give me some example on sending the e-mail via
POP3 protocol? (I don't need to manually confim the
message one by one). Tag: Repost: Verify Password Complexity Tag: 137702
call a query in access from vbs program part 2
Set cn = server.createobject("adodb.connection")
cn.open "provider=Microsoft.Jet.OLEDB.4.0;" & "r:\basegeneral.mdb"
cn.r-daytoday
cn.close
set cn = nothing
I ran the script and I got this error message
code: 800AO1A8
error: objet requis: "server"
why?
--
Direct access to this group with http://web2news.com
http://web2news.com/?microsoft.public.scripting.vbscript
To contact in private, remove nn3osp+-3pa6m Tag: Repost: Verify Password Complexity Tag: 137691
ASP email validation
I was wondering if there was a way to validate the email
software of a contact to see if their software can support
HTML emails before sending the emails using ASP? I want to
send them a plain text email if their software does not
support HTML...
Many Thanks,
Kevin Tag: Repost: Verify Password Complexity Tag: 137685
Need a Loop For my Code
Hi there can anyone out there help me ?
The following VBS script I wrote to alow me to Save some
webpages as text files. However I need a to have some kind
of loop put in so that I can do this for multiple URL's
and save each webpage as a different text file ?
I am new to VBS but am fairly experienced with VBA and VB
If this were either I would just write an Array to handle
the different URL's and File Names and than run this code
through a Loop, which would change the Elements in the URL
array and textfile name array each time the loop ran
through . However Im not sure if I can do such a thing
with VBS. If so how can I do this and do you need to "Dim"
any array's or variables ???
code:
Set IE = createobject("InternetExplorer.Application")
fWrite "C:\SBM\DataMining\TextData\zcd9.txt", WebText
("http://www.cpc.ncep.noaa.gov/products/analysis_monitoring
/cdus/degree_days/msacddy.txt")
fWrite "C:\SBM\DataMining\TextData\zhd9.txt", WebText
("http://www.cpc.ncep.noaa.gov/products/analysis_monitoring
/cdus/degree_days/msahddy.txt")
Function WebText(sUrl)
IE.Navigate sUrl
Do Until IE.ReadyState = 4:WScript.Sleep 10 : Loop
WebText = IE.Document.Body.InnerText
End Function
Function WebHTML(sUrl)
IE.Navigate sUrl
Do Until IE.ReadyState = 4:WScript.Sleep 10 : Loop
WebHTML = IE.Document.Body.InnerHTML
End Function
Sub fWrite(FilePath, sData)
'Given the path to a file, will return entire contents
With CreateObject("Scripting.FileSystemObject")._
OpenTextFile(FilePath, 2, True)
.Write sData: .Close
End With
End Sub
IE.Quit
MsgBox ("Web Pages Saved As Text Files") Tag: Repost: Verify Password Complexity Tag: 137681
Enumerate All file attributes
anyone have a script that will return the file attributes of all files
in a folder and it's subfolders?
Thanks
azeem. Tag: Repost: Verify Password Complexity Tag: 137679
Hacking MS Exchange
Is is possible to create a script that can access the internet mail service
queues and delete anything that does not have an originator? If so, does
anyone have an example? Sorry for the xpost. Tag: Repost: Verify Password Complexity Tag: 137674
document.Cookie
Hi
I have just created my first OCX in VB6 and all works great!
Next I want to read parameters from the hosting web page and store user
information locally on their disk.
And pointers on how to do either.
I have been looking at :
UserControl.Parent.script.Document.cookie
but can't seem to retrieve all the parameters or set them?!
I know this a VB script forum but it would seem more appropriate given the
script.document,cookie bit!
Thanks Tag: Repost: Verify Password Complexity Tag: 137671
Change File Attributes
Hello, I need to copy a folder and all it's files to a new location
for backup. How do I change the attributes of the destination
read-only files so I can overwrite them for the copy and then reset
the attribute after the copy?
Anyone?
Thanks. Tag: Repost: Verify Password Complexity Tag: 137666
Listing all Forest users
I want to write a script which will list all the users in each domain in a
forest.
So far i have been able to list all the domain and subdomains on the forest.
The problem is that when i try to list each domain users i get only the user
list of my current domain (the domain my account belongs to).
This should not be a permissions problem, since i query the nearest Global
Catalog for the user list.
Any help / suggestions would be appreciated. Tag: Repost: Verify Password Complexity Tag: 137663
internal Mail server (exchange) won't accept CDONTS generated mail
We have several forms on an intranet which are used to
submit information to a database, but also in some case to
generate notices to relevant staff as emails.
I have checked
mailroot/queue
mailroot/badmail
and the messages are getting to queue (*.eml) and some
time later to badmail. Even the mail undelivable messages
don't get sent. But they do contain:
>>>
Unable to deliver message to the following recipients, due
to being unable to connect successfully to the destination
mail server.
paul.ritchings@nulc.ac.uk [or whatever]
<<<
The scripts will work however if the address is an
external one.
eg: someuser@ntlworld.com
Has anyone got any idea what might be causing this.
ps. I don't have access to the mail server. And have
limited rights on the webserver. Tag: Repost: Verify Password Complexity Tag: 137660
Does anyone know how to verify if Password Complexity is
enabled on a Windows 2000 Server that is in a workgroup
(i.e. Local Security Policy of the server) using vbscript?