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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date 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: validate date Tag: 137660
automatic installing
Hello,
How can I automatize the insertion of the key code number in a form usign
VisualBasic script?
Thank oyu a lot!
Alberto Gori Tag: validate date Tag: 137659
how to automatically download files to specified location
When you click file link to download a file, a window
pops up to confirm the file download. And it will ask you
to select the location to save your file. Can I customize
this task to automatically do these things in background
by programming? and how?
Thanks. Tag: validate date Tag: 137658
Word 2002 Automation / Windows 2000 SP4
I have a program that uses word automation to open word,
open a document, print a selected document, and closes
word. Before I installed SP4 for Windows 2000, the
following code worked flawlessly:
Dim objWord
Set objWord = CreateObject("Word.Application")
objWord.Documents.Open strFileName, false, true, false
objWord.Application.DisplayAlerts = 0
objWord.Application.ActivePrinter = "HP_printer"
objWord.Application.PrintOut true,,0,,,,,1
objWord.ActiveDocument.Close false
objWord.Quit
Set objWord = Nothing
In DCOMCNFG, I have Word set to run under the identity of
Administrator, in order to have access to all network
resources.
This was on Windows 2000 SP3.
Since I installed SP4 for Windows 2000, this Word
automation does not work. Whenever I call the line in the
above code 'objWord.documents.open ... " the program
freezes and the word process hangs. The same happens if I
try to run this code in a macro in Word VBA. Whenever it
gets to the line that opens a file, and the file is on a
shared network resource, it hangs. Again, this worked
prior to SP4. Is there a new security setting in SP4?
I have tried uninstalling Office, restarting, and
reinstalling Office, but that did not work.
Any help would be GREATLY appreciated. Thanks! Tag: validate date Tag: 137656
pass data to a dll
I'm new in this process, I have an asp page that is calling vb dll. I need
to pass a varaible to the dll from the asp page, then the DLL will execute a
stored procedure. In the SP the where clause is based on the variable being
passed from the asp page/dll.
How can I accomplish this? Tag: validate date Tag: 137649
Creating local user accounts
hi folks. i have a little problem creating local users on a windows 2000
system with the user object.
problem is, that the local security policies do not allow a blank password.
is there a way to directly set the password when creating the user
account??
i only know of the method with setpassword. but that requires that the user
already exists.
another way would be to temporarily disable the local security policies.
how do i do that with a script?
thanks in advance Tag: validate date Tag: 137647
Using EOLWTSCOM module to enumerate Terminal server profile in AD
I am using EOLWTSCOM (ftp://ftp.go-eol.com/public/thinssentials/wtscom/) You
can use this module to set and enumerate Terminal Servers settings in AD.
I am having trouble enumerating some properties. The properties show up as
boxes (invalid charactors). I think I need to change data types. I 'm not
sure how to do this.
This is my code below:
Const WTSUserConfigInitialProgram = 0
Const WTSUserConfigWorkingDirectory = 1
Const WTSUserConfigfInheritInitialProgram = 2
Const WTSUserConfigfAllowLogonTerminalServer = 3
Const WTSUserConfigTimeoutSettingsConnections = 4
Const WTSUserConfigTimeoutSettingsDisconnections = 5
Const WTSUserConfigTimeoutSettingsIdle = 6
Const WTSUserConfigfDeviceClientDrives = 7
Const WTSUserConfigfDeviceClientPrinters = 8
Const WTSUserConfigfDeviceClientDefaultPrinter = 9
Const WTSUserConfigBrokenTimeoutSettings = 10
Const WTSUserConfigReconnectSettings = 11
Const WTSUserConfigModemCallbackSettings = 12
Const WTSUserConfigModemCallbackPhoneNumber = 13
Const WTSUserConfigShadowingSettings = 14
Const WTSUserConfigTerminalServerProfilePath = 15
Const WTSUserConfigTerminalServerHomeDir = 16
Const WTSUserConfigTerminalServerHomeDirDrive = 17
Const WTSUserConfigfTerminalServerRemoteHomeDir = 18
Set oWTSCOM = CreateObject("EOLWTSCOM.WTSCOM")
MsgBox oWTSCOM.WTSQueryUserConfig("DC", "samAccountName",
WTSUserConfigTerminalServerProfilePath)
MsgBox oWTSCOM.WTSQueryUserConfig("DC", "samAccountName",
WTSUserConfigfAllowLogonTerminalServer)
MsgBox oWTSCOM.WTSQueryUserConfig("DC", "samAccountName",
WTSUserConfigfDeviceClientDrives)
MsgBox oWTSCOM.WTSQueryUserConfig("DC", "samAccountName",
WTSUserConfigfDeviceClientPrinters)
MsgBox oWTSCOM.WTSQueryUserConfig("DC", "samAccountName",
WTSUserConfigfDeviceClientDefaultPrinter)
If anyone has experience enumerating the last 4 properties, I would be
forever greatful.
Thanks,
Dan Tag: validate date Tag: 137632
Email
newbie...when I run a script that sends an email...it pops up a dialog
box that says "Another program is trying to access your address book
to send a message..." How do I turn this off or accept it
automatically??
Function SendEmail(MailRecipient1, Subject, Message)
Const olMailItem = 0
Dim OutlookProfile: OutlookProfile = "MS Exchange Settings"
Dim objoutl, objNameSpace, objMailItem
Set objOutl = WScript.CreateObject("Outlook.Application")
Set objNameSpace = objOutl.GetNameSpace("MAPI")
Set objMailItem = objOutl.CreateItem(olMailItem)
objMailItem.Recipients.Add(MailRecipient1)
objMailItem.Subject = Subject
objMailItem.Body = Message
objNameSpace.Logon OutlookProfile
objMailItem.Send
objNameSpace.Logoff
End Function Tag: validate date Tag: 137622
Identify if Windows version is US, FR, DE, etc..
Hi,
I am looking for a scriptable way to identify if the Windows version is a
US version, a French version, a German version, etc... ?
Also is there a way to do the same thing for SQL Server and Office ?
Regards,
Fred. Tag: validate date Tag: 137620
collection of objects??
Hi,
I was wondering if/how you could (in vbscript - jscripters and .net
scripters chime in too) define a class then instantiate multiple instances
and keep track of them. Do you use an array??
Thnx,
Bill Wallace Tag: validate date Tag: 137608
Is machine present
Is there a quick way of finding if a machine is present on the network (not
present in the AD). I mean, a machine might be in the AD but switched off or
removed from the network.
I though I would use this code to check for the c$ share (something all our
machines have) but its dog slow.
Function ExistShare(sComputer, sShare)
Set oWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" &
sComputer & "\root\cimv2")
Set colShares = oWMI.ExecQuery ("Select * from Win32_Share WHERE name = '"
& sShare & "'")
If colShares.Count > 0 Then
ExistShare = True
Else
ExistShare = False
End If
End Function
Any ideas how i can do it, or speed the process up ?
Olly
--
________________________________________________
ADSSupport.net
http://www.adssupport.net
Dedicated free Active Directory ServicesT support
email: oliver.marshall@nospam@adssupport.net Tag: validate date Tag: 137607
set NTFS file compression by script
How do I set a file to use NTFS file compression by vbscript? I have a
script that makes a backup of an Access database, runs database compress and
repair then renames it.
Option Explicit
CallCompress "\\....\...\mystuff.mdb"
'beep
WScript.CreateObject("Wscript.Shell").Run "%comspec% /c echo "&chr(7),0,true
sub CallCompress(origMdbFile)
'based on backupDBs.vbs by Doug LaMar at dlamar@lamarsoft.com
Dim IsLocked, destMdbFile, origLdbFile, fso
origLdbFile = Left(origMdbFile,(Len(origMdbFile)-3)) & "ldb"
destMdbFile = Left(origMdbFile,(Len(origMdbFile)-4)) & " " & _
Year(Now()) & right("0" & Month(Now()), 2) & _
right("0" & day(now()),2) & ".mdb"
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
IsLocked = True
While IsLocked
If (fso.FileExists(origMdbFile)) Then
If (fso.FileExists(origLdbFile)) Then
' Database locked by Access
IsLocked = True
WScript.Sleep 60000 ' Wait 1 minute
Else
' Database free
IsLocked = False
End If
Else ' File doesn't exist
WScript.Quit
End If
Wend
DoCompress origMdbFile, destMdbFile
Set fso = Nothing
end sub
sub DoCompress(strSourceDB, strDestDB)
CreateObject("Access.Application").DbEngine.CompactDatabase strSourceDB,
strDestDB
If Err.Number > 0 Then MsgBox "The following error was encountered while
compacting database:" & _
vbCrLf & vbCrLf & Err.Description
end sub Tag: validate date Tag: 137601
send mail with vbs in lotus notes
This is a multi-part message in MIME format.
------=_NextPart_000_0021_01C340C6.97B1A590
Content-Type: text/plain;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
hey i newbie and my question is:
can a make a script that send me a email in lotus notes /domino =
envoriment
becuse i dont have direct internet access?
------=_NextPart_000_0021_01C340C6.97B1A590
Content-Type: text/html;
charset="windows-1255"
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=3Dwindows-1255">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2>hey i newbie and my question =
is:</FONT></P>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2>can a make a script that send me a email =
in lotus=20
notes /domino envoriment</FONT></P>
<P><FONT face=3DArial size=3D2>becuse i dont have direct internet =
access?</FONT></P>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2></FONT> </P></DIV></BODY></HTML>
------=_NextPart_000_0021_01C340C6.97B1A590-- Tag: validate date Tag: 137599
File Object will not open
[Win XP; IIS 5.1]
This VB script (ASP) does not work. It fails when trying
to open the file; says it doesn't exist (after a long
wait) despite the 'if' statement evaluating to True. It
worked fine in PWS on Win98. I am at a complete loss!
--Start code sample
Set fso = CreateObject("Scripting.FileSystemObject")
sFilePath = "c:\inetpub\wwwroot\test.txt"
If fso.FileExists(sFilePath) Then
Set f = fso.OpenTextFile(sFilePath, 1, True)
[... stuff deleted from sample ...]
/--End code sample Tag: validate date Tag: 137598
Copying Folders
Hi all!!
I have recently receive a task from my boss to write script that will copy
contents from one folder (including all subdirectories and files) into
another folder but without deleting old files in the target folder!!
Let me give an example:
There are folder on my CD-ROM, let's say it's path is D:\folder1, with a lot
of files and subderictories. There are folder on my hard disk,
C:\test\folder2. I want to copy all contents from folder 1 to folder 2, but
without replacing files in folder2 with that from folder1 in case that are
the same.
I have found some example scripts in "Windows 2000 scripting guide", and on
the net using shell.application object or copyfolder method in
filesystemobject, but they all replace old files with the new ones. I want a
script that will preserve an old files in folder2!
Thanks
Vinko Malada Tag: validate date Tag: 137594
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" <dunggaze@yahoo.com> wrote in message
news:8b4Oa.76541$x4o.47617@news04.bloor.is.net.cable.rogers.com...
> 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
>
>