Local users
Hello,
I need to make a lot of *local* users, set their password and set the password
flag to NOT require that the password be changed. Anybody have one of these
already cooked?
All suggestions will be greatly appreciated.
TIA,
Bill Burke
bill@2burkes.com Tag: Is this the new fomat for Scripting.VBScript? Tag: 154002
scrolling text
I have a page, all items are hidden. The idea was to let the onformload
event trigger the page transformation.
Ive written teh following code that should case 1 letter to scroll
across the screen till it hits the leftedge of its area then another
character follows across and so and so on.
ive tested teh code in vb6 and it works great. yet on teh page all i get
is the company name appearing.
any ideas?
Option Explicit
dim Outpos
dim InPos
dim InString
dim InLen
dim wrkString
dim LastPos
sub Load_Main_Header_Line
inlen = 0
lastpos = 0
outpos = 0
Instring = "Company Name Here"
inlen = len(trim(instring))
wrkstring=space(inlen)
mainheader.style.visibility="visible"
mainheader.align="left"
mainheader.style.fontFamily ="impact"
mainheader.style.fontSize ="36pt"
mainheader.style.fontWeight ="bold"
lastpos = 1
outpos = inlen
inpos = 1
for inpos = 1 to inlen step 1
Get_A_Character
next
mainheader.innerText = trim(instring)
mainheader.align="center"
end sub
sub Get_A_Character
dim onechar
onechar = mid(instring, inpos, 1)
if onechar <> space(1) then
outpos = inlen
for outpos = inlen to lastpos step -1
Slide_It_Left
next
End if
lastpos = lastpos + 1
end sub
Sub Slide_It_Left
dim onechar
dim outString
dim tmpstring
dim oldpos
outstring = space(inlen)
onechar = mid(instring, inpos, 1)
tmpstring = wrkstring
'<-- space out last position
oldpos = outpos + 1
if outpos > 0 then
if oldpos <= inlen then
wrkstring = left(tmpstring,outpos) _
& onechar _
& space(inlen - (oldpos - 1))
else
wrkstring = left(tmpstring, (outpos - 1)) _
& onechar _
& space(inlen - (outpos - 1))
end if
mainheader.innerText = wrkstring
settimeout "WaitNull", 99999999
end if
end sub
sub WaitNull
end sub
I would really appreciate any ideas on this its driving me nuts.
sincerely
Woody
any sugestion or comment made by me should be examined first for
validity and appropriateness before assuming i have any idea at all
what the heck i am talking about. I am not responsible for anything you
may see with my name attached to it, i think.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Is this the new fomat for Scripting.VBScript? Tag: 154001
Double Underline in VBScript or HTML
Hi,
I need to double underline something. It's an accounting front end web app.
how would the style tag be worded.
thanks
rafael Tag: Is this the new fomat for Scripting.VBScript? Tag: 153998
I want to insert a text file into an email as opposed making it an attachment
I am the network security admin for my company. I am automating the
processing of my firewall syslog files to have it email the offenders abuse
and security email addresses.
My issue is that many abuse and security email addresses delete incoming
attachments so I need to insert the syslog data as opposed to mailing it as
an attachment.
For the same reasons that the above addresses delete attachmants they also
do not accept html or rtf emails so I can not use CreateMHTMLBody.
Short of generating vbscipt code with hundreds of lines of
"data" & vbCRLF & _
Is there some way to do this?
Or can someone recommend a command line emailer that will let me do this?
BTW: I have automated prossing the syslog files themselves with awk, grep
and uniq by using the bash shell cygwin under windows. If you have got to
process text in large quantities I can not say enough about awk. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153996
Folder cleanup - how
Any ideas on how I can script a drive cleanup utility?. I need to search for
temporay files and delete them. I also need to find *.jpg, *.wma, *.exe in
network folders and delete these files to minimize disk space usage. Also
need to search for filesize, last accessdate/time.
Thanks
Andres Tag: Is this the new fomat for Scripting.VBScript? Tag: 153992
Getting Expected ; (semicolon) in simple VBScript only page
I am working on an ASP page that also includes some basic Client Side
validation. I am just starting to work with VBScript on the client so I
threw together a little test file and I keep getting:
Error: Expected ';'
on the first line after <SCRIPT LANGUANGE="VBScript">
I have tried subs, functions, etc... Why is it expecting a semicolon?
<HTML>
<HEAD>
<SCRIPT LANGUANGE="VBScript">
Function Test()
End Function
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Is this the new fomat for Scripting.VBScript? Tag: 153990
Activate QuickLaunch
How to enable the QuickLaunch toolbar for everyone with a script? it seems
this setting is not in the registry
/ Lelle Tag: Is this the new fomat for Scripting.VBScript? Tag: 153987
Cookie Question
Start http://212.123.5.17/mb/xdata/am.asp
in the left Frame choose N,F or D (Nederlands, French, Deutsch) Not E
(Standard for English)
Click GO
Close your Browser
Reopen the page. On top you will see the result of the Language Cookie -
result = N,F or D
Start http://www.adq.be/ws.htm
in the left Frame choose N,F,D (Nedelands, French, Deutsch) Not E (Standard
for English)
Click GO
Close your Browser
Reopen the page. There is no result for the Language Cookie and the standard
(E) is selected
Only difference between the two is that in the second case the first
(http://212.123.5.17/mb/xdata/am.asp) is called in an frame of website on
another domain.
This is the code to write the cookie
Response.Cookies("am")("language")=Request.QueryString("language")
Response.Cookies("am").Expires=date()+30
this code to read
Request.Cookies ("am")("language")
What can be the reason herefore and how o resolve
Thx - Maarten (Belgium) Tag: Is this the new fomat for Scripting.VBScript? Tag: 153979
HELP with DateAdd statement and SQL
I am trying to pull the date from the day before "objDate =
DateAdd("d", -1, Date)" in standard time format, and I am wanting to
convert it into UTC time "dtmCurrentDate = "&objDate&" " then pass it
into a SQL command " "WHERE [Type]='error' AND
[TimeWritten]>'&dtmTargetDate&' ". The script works however it isn't
passing the date and coverting into UTC. Can someone please help me
with this? Below you will find my script.
Thanks,
Robnson
-----------------------------------------------------------------------------
dim Conn, objRS, objConn, strSQL, objDate, dtmTargetDate
objDate = DateAdd("d", -1, Date)
strComputer = "."
Set objSWbemServices = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colTimeZone = objSWbemServices.ExecQuery _
("SELECT * FROM Win32_TimeZone")
For Each objTimeZone in colTimeZone
strBias = objTimeZone.Bias
Next
dtmCurrentDate = "&objDate&"
dtmTargetDate = Year(dtmCurrentDate)
dtmMonth = Month(dtmCurrentDate)
If Len(dtmMonth) = 1 Then
dtmMonth = "0" & dtmMonth
End If
dtmTargetDate = dtmTargetDate & dtmMonth
dtmDay = Day(dtmCurrentDate)
If Len(dtmDay) = 1 Then
dtmDay = "0" & dtmDay
End If
dtmTargetDate = dtmTargetDate & dtmDay & "000000.000000"
dtmTargetDate = dtmTargetDate & Cstr(strBias)
Set Conn = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.Recordset")
Conn.Open = "provider=sqloledb;data source=SCK-EAV-01;" & _
"user id=sa;password=justD0!t;" & _
"initial catalog=Eventlogs"
strSQL = "SELECT [ComputerName], [EventCode], [Message] " & _
"[SourceName], [TimeWritten], [Type] FROM [EventTable] " & _
"WHERE [Type]='error' AND [TimeWritten]>'&dtmTargetDate&' ORDER BY
[TimeWritten]"
objRS.Open strSQL, Conn, 0, 1 'adOpenForwardOnly, adLockReadOnly
objRS.MoveFirst
While Not objRS.EOF
WScript.Echo objRS("ComputerName") & objRS("EventCode") &
objRS("SourceName")
objRS.MoveNext
Wend
______________________________________________________________________ Tag: Is this the new fomat for Scripting.VBScript? Tag: 153978
Windows 2000 Scripting Guide errata page
Does anyone know if the book Microsoft Windows 2000 Scripting Guide
(ISBN 0-7356-1867-4) has an online errata page? If not, does anyone
who has access to a copy of the book know if the second paragraph on
p. 109 contains a misstatement? (The paragraph claims that "the
following data is displayed...The values "A" and "B" are the only
values echoed to the screen...", though the example code purposely
shows the spelling error of " Wscript.Eco "A" " (outermost quotations
are mine) to demonstrate what will happen when toggling error
handling.
Isn't it true that whether error handling of any type is either
toggled on or toggled off is irrelevant to the fact that
Wscript.Eco "A" (note the misspelling of the word Echo) will NEVER
echo A to the screen?
Thanks for any clarification. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153976
Need Internet Programmer - Designer - Database
Looking for a guy (Gal) who can develope site with databases, etc...
Must have references...
Public company will pay you in stock.
reply to johnniemacusa@longislandxtra.com Tag: Is this the new fomat for Scripting.VBScript? Tag: 153971
window.open problem in IE6
I am using Window.open to open the necessary page in a target frame. But
only on one users IE6 instead of opeing the page in the target frame, it
simplay opens the page in the main frame.
Anyideas on how it is happening? Tag: Is this the new fomat for Scripting.VBScript? Tag: 153968
Recursively list a folder with VBScript
Looking for a VBScript script that will recursively list *all* the files
and folders in a particular directory.
I don't just want *.htm or *.asp, for example, I want a complete listing.
The plan here is to list the files one-by-one, and basically double check
the NTFS permissions on each file.
Pseudo-code (Linux-based):
for anything starting in directory X
do
if file/directory does not have NTFS permission Y
then
add permission Y to file/directory Z
echo added permission Y to file/directory Z
fi
done
I read while searching that this may be pretty slow using FSO, and that
some MS MVP recommended using Wscript.Exec or .Run and call the DOS dir
command.
I guess I just need a starting point on how to possibly start.
Marco Tag: Is this the new fomat for Scripting.VBScript? Tag: 153965
Console Text Color
Without using a DOM is there a way to change the foreground and background
color of characters being printed to the console? Assume my script has no
access to IE. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153960
object.classobject generates a type mismatch error
Hello there
using a vb script I am probing a container for objectes.
when i try to msgbox(object.objectclass) it gives a type mismatch error.
though it's supposed to be a string.
code below.
Any ideas?
'code
Set dso = GetObject("LDAP:")
samehname = "domain\useruser"
samehpass = "password"
Set obj1 = dso.OpenDSObject( "LDAP://DC=domain,DC=local", samehname,
samehpass,ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)
for each colitem in obj1
msgbox(colitem.name)
for each obj in colitem
msgbox(obj.objectclass)
if obj.objectclass = "organizationalUnit" then
msgbox(obj.name)
end if
next
next Tag: Is this the new fomat for Scripting.VBScript? Tag: 153955
An interesting small WSH VBScript problem: CreateObject fails to terminate (stack) when logged out from the server
Hello everyone,
I have a small problem that I could not find answer to in previous
postings of these two fine newsgroups.
I have created a small vbs script (run by WSH), with this single line:
' Beginning of script
CreateObject "Excel.Application"
' End of script
(I extracted this problematic line from another script)
The operating systems I tried are Windows 2003 Server and Windows 2000
Server.
This is the problem:
The script should be run as scheduled task on a daily basis.
I created a task to run it in Scheduled Tasks.
In the "run as" section, I used the same login and password I use to
login to the server with Remote Desktop Connection.
When logging in to the server via Remote Desktop Connection, the script
run just fine (Starts and finishes almost immediately). Also, in the
Scheduled Tasks, when right-clicking on the task and selecting 'run',
the task starts and finishes immediately, with no errors.
However, when setting the task to run automatically, and logging out, it
does not work:
I waited a minute after the time it was scheduled to, returned, and saw
that the process (wscript), and the EXCEL applications are still
running. The task status shows 'running'.
The interesting thing is that the function CreateObject has created the
'EXCEL' application, but it seems that it fails to finish.
Does anyone has encountered this problem before ? do you have an idea ?
Any help will be greatly appreciated.
ThanQ very much
Jonathan Orlev Tag: Is this the new fomat for Scripting.VBScript? Tag: 153946
Rename files with script
Hi,
does anyone know how to rename all files in a directory by script?
The files should be renamed with a rule like paste an underline between
the the 2nd and 3rd character of the name and so one.
The script should run on W2K.
Greeting,
Andreas Tag: Is this the new fomat for Scripting.VBScript? Tag: 153943
Client-Side Include Code in WEB Page
Javascript has the ability to reference HTML code using the external source
file prefix .JS. I'd like to create a set of VBScript functions and
subroutines and bundle them in an external file and include the external
source file. Does VBScript have the capability to perform the task. If not,
can I create VBScript routines in Javascript include .JS file.
Any help would be greatly appreciated. Thanks and regards, Ian Renfrew Tag: Is this the new fomat for Scripting.VBScript? Tag: 153939
vbscript / Internet Explorer info
Hi:
I am looking for a document describing how to manipulate
Internet Explorer objects. Right now I am facing the problem
of adding options to a SELECT drop down box in an HTML
page. I can find quite some JavaScript fragments,
such as
Code:
document.forms[0].musicType.options[3] = new Option("Folk", "folk", false, false)
for doing the above task, but I have problems finding VBscript examples.
Thanks, Erwin
----------------------------------------------------------------
Erwin Kalvelagen
GAMS Development Corp., http://www.gams.com
erwin@gams.com, http://www.gams.com/~erwin
---------------------------------------------------------------- Tag: Is this the new fomat for Scripting.VBScript? Tag: 153922
Need a Script to enter in username & password
HI! I just need a script so that when I enter into a page on my password
protected site that the username & Password get entered in for me and
executed. ( meaning the enter button is pressed for me sort of like ).
There used to be a way of doing that before like this example below..
http://username:password@www.somewebsite.com/private/index.htm
but this no longer works now, is there another way of using a script to do
this?
PLEASE NOTE: I am aware of a way with IE to do something like this by saving
it in the password history and also with Norton password manager but I
specifically need it done this way with a script. I posted a similar post
before but I feel that it was mis-understood so I am reposting this in a
different way.
paul.dallaire@sympatico.ca Tag: Is this the new fomat for Scripting.VBScript? Tag: 153915
Way to force shutdown of a PC from a script that is run when Windows first starts up?
I'm trying to develop a vbscript that will allow me to shutdown a PC
(running Windows XP Pro) on a Windows 2003 network. I would like to
implement this a policy for my laptop computer users. This policy
will check to see if the computer's virus defintions are upto date.
If not the laptop will be shutdown before the user can logon to our
network.
The script needs to be run when the PC first starts up, BUT before the
user logs on. I know where to set up the script (as part Local
Computer Policy -> Computer Configuration ->Windows Settings ->
Scripts (Startup/Shutdown) -> Startup). I've tried everything from
executing the windows shutdown command from a vbscript (shutdown.exe
-s -t 00) to various vbscript code including:
Const SHUTDOWN = 1
strComputer = "."
Set objWMIService = GetObject("winmgmts: {(Shutdown)}" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("SELECT * FROM Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(SHUTDOWN)
Next
The problem is that the PC will not shut down. After the startup code
is excuted, I see the logon prompt. Which means I'm past the startup
script and into the user logon part of the entire authentication
process.
I know the shutdown code works. I've tested it while I've been logged
on. It shuts down the machine every time. I know that the shutdown
code was executed. I saw a test message. that I put after the
shutdown code. Yet the PC will not shutdown!
I think the problem is that I have the wrong permissions, but I'm
unsure how to fix the problem.
Any thoughts and script samples would be greatly appreciated.
Thanks in advance. ...Gary White Tag: Is this the new fomat for Scripting.VBScript? Tag: 153898
Possible to time out a popup?
Hi,
A question I've been thinking of for some time... I am
sure I saw the answer somewhere on the web but can't find
it again...
I am trying to display a popup box that times out. I know
it can be done with the wscript.shell popup command by
just specifying the timeout time as one of the paramters,
however I want some message box to keep updating the
amount of time left as text IN the popup box and somehow
loop it so it doesn't allow user interaction until the
timeout expires. My instinct tells me this can only be
done through scripting something with IE (form), but I am
sure I saw this done somewhere with either msgbox or popup
within somekind of a loop to keep updating the
msgbox/popup text on the fly. Any help would be great!
Thanks Tag: Is this the new fomat for Scripting.VBScript? Tag: 153896
Lost Cookies
Start http://212.123.5.17/mb/xdata/am.asp
in the left Frame choose N,F or D (Nederlands, French, Deutsch) Not E
(Standard for English)
Click GO
Close your Browser
Reopen the page. On top you will see the result of the Language Cookie -
result = N,F or D
Start http://www.adq.be/ws.htm
in the left Frame choose N,F,D (Nedelands, French, Deutsch) Not E (Standard
for English)
Click GO
Close your Browser
Reopen the page. There is no result for the Language Cookie and the standard
(E) is selected
Only difference between the two is that in the second case the first
(http://212.123.5.17/mb/xdata/am.asp) is called in an frame of website on
another domain.
This is the code to write the cookie
Response.Cookies("am")("language")=Request.QueryString("language")
Response.Cookies("am").Expires=date()+30
this to read
Request.Cookies ("am")("language")
What can be the reason herefore and how o resolve
Thx - Maarten (Belgium)
MBProductiesMBProducties - Frank Catry Hazelaarsdreef 22 8530 HARELBEKE -
BELGIË tel 00-32 (0)56/71.81.41 - fax 00-32 (0)65/20.55.87 - gsm 00 32
(0)477/62.00.82 e-mail: mbp@pandora.be - MSN: mb@ris.be This e-mail and any
attachment thereto may contain information which is confidential and is
intended for the sole use of the addressees. Any use of the information
contained herein (including but not limited to total or partial reproduction
or distribution in any form) by other persons or the addressees is
prohibited. If you have received this e-mail in error, please notify the
sender and delete its contents. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153895
filters, photos and timers driving me nuts
i am going slowly crazy. .net 2002 framework 1.0
i made a slide show. pictures are slide1.gif, slide2.gif etc etc
defined 2 divisions that share the same part of the screen page1 and
page2, page1 is normally visible, page2 is normally hidden.
i use page1.innerhtml = "blah blah this picture" and teh same for page2
what im trying to do is to transition page1 to page2, wait 10 seconds
and then loop thru switching new pictures for page1 and 2 and keep going
till i hit the end of teh show.
so far real frustrated.
any clue how to do this?
I sincerely appreciate any and all guidance on this as msdn has been
clear as mud.
thanx
Woody
any sugestion or comment made by me should be examined first for
validity and appropriateness before assuming i have any idea at all
what the heck i am talking about. I am not responsible for anything you
may see with my name attached to it, i think.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Is this the new fomat for Scripting.VBScript? Tag: 153892
Simple little problem - I think
Hey group,
I have a little proble that i think a little Script might solve:)
I have around 20 sites, each site has a different IP rang and all PCs are
static IP (No DHCP), its a bit of a pain when i have to keep changing the
IP, Gateway, DNS and other IP settings on my Laptop.
I was wondering if I could write a script file which asked me what site i
was at i clicked the site and it automatically changed all my IP settings?
this would have to work on Windows 2000 or XP.
Anybody got anything similar, or any links?
Many Thanks
Merlin Tag: Is this the new fomat for Scripting.VBScript? Tag: 153888
User input via console
I know this may be a stupid question, but I've googled
around, searched MSN groups, and this forum and can't
find an answer.
I need to get user input from the console, not using
InputBox. I want to make a function, such as "readln"
that will give the user a prompt and return their answer
as a string or integer. VBScript must be able to do
this. Is my assumption bad? Tag: Is this the new fomat for Scripting.VBScript? Tag: 153887
FYI - New WinZip vulnerability
Courtesy of Peter Torr's blog...
New WinZip vulnerability
http://blogs.msdn.com/ptorr/archive/2004/02/27/81238.aspx
--
Michael Harris
Microsoft.MVP.Scripting Tag: Is this the new fomat for Scripting.VBScript? Tag: 153884
Need advice on automated newsletters and emails
HI! I would like to know if someone could suggest some good programs for
automated newsletter and email submissions.
A program that can store the users email address in a defined database that
will send them a newsletter when scheduled, including an autoresponder,
Thanks in advance: :)
paul.dallaire@sympatico.ca Tag: Is this the new fomat for Scripting.VBScript? Tag: 153877
How do we insert a username & Password into a link?
HI! I need to know how to enter in a Username & Password into a link.
I also need to know if there is a script out there that can go to a page and
enter in the username & password automaticly. ( It has to be a script of
some sort ).
I know there are programs out there that can do that but its not what I
want, I want a script that I can enter into a ASP or HTM page to go to a
link and then enter in the username & Password when prompted.
Can someone point me in the right direction or show tell me where to find
it..
Thanks in advance :)
Paul.
paul.dallaire@sympatico.ca Tag: Is this the new fomat for Scripting.VBScript? Tag: 153871
Compiler location
Does anyone know where office xp installs the compiler.. mse7 I think.. I
can't define a default compiler in anything, wscript, primal script etc..
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- Tag: Is this the new fomat for Scripting.VBScript? Tag: 153870
Word 2000 (RTF and/or DOC files) to HTML Converting Script
I am looking for a script that will convert a .doc and/or an .rtf file to an .html file through a website that I am creating. I would prefer the script be written in VB and/or ASP. The ideal script would be easy to use, such as give a the location of the file to be converted and the destination of the converted file, and that is it. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153868
Attachment to zip file
Hi All
How can I send like a text file into a zip file so that I can send it out in email
Thanks
JJ Tag: Is this the new fomat for Scripting.VBScript? Tag: 153863
Find Group in AD and report distinguished name
Greetings
I need a VBScript that will search AD to find whether or not a group name exists and if so, report back the distinguishedName
Thanks in advance for any assistance! Tag: Is this the new fomat for Scripting.VBScript? Tag: 153860
granting ntfs permissions via vbscript
Hi all,
I am trying to - via setup - set some ntfs permissions to IUSR on a folder
that resides on the target computer. I have a web application written in
VB.NET. One of the features of this web app is file upload. So, I need to
grant write access to the internet anonymous user on a folder that is
created by de setup app. And this folder will be used by the web app to host
the uploaded files. The .NET Web Setup Project offers a way to do this: via
custom actions, that are no more, no less than vbscripts executions on
target computer. Ok, that is the cenario, but my problem is to create this
damn vbscript, responsible on grant the correct permissions to the IUSR
account. Anyone has a clue on how do I accomplish this goal?
tks
Renato
--
-----------------------------------------------------
Renato Aloi
Analista Programador
J&W Informática Ltda. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153856
Advanced string parsing
I've written a script that reports the distinguished name in Active
Directory of the argument to the script. For instance:
==============
C:\> findou.vbs "Trimboli, David"
CN=Trimboli\, David,OU=Users,OU=Information
Technology,OU=Administration,DC=cshl
,DC=edu
==============
It works perfectly. Now I want to find a way to turn the above information
into the following format:
cshl.edu\Administration\Information Technology\Users\Trimboli, David
I want to avoid writing a temporary file if possible. I cannot predict
ahead of time what the OU structure of the queried object will be (that's
the whole point). The returned data is stored in a variable.
Does anybody have any advice on how I can transform the returned string into
what I want?
David
Stardate 4158.1 Tag: Is this the new fomat for Scripting.VBScript? Tag: 153855
Scripting firewall rule change
Is it possible to script a rule change on an external firewall utilizing the WMI SNMP provider? If so, how do I do this
thanks
-NM Tag: Is this the new fomat for Scripting.VBScript? Tag: 153853
Removeing a local account from the Power Users group
How would I remove an account from the Power Users group with a vbs script?
And then create a local account and set a password then
add the new account to the Power Users group.
I need to be able to do this on 300+ systems.
Thanks. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153849
Help with time
Hi, I need to know how I can use time as a variable in cleaning out a folder
of old files. Specifically, I need to delete log files older than 6 hours.
Any ideas?
Thanks in advance for any assistance,
Mike Deering Tag: Is this the new fomat for Scripting.VBScript? Tag: 153841
mailto with multiple text box
Hi all,
I want to use the following form:
<form name="Myform" method="post" action="">
<p>
<input name="name" type="text" id="name">
Name </p>
<p> <input name="email" type="text" id="email">
Email </p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
to send an email? I can use JavaScript, VBScript or Mailto, but I can't use
server
side scripting. Is very important for me that form use MULTIPLE text field.
Thanks in advance Tag: Is this the new fomat for Scripting.VBScript? Tag: 153840
createobject fails??
Hi,
I have a problem that an ActiveX exe class library that I created in VB6
will work properly when 'createobject' is used within VBA or VB, but fails
when used from VBScript (e.g. - run from WSH or an application using the
Microsoft scripting engine). I *think* this may be a permissions problem but
have not been able to find a clear description of how one sets activex
permissions.
In the script, I'm getting error 424 "object required".
Strangely, another activex exe that I had written previously works fine,
even though I can see no difference in the way I set up the project...!!
Any suggestions?
--
Regards,
Steve O'Hagan Tag: Is this the new fomat for Scripting.VBScript? Tag: 153839
Can I do client side populations from my ASP Page?
I have done alot of ASP pages with VBScript which is all server side. I
have done a few VBS files that runs locally and works with web forms. I
would like to have a ASP webpage with a form for the user to enter data.
I would like to include some client side stuff such as:
When the user keys in the first value in a row the value is copied to
the other fields in the row. And when a user clicks on certain values
in an option box it would enable/disable or visible/hide additional
fields. And finally make sure all visible fields are populated before
the data is set back to the server.
Any good examples of how to do this?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Is this the new fomat for Scripting.VBScript? Tag: 153837
Create exchange mailbox
Hi there,
I have my script done to create everything for the user apart from the exchange 2k mailbox. Anyone got some code to do this. Some comments on what to change within the code would be appreciated.
Thanks,
Senore Pedro Tag: Is this the new fomat for Scripting.VBScript? Tag: 153836
Limitation on fso size function
I've written a script to get the sizes of the various data shares on our
servers. The relevant part of the code is like so:
computerName = WSHShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
f = "\\"&computerName&"\home"
dirsize = objFSO.GetFolder(f).Size
strf = f & " " & dirsize & " bytes"
outFile.WriteLine strf
And the same for the other shares we use. When I run this on each
server, it works fine except on some of the large servers, where the
shares are quite large (> 200Gb, some getting up to half a terabyte). On
these servers, the dirsize variable comes back empty from the call to
Size, but as it doesn't return immediately but runs for some
considerable time before failing, it would seem to be failing somewhere
inside the recursion through the directory structure.
I guess the two possibilities are either that the function can't cope
with a dir structure over a certain size or with an overly long
pathlength somewhere in the directory structure. The largest dir for
which I have got a valid result back from Size is 207442015120 bytes. As
this is actually slightly larger than some of the shares for which the
function fails (I got the size of those shares from the right-click dir
properties in Windows Explorer), I suspect that the problem is with
pathlengths > 256 chars long.
Any suggestions on how to get a script to return the size of these dir
structures? I'm running the script on Win2000 SP4 servers.
Nick Tag: Is this the new fomat for Scripting.VBScript? Tag: 153832
Getting active user name
How can I get (using VBScript in Outlook Form) user name, that is currently logged in? Tag: Is this the new fomat for Scripting.VBScript? Tag: 153830
Remote Assistance.
Does anyone know how to 'Offer Remote Assistance' to a remote computer with
VbScript with the Ip or NetBios name?
Remote Desktop was much easier using the following but I haven't been able
to figure this one out.
SET SHELL = CREATEOBJECT("WSCRIPT.SHELL")
SHELL.RUN("MSTSC /V:" & REMOTE_COMPUTER & " /CONSOLE")
Much appreciated.
Rob Tag: Is this the new fomat for Scripting.VBScript? Tag: 153826
read and compare 2 file dates/times
Guys
I have a issue with comparing the Time and date stamp of a file in FTP
folder on the web and the same file previuosly down loaded.
I have written a script where it goes to the FTP site and get the file
details like date and time stamp and these info are recorded in
FTP1.TXT file looks like
---------------------FTP1.TXT----------------------
-rwxrwxr-x 1 hevasymantec-ftp5 hevasymantec-ftp3 4651576 Feb 11
14:15 symcdefsi32.exe
---------------------------------------------------
I run one more script which gets the file deatils of prevoiusly
downloaded file which is ther on G:\
------------------Ter.txt-------------------------
Volume in drive G is Local Disk
Volume Serial Number is 8C0A-2423
Directory of G:\
20/02/04 16:03 4651598 symcdefsi32.exe
1 File(s) 4651598 bytes
4,600,000,512 bytes free
-------------------------------------------------
Now how do I compare the dates to find out which is new...BTW there is
no version property for this file
Thanks
cha Tag: Is this the new fomat for Scripting.VBScript? Tag: 153824
Why does the & result in the error message???
Hello
I am just trying to learn VBscript. I get an error message I can't solve. This code is in a wsf file.
<?xml version="1.0"?><package><job id="VBSJob"><?job debug="true" error="false"?><script language="VBScript"
Dim fs, strMsg
strMsg2 = "text1 " & "text2
MsgBox strMsg
</script></job></package
The error message I receive is:
test.wsf(15, 12) Windows Script Host: Unterminated entity reference - matching ';' not foun
The script runs fine without the & operation
Can someone tell me what I do wrong
I use WSH 5.6 on Windows 2000 Pro. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153811
Help - cannot copy file to remote desktop
Hello,
I'm want to copy a file to many pc's, either to the desktop or Startup
folder. OS is 2k. Local admin password is the same on all, all pc's in the
same workgroup.
With the script below, I can open the desired folders and manually copy with
no problem.
I can also copy to the root folder. Something else I tried without success
was to copy to C: and create shortcut on remote desktop. I know I can do
this from a local script, but not remotely. Error messages included in
script.
Thanks
Set oFS = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
'Open a text file of computer names
Set oTS = oFS.OpenTextFile("F:\getlist\blacat.txt")
Do Until oTS.AtEndOfStream
sComputer = oTS.ReadLine
DesktopPath = WshShell.SpecialFolders("AllUsersDesktop")
WshShell.Run "\\" & sComputer & "\d$\Docume~1\Alluse~1\Desktop"
'This works
WshShell.Run "\\" & sComputer &
"\d$\Docume~1\Alluse~1\StartM~1\Programs\Startup" 'This works
oFS.CopyFile "F:\getlist\metapad.exe" ,"\\" & sComputer & "\c$\"
'This works
Wscript.echo "\\" & sComputer &"\" & DesktopPath
'This works and looks ok
'WshShell.Run "\\" & sComputer &"\" & DesktopPath
'This don't work
'Error Message - The system cannot find the path specified.
'oFS.CopyFile "F:\getlist\metapad.exe" ,"\\" & sComputer &
"\d$\Docume~1\Alluse~1\Desktop" 'This don't work
' Error Message Permission denied.
oFS.CopyFile "C:\scripts\getlist\blacat.txt" ,"\\" & sComputer & "\" &
DesktopPath This don't work
'Error Message path not found
Loop
oTS.Close Tag: Is this the new fomat for Scripting.VBScript? Tag: 153810
caption compare
Is there any function or add-in in visual basic that allows you to compare
the caption of two text boxes and output a percentage of how similar they
are? If not is there an easy way of doing this? Many thanks in advance. Tag: Is this the new fomat for Scripting.VBScript? Tag: 153806
How to prevent calculated variables from rounding?
I'm trying to get the output of the variable "ResTime" to come out in
a format like 2.45
Instead, the following code rounds the number like 2.00
<%
StartDate = rs.fields.item("Date_Created").value
EndDate = rs.fields.item("Date_Closed").value
ResTime = FormatNumber(Cdbl(DateDiff("h",StartDate,EndDate)),2)
%>
I am able to get the desired result (no rounding) by using...
Convert(decimal(10,2), (datediff(hour, [date_Created], [date_closed]))
...directly in a SQL query. But the way my ASP page works, I really
want to be able to manipulate and calculate the variables in VBScript
after the query is run.
Any suggestions? Thanks,
Russell Tag: Is this the new fomat for Scripting.VBScript? Tag: 153804
My old link was broken and I found this newsgroup, is it the same ?
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter