Open File dialog
Hi,
Some days ago, I've posted a message to NG, a question about how to call a
windows OpenFile dialog, which McKirahan response it with a code example
(listed below).
Now, these example doesn't work well for me, because I need that valid
selection are only for files and not for folders.
And this example works fine if selected item is a folder, but if the
selected item is a file, the BrowseForFolder method return null.
Any suggestions or workaround???
Option Explicit
On Error Resume Next
Dim strBFF
Dim objSHL
Set objSHL = CreateObject("Shell.Application")
Dim objBFF
Set objBFF = objSHL.BrowseForFolder(&H0,"Open File",&H4031,&H0011)
strBFF = objBFF.ParentFolder.ParseName(objBFF.Title).Parent
WScript.Echo objBFF
Set objBFF = Nothing
Set objSHL = Nothing
WScript.Echo strBFF
Thanks.
M.- Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146892
VBScript Logon Script Error
When using the VBScript Join function to map users to folders based on
group membership, on some Windows 2000 computers I get a runtime error
on join and others I don't. If I remove the join function, the PC's
that didnt work, now work and the ones that did work with join no
longer work. I am confused. What am I missing?
Set wshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
' strGroups = LCase(Join(CurrentUser.MemberOf))
' strGroups = LCase(CurrentUser.MemberOf) Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146888
WshShell issue with WScript
I'm writing code for a VB Script task in a SQL Server DTS
package. Snagged the following code to run a command line
app and want to use the bit where it uses WScript.Sleep to
wait until the executable has finished.
However, both in the DTS task and if I place the following
code in a VB standard .exe I get a run-time error when I
reference WScript.
What's going on? Note, the command line exe does get
called and does run.
Code:
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("path to .exe")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status
Set oExec = Nothing
End Sub Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146882
Need to write script/batch file to delete selected files
I have a server that we use as a file repository for our daily reports.
The reports are *.txt files, all of them. They come from another domain,
and are "canned" reports that I have no control over.
Each day, we have up to 35-40 of these reports, and the naming convention
has been:
98129918.txt
where:
98 = year
12 = month
99 = denotes the Month End file, which I need to save
18 = unit reporting
The daily outputs the exact same naming convention, with the exception of
the third node (the 99 above) corresponding to the day of the month (00 to
31).
There are over 70,000 files in this directory, taking up 12 gigs on a hard
drive, so the function needs to be automated.
I need to write a script or batch file to save all of the xxyy99zz.txt
files, and to delete all of those not matching that filter from a date
beginning say around 1/1/2002. Anything prior to 1/1/2002 would need only
the month-end files (the ones with ____99__.txt naming), and anything after
that would need to exist until such time I modified the script to have
another cut-off date.
Anyone have any ideas as to how to accomplish this? I am not very fluent in
WSH.
You can respond via the newsgroup, but do not reply to the address, as it is
not valid thanks to the pounding of the Swen virus. Email me at
schathamNO@FREAKINGyahooSPAM.com remove NO FREAKING SPAM to respond....
Thanks
S Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146880
Need Files, HELP....
Question Title: Accessing Win32 API using vbscript
Author: Spidercide
Points: 500
Date: 11/10/2003 08:07AM MST
I am trying to use Win32 API's with vbscript. Specifically I am trying
to use FindWindowLike to see if I already have an instance of Excel
open. In my travels I have learned that you can not access Win32 API's
from vbscript(with good reason).
I know I have to create a secondary .ocx(control) file to enable me to
access the win API functionality.
I was looking around and I found a nice solution at
http://www.ahml.lib.il.us/pfw/VBS.html
He has a sample of how to do it, but it requires two other .ocx files
and these files are not supplied. He suggests buying a book "Windows:
Scripting Secrets" by Tobias Weltner and use the two .ocx files
supplied. Went and picked up the paperback, no CD no text copy of
files inside.
Does anyone know where i can get the two files(clipboard.ocx and
winmanag.ocx) from this book.
Thanks in advance. Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146866
W2K tool to disable (not delete) active directory machine accounts
I need a COMMAND LINE tool to disable (and later delete)
machine accounts from Active Directory so that I can
script the whole ordeal. TIV, Dale Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146860
Do Loop Help...please...
I'm using the Novadigm RADIA solution to deploy software throughout
my enterprise and I'm having a hell of a time with a Mass Deployment
script I wrote.
While deploying software to multiple machines I'd like the script to
recognize if a process is running (because if it is it will hang the
entire deployment) I tried to put another loop statement in my code
but I always get a runtime error requiring another Do. Basically, I'd
like the script to skip the machines on the list with the process
running and move onto the next machine. Right now I have it killing
the process
set objTextStream = objFSO.OpenTextFile("comps.txt", ForReading, true)
Set objFile = objFSO.OpenTextFile("results1.txt", ForAppending, true)
objFile.WriteLine "|SOFTWARE-------( << |+_+| >> )----------SLAM!|"
objFile.WriteLine Now
objFile.WriteLine APP_1
objFile.WriteLine "-----------------------------------------------"
Do While NOT objTextStream.atEndofStream
strTextLine = objTextStream.ReadLine
CompHost = (strTextLine)
Do Until RADPINIT = 0
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & CompHost &
"\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'RADPINIT.EXE'")
If colProcesses.Count = 1 Then
RADPINIT = 1
else
RADPINIT = 0
end If
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & CompHost &
"\root\cimv2")
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radexecd'")
For Each objService in colServices
errReturnCode = objService.StopService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radsched'")
For Each objService in colServices
errReturnCode = objService.StopService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radstgms'")
For Each objService in colServices
errReturnCode = objService.StopService()
Next
objShell.Run "%comspec% /c pskill \\"&CompHost&" radpinit&pskill
\\"&CompHost&" radskman&pskill \\"&CompHost&" radrexxw&pskill
\\"&CompHost&" nvdtray&pskill \\"&CompHost&" nmciutils"
objShell.Run "%comspec% /c pskill \\"&CompHost&" radpnlwr&pskill
\\"&CompHost&" radiamsi&pskill \\"&CompHost&" radconct&pskill
\\"&CompHost&" msiexec"
objShell.Run "%comspec% /c pslist \\"&CompHost
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radexecd'")
For Each objService in colServices
errReturnCode = objService.StartService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radsched'")
For Each objService in colServices
errReturnCode = objService.StartService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radstgms'")
For Each objService in colServices
errReturnCode = objService.StartService()
Next
Loop
objFile.WriteLine CompHost&" - Pushing"
objShell.Run "C:\PROGRA~1\NOVADIGM\RADNTFYC " & CompHost & " WAIT
C:\PROGRA~1\NOVADIGM\RADSKMAN
CAT=PROMPT,ULOGON=N,MNAME=RADDBT3,DNAME=SOFTWARE,PORT=3464,UID=$MACHINE,IP=10.16.21.185,IND=N,STARTDIR=SYSTEM,CONTEXT=M,ADD=N,UPD=N,DEL=N,REP=N,VER=N",
1, TRUE
objShell.Run "C:\PROGRA~1\NOVADIGM\RADNTFYC " & CompHost & " WAIT
C:\PROGRA~1\NOVADIGM\RADSKMAN CAT=N,SNAME=" & APP_1 &
",ULOGON=N,MNAME=RADDBT3,DNAME=SOFTWARE,PORT=3464,UID=$MACHINE,IP=10.16.21.185,IND=N,STARTDIR=SYSTEM,CONTEXT=M,ADD=Y,UPD=Y,DEL=Y,REP=Y,VER=Y",0,false
loop Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146851
Problem with CopyHere and Windows XP
Hello
I have a problem with a simple script that should copy a folder.
The script works with W2K but on Windows XP nothing is copied.
dim wsshell
dim Target
dim Source
set wsshell = CreateObject("Shell.Application")
set Target = wsshell.NameSpace("E:\")
Source = "\\192.168.115.247\Backup\Backup*"
Target.CopyHere Source, FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR
set Source = nothing
set Target = nothing
set wsshell = nothing
'object.CopyFolder' instead works fine but I like to see a progress
dialog while copying.
I found a message <3C0C8F69.AFEF2133@hydro.com> that says Windows XP has
a bug processing wildcards. Can anyone confirm this.
TIA
Knut
--
Sorry, but I'm not very keen on spam
MyName: knut.beese
MyDomain: arcor.de Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146850
Client side form script
does anyone know a script i can use to send a form to an
email address without using a cgi?
any script or suggestions would be useful
thanks
Dave Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146846
scripting as a career
hi,
does anyone does scripting (wsh & wmi) as their career?
can share with me what's you job like?
thanks Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146844
Error 8 when creating process
Hello,
Here is the code:
errReturn = objWMIService.create("c:\RInstall.bat", null, null,
intProcessID)
If errReturn = 0 Then
wscript.Echo " Process started with ID : " & intProcessID
Else
wscript.Echo "errReturn: " & errReturn.
End If
I get errRetuen = 8 on many servers. What does error 8 mean?
Thanks,
Wensi Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146841
filtering security event log
I am trying to return a list of all security events with a "failure". I have
the following:
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Security)}!\\" & _
strComputer & "\root\cimv2")
Set wbemObjectSet = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where" _
& " Logfile = 'Security' and Type = 'audit success'",,48)
For Each wbemObject In wbemObjectSet
wbemObject.Message = Replace(wbemObject.Message,vbcrlf & vbcrlf,vbcrlf)
if (???? = "failure") then
if (x<200) then
Wscript.Echo "RecordNumber: " & wbemObject.RecordNumber
Wscript.Echo "EventCode: " & wbemObject.EventCode
Wscript.Echo "Message: " & wbemObject.Message
x=x+1
else
exit for
end if
end if
Next
The problem is... I can't figure out what to use for the ??? I listed in the
if statement.
Two questions: 1. What can I use for the ??? and 2. Where can I find a
listing of the objects used to access the security event log? I know it's
out there, I just can't find it.
Thanks. Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146836
ADO to Determine REQUIRED Field
Hi,
I have a need to use ADO to Determine If a Field Is a
REQUIRED Field in an Access Table.
The only example I can find is ISAUTOINCREMENT.
http://support.microsoft.com/default.aspx?scid=kb;en-
us;304100
Please help!
Thank You in advance,
t Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146832
outlook send mail
The script below sends e-mail messages taken from txt files using outlook com object .
Create your .txt file with
1) first line: destination e-mail address
2) second line: Subject
3) third line to end of file: body of the message.
All the txt files should be in the same directory
of the script.
The program tries to send the message if in the
first line finds a "@" and a dot, which could be
an e-mail address.
I hope comments in the code will help.
Giovanni.
(Aosta, Italy)
'<%
'Outlook SendMail.vbs
'Versione VBS di un programma già in Visual Basic 5, già modificato
'per l'uso con un oggetto COM e ora per appoggiarsi al modello ad oggetti
'di Microsoft Outlook
'Nella cartella corrente ci sono dei files txt contenenti messaggi di
'posta elettronica. Le prime righe di ogni file contengono rispettivamente :
'1) Indirizzo e-mail del destinatario
'2) Oggetto del messaggio.
'Le righe successive contengono il corpo del messaggio.
'Il programma utilizza l'oggetto COM di Outlook (non express)
'Apre ogni file e se è un messaggio (la prima riga contiene una "@"), lo invia.
'[c] Cenati Giovanni 08.06.02 nnever @katamail.com
'Modificato 19.09.03 per outlook
'This script looks for txt files in current (script) directory and
'if they are message files (with a valid e-mail address in the first line)
'sends the message using outlook (not express).
'The txt file must contain:
'In first line a valid e-mail address of the recipient
'In the second line the subject of the message
'From the third line to the end of file, the body of the message.
dim fso 'as filesystemobject
dim objOL 'as Outlook application
dim CartellaPosta
'oggetto directory dove ci sono i messaggi in formato testo
'Directory where to look for the messages.
dim Messaggi
'collezione di files in CartellaPosta. Collection of files in the folder.
dim FileMsg
'oggetto file trovato in CartellaPosta. Single file object in the folder
dim Messaggio
'file aperto in lettura contenente l'E-Mail. File openend to read the message
dim ContaMail
'numero di messaggi e-mail spediti. Number of sent e-Mails
'Crea istanza agli oggetti necessari al programma
'Creates needed objects
set fso = CreateObject("Scripting.FileSystemObject")
Set objOL = CreateObject("Outlook.Application")
'Ottiene la directory dove è situato script
'Retrieves script directory
ScriptFullName =wscript.ScriptFullName
CurrentPath = Left(ScriptFullName, InStrRev(scriptfullname, "\")-1)
'Recupera tutti i files della directory
'Sets folder where to look for messages and reads all files
set CartellaPosta = fso.GetFolder(CurrentPath)
Set Messaggi = CartellaPosta.Files
For Each FileMsg in Messaggi 'Processa ogni file della cartella
if ucase(right(FileMsg,4))=".TXT" then
'se è un txt... If it's a txt...
Set f = fso.GetFile(FileMsg) 'Ne recupera il nome
Set Messaggio = f.OpenAsTextStream 'Apre il file
'Legge le righe del file contenenti le intestazioni del messaggio e-mail
EmailDestinatario = Cstr(Messaggio.readline)
'Prima riga: indirizzo e-mail del destinatario
'First line: destination e-mail address
Oggetto = Cstr(Messaggio.readline)
'Seconda riga: Oggetto del messaggio
'Second line: subject
Body= ""
'Svuota la variabile e legge tutte le righe del corpo del messaggio.
'Empty the variable which will contain the body of the message.
Do While not Messaggio.AtEndOfStream
Body = Body & Messaggio.ReadLine & vbcrlf
Loop
Messaggio.Close 'Chiude il file contenente il messaggio
'Controllo validità dati. Control of e-mail address
'Se l'indirizzo del mittente non è una e-mail passa al prossimo messaggio.
if instr(1,EmailDestinatario, "@")>1 and instr(1,EmailDestinatario,".")>1
then
'Invia il messaggio. Sends the message
Set objMSG = objOL.CreateItem(0) 'Crea nuovo messaggio. Creates
new message.
With objMSG
.Subject = Oggetto
.To = EmailDestinatario
.Body = Body
.Send
End With
ContaMail = ContaMail +1 'Conta messaggi inviati. Counts messages
sent.
end if ' e-mail?
end if ' TXT?
Next 'File
Report = "Files: " & Messaggi.count & chr(13)
report = report & "Messaggi e-mail: " & ContaMail & chr(13)
report = report & "Fine Programma"
msgbox report ,,"Outlook Send Mail by Cenati Giovanni"
--
Giovanni Cenati (Aosta, Italy)
Write to user "nnever" and domain "@katamail.com" Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146827
Problem with the scriptomatic tool
If I am execute the Scriptomatic tool I will get the Message
Line 143
Error: The procedure could not be continued due to the folgennden error:
80041001
Does someone know where it comes from and what to to to solve it ?
Windows Xp Prof SP1
Axel Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146812
Remove account from Administrators group via script
First, an apology. This is my first attempt at what I think (hope) may be a
cross-post. (I'm not that familiar with posting to newsgroups so please
don't flame me if I've done it incorrectly. I've tried posting to a single
newsgroup but haven't found the info I'm looking for... hence this first
attempt to post to multiple newsgroups at the same time. I understand this
is the 'proper' way to ask in various newsgroups, all at the same time,
rather than send the same query to individual newsgroups.)
Second - my problem...
Our cloned PC's include a 'Change Clone' script that lets our PC installers
change the IP address, subnet mask, gateway, computername and workgroup via
popup input boxes. So far, so good.
I need to add "remove the 'Windows User' account from the 'Administrators'
group' " to the "Change Clone" script. Up to now I've used AutoIt ('cos I
don't know any other way). It works but I realise it's a kludge.
Can anyone point me in the right direction, via a VBS/WMI (or whatever)
script, how I can remove a 'Windows User' account [Power User] from the
'Administrators' group and leave it as a Power User?
I've trawled the 'Google' group archives but can't find anything relevant
(we use Novell - not MS - so ADSI scripts aren't the answer).
PS - Is there a more appropriate newsgroup for queries about large-scale
setups and deployment than microsoft.public.windowsxp.setup_deployment?
I've seen so may queries re: individual users losing MS Product ID's, etc.
and wondered if there was a 'commercial/industrial/organisational' newsgroup
I would be better off following. I mean no disrespect to individual users
but some problems are different for larger-scale setups and deployment.
Any help would be greatly appreciated.
Rick Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146811
Modify this script please
I found this nifty dual explorer script:
<--Script Start-->
set shellApp = createobject("shell.application")
set shell = createobject("wscript.shell")
shellApp.MinimizeAll
shell.run "explorer.exe c:/"
shell.run "explorer.exe c:/winnt"
wscript.sleep 3000 '<== adjust as needed
shellApp.TileVertically
<--Script End-->
Author: Michael Harris
What I would like to do is modify it so that when this script
executes, it will check if two explorer's are already open. I will
only be using 2 explorers tiled vertically at any given time.
Basically, here's the rundown on the scripting logic that I would like
but not sure if WSH or VBS can do this (Hope someone can make sense of
it):
function dualexplorer
Minimze All
open two explorer.exe
tile vertically
end function
Set X = explorer.window.count
if X < 2 then
close all explorer.exe windows
call function dualexplorer
end if
if x = 2
minimize all
bring both explorer windows to front
tile vertically (in case is has been moved)
end if
if x > 2
close all explorer.exe windows
call function dualexplorer
end if Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146809
Html page running processes
From an html page I want make a Menu with 3 options by 3 anchor tags:
open a pdf file, run Notepad.exe or run Setup.exe.
Can I override the warning messagge appearing from the exe files?
Regards
Sandro Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146807
Using JScript from VBScript (most cruelly)
Just woondering whether anyone has done any significant experimentation with
using very simplistic wrapups of JScript objects to access them almost
directly from VBScript, like in the following WSF example.
If anyone has, are there any intriguing uses people have found for this
(other than making Mr. Hickman laugh, that is <g>)?
===============================================
<?xml version="1.0" encoding="ISO-8859-1" ?>
<job>
<script language="JScript"><![CDATA[
function jsArray(){return(new Array());};
function jsBoolean(){return(new Boolean());};
function jsDate(){return(new Date());};
function jsFunction(){return(new Function());};
function jsGlobal(){return(new Global());};
function jsMath(){return(new Math());};
function jsNumber(){return(new Number());};
function jsObject(){return(new Object());};
function jsRegExp(){return(new RegExp());};
function jsError(){return(new Error());};
function jsString(){return(new String());};
]]></script>
<script language="VBScript"><![CDATA[
Set a = jsArray()
for i = 1 to 10
WScript.Echo a.push(i)
next
do while a.length > 0
wscript.echo a.pop()
loop
]]></script>
</job> Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146806
Zipping Folders from Script
I'd like to be able zip a folder from script. I found this article:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/scrguide/sas_fil_tbch.asp
This addresses "compressing folders to save disk space." Cool, but
not what I"m looking for. I want to take a folder, and generate a
single file with a "zip" extension.
Since I can right-click on a folder and say "Send to Compressed File,"
I have a feeling it's possible from code. For the record, I
investigated that icon in the SendTo folder, but I couldn't see
anything that would help me.
Deane Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146805
Access "Date Picture Taken" Property
Is there a way to use VBS to return the property that
appears in the 'My Pictures' folder? The property in
question is listed when you select 'details' and is
denoted in the column headers as "Date Picture Taken".
Thanks in advance,
Abe Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146795
Listbox asp .net
Hello, I am trying to create a list box in asp into which
I can load the values dynamically(The user will enter a
value and based on that the list box is populated). For
some reason it does not allow me to do this:
Listbox1.items.add
Is there another way to add values dynamically to a list
box using vbscript in asp?
Thanks,
Sean Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146771
compiled Vbscript
Do you know if is it possible to create a compiled file (.exe) from a
Vbscript or VBA code in order to do a little application? This program must
work on pc without VB or other programs installed?
Thanks
Sandro Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146758
HELP REQUIRED: Scripting.Dictionary - Library Not Registered
Hi!
I have downloaded an opensource e-store application called comersus
written is ASP and installed on IIS 5.0. When i call the main page, it
throws up an error -
Scripting.Dictionary....Library Not Registered
I scoured through usenet and tried out things posted there. What i did
so far -
1. Downloaded Microsoft Scripting Engine 5.6, installed - NO USE
2. Re-installed MSIE 6.0 - STILL DOESN't WORK
(I had earlier installed .NET framework and uninstalled as it made the
machine very slow) Also Scripting.FileSystemObject cannot be
created..same Error!
I would greatly appreciate your suggestions and comments to help me
rectify this problem.
Thanks,
Vijay. Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146753
Newbie question about MSGBOX
Hi all and thanks in advance for any pointers anyone could provide.
I am working on a script and I need user input for it.
Is it possible to make a msgbox popup and ask for option 1, option 2,
or option 3. Then give a response that simply says option has been
executed.
Thanks again.
Mike Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146744
Random Failures with InternetExplorer.Application Object
Here is a snippet of my code:
Set oIE = WScript.CreateObject("InternetExplorer.Application")
With oIE
.Left = 50
If Err Then MsgBox Err.Number & ": " & Err.description
.Top = 50
.Width = 690
.Height = 530
.Menubar = False
.Resizable = True
.Statusbar = False
.Toolbar = False
.Navigate("about:blank")
Do Until .ReadyState = 4 : WScript.Sleep 100 : Loop
.Visible = True
End With
My original code did not include the If Err statement. On occasion,
this code would hang forever, and there was nothing I can do to make
it go away. I literally just wait for a while - two minutes, thirty
minutes, two hours... - and try my script again, and usually it works.
So I added the If ERR statement to try and solve this, as I have been
dealing with this for about two years now. It was working for a
while, but then I started getting the following error:
462: The remote server machine does not exist or is unavailable
If I hit Ok on the MsgBox, the script hangs forever, so I know this
error is being generated when my system is in the state that causes my
script to hang forever. I have two questions: 1) Why does this
sporadically happen, and, more importantly 2) What can I do to fix the
problem, other than waiting around for my computer to fix itself? I
have run into this problem on numerous machines on NT/2K/XP and
browsers 5.x-6.x, so it does not seem to be OS- or
IE-version-dependent. Please someone shed some light on this... Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146727
Script to import email address
Hi,
I need help. Can someone assist me on how I can write 2
script, know a site that someone already written, or point
to me a place of the sample script containing what I need?
Here is the story why I need this 2 script. First start, I
have Windows 2000 and Windows 2003 Domain running Active
Directory. Each Domain contains about 500 User accounts.
First script....
I have a file called emails.txt containing each user's
email address. I need a script where it will import
emails.txt to Windows Domain for each user. Of course, the
script will need to determine who email addresss belong to
which userid. After the script complete its task, the
email address should display in the General tab of each
account.
Second script....
I need a script where it will look into the field of when
the password will expire. The script will need to
determine how many days before the expiration. After
determine the days of expiration, then the script will
send an email notification to the rightful account owner
stating that there account will expire in this many days.
An example of the scenerio I am looking for.....
A script that will import emails.txt into the rightful
account under the General Tab. A script then determine
that the user still have 17 days left for the password
expiration before user need to change his/her password.
Then the script will email a notification to each
individual users that will expire in 17 days informing
them to change their password.
I apologize for asking too much. I hope someone can help
me on this matter. Thank you Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146713
Changing NIC Speed
Anyone have any ideas how I can change the speed on my NIC's with a script.
Thanks
Gavin... Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146711
executing excel macro
I have an an excel sheet that executes the macro by
opening the sheet.
Now I want to have it in vbscript and below is what I
have and it doesn't work. Any help would be appreciated.
Thanks
<SCRIPT LANGUAGE="VBScript">
Dim oXLS
'Start Excel object:
Set oXLS = CreateObject("Excel.Application")
'Make Excel visible:
oXls.Application.Visible = true
'Open a new sheet:
oXLS.Workbooks.Open "C:\scorecard macro.xls"
'//Close Excel:
oXLS.Application.Quit()
</script> Tag: FSO.GetFile("http://www.internet.com/file.zip") Tag: 146707