Locate where user is logged on
probbbbably a dumb question! but is it possible to find/get the computer
name where a particular user is logged in or find out who is logged in
on a particular computer.
tia
*** Sent via Developersdex http://www.developersdex.com *** Tag: Script to uninstall software Tag: 173977
How to verify a dll has been unregistered/registered
Hi,
I am trying to unregistered a dll on many servers via a script remotely.
As a QA process how to remotely verify the dll has been unregistered
sucessfully ?
My command:
regsrv32 /u /s name.dll
Thanks,
Wensi Tag: Script to uninstall software Tag: 173975
OT: (ish) MySQL Front End software
Hi,
I hope this isn't too off topic! I'm looking for some free software to use
as a front end for MySQL version 4.1.10 . I currently use MySQL-Front but
this only supports my older database.
Does anyone know where I could get hold of the right software?
Thanks
Andrew Tag: Script to uninstall software Tag: 173974
Everyone Shares
I'm in need a vbscript that I can work with that identifies the shares
on a computer that has everyone set with full control permissions. I
can then feed it the list of 100 or so servers that I need to run this
script on several times per year. I know there are some utilities out
there like xcacls, but I simply don't have the time to write a parsing
script to parse the output, and our file server alone has 1500+ shares.
Does anyone have anything they can help me get started with. Please
try to stay with vbscript - that's really all I do well. Thanks! Tag: Script to uninstall software Tag: 173972
Script to remove service
Hello,
Could someone please send me a script to remove service, here is manuall way
of doing it from cmd:
c:\programs*\network*\common*\frminst.exe /forceuninstall
so basically i would need a script that would call this command
please help
Thanks Tag: Script to uninstall software Tag: 173964
quick sort of 3-d array
Hi there,
I want to sort an array:
Array(id, name, price)
by the 'price' field
I've looked up sort code on the net (for classic asp - vbscript), but
the QuickSort code I found (on 4guysfromrolla) was giving me a
memory-stack overflow error (my array only has around 50 rows)
or was only designed for 2-d arrays.
Anyone got a url of sort code for the above 3-dimensional array?
It doesn't even have to be Quick Sort since it's backend stuff and I
don't mind waiting for a Bubble sort,etc
Cheers,
Peter
--
"I hear ma train a comin'
... hear freedom comin" Tag: Script to uninstall software Tag: 173962
Any LDAP and DNS experts out there?
This simple code queries one of our DDNS domains using LDAP and
attempts to get the IP address for a printer. It finds the printer
with no problem and I can dislpay the printer using the "name" field
(code is omitted) but what I also want is the IP address. It is stored
in the "dnsRecord" field and is the last 4 sets of numbers. If I could
just get those numbers I could parse/convert/ change the heck of them
but I can't get anything from the dnsRecord field. all I get are two
boxes which I can't type since they lijke some obscure ASCII but they
are certainoy not numbers. Maybe I am reading an object from LDAP
which needs further work? I dont know. however if I use
"adsiedit.msc" I can see the numbers in the dnsRecord field I can't
can't query them or display them with my code... heelppppp
here's the code:
'------- Declare variables --------
Set cnvt = CreateObject("ADs.ArrayConvert")
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
'------- Run LDAP query -------
objCommand.CommandText = _
"<LDAP://DC=usfca.printer,CN=MicrosoftDNS,CN=System,DC=ds,DC=usfca,DC=edu>;(&(DC="
& "hr" & "545" & "*))" & ";dnsRecord;subtree"
Set objRecordSet = objCommand.Execute
'------- Parse the resultant query and display the results -------
While Not objRecordSet.EOF
Wscript.Echo join(objRecordSet.Fields("dnsRecord"))
objRecordSet.MoveNext
Wend
objConnection.Close Tag: Script to uninstall software Tag: 173960
script not run if OS is server?
I have a vbs login script that I am working on implementing onto a domain via
group policy. However, I do not want this script to run if the user is
logging onto a server. Just workstations. Servers are not grouped alone in
any OU's and while AD is being reorganized, it won't be completed by the time
the script needs to be implemented. Any recommendations on how to implement
the login script for workstation only?
Thank you for your time. Tag: Script to uninstall software Tag: 173959
vbScript error: 0x8004010F while parsing mailitems.
Hello,
I have a vbScript that parses emails (within a PST) via Outlook 2003...
Occasionally, the script will terminate with the following error:
xxxx(127,16) (null): 0x8004010F
Line 127 is as follows:
If Instr(1, objItem.Body, strKeyword, vbTextCompare) > 0 OR Instr(1,
objItem.Subject, strKeyword, vbTextCompare) > 0 Then
Any idea what the error code is indicating?
Troy Tag: Script to uninstall software Tag: 173958
Searching excel or txt file for duplicate entries
Would anyone have a way to search an excel or text file for duplicate
entries such as 2 lines with the same email address or employee ID. I have a
file with 13000 users, 1 per line and I need to identify the duplications so
I can clean them up. I really only need to search 1 column and the
duplicates are next to each other top to bottom.
I can pull the file apart if I need to and put only the email addresses
into a text file, even that would be faster and less mind numbing than
looking at all 13000 manually...
Thanks in advance,
S-
--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org Tag: Script to uninstall software Tag: 173956
Help ! Wrong Number of properties or invalid property assignment !
hi ,
I have written a follwing script :
Dim i,j,ub
ub = ubound(evnt.replacementParameters)
For i=0 to ub
j = evnt.replacementParameters(i)
.............
.............
Next
Where evnt.replacementParameters is an array of strings.
When debugging I can see upper bound as 3 and lower bound as 0.
But I am getting error at statement,
j = evnt.replacementParameters(i)
which says "Wrong Number of properties or invalid property assignment " with
err.number = 450.
I am not able to find what's going wrong!!?
While debugging , Watch for evnt.replacementParameters shows me all the four
values in that array,
but watch for evnt.replacementParameters(0) and evnt.replacementParameters(1)
shows empty!!!
Any help would be appreciated.
Thanks in advance. Tag: Script to uninstall software Tag: 173953
Reading txt files and deleting them
Can someone help me finish this script? I am trying to read txt files in a
directory and if the file contains "2.0" I want to delete the file. Thanks!
Option Explicit
Const ForReading = 1
Const Folder = "G:\Scripts\SP\"
Dim oFSO
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
Dim oGF
Set oGF = oFSO.GetFolder(Folder)
Dim oTF
Dim oTS
Dim oRL
For Each oTF In oGF.Files
If(Right(oTF.Name,3)) = "txt" Then
Set oTS = oFSO.OpenTextFile(Folder & oTF.Name, ForReading)
oTS.Read("1.0")
Do While Not oTS.AtEndOfStream
Loop
oTS.Close
End If
Next Tag: Script to uninstall software Tag: 173952
adding password to ODBC
Does anyone know a way to script the adding of a password to a ODBC DSN sql
authentication data source?
I'm struggling and any help would be greatly appreciated.
Thanks,
Jeremy. Tag: Script to uninstall software Tag: 173950
logon scripts for idiot
Hi I hope someone can help.
Im new to this so bear with me if Im dumb
I work in a school and I need to write a logon script to
map various drives for various users.
I have a domain called christchurch.local
A server called DELL
I have 4 folders to share 1) Class Work 2)shared 3) admin
programs 4) SIMS.
I have 10 users year 1 - year 8 -staff - administrator
I want to map Class work to year 1 - 8
I want to map Class work and Shared to staff
And map everything to administrator
I also want to map 2 TCP/IP printers Colour Laser Printer
on 10.122.x.x and Mono Laser Printer on 10.122.x.x
can anyone help me? i seem to be vbs dyslexic Tag: Script to uninstall software Tag: 173949
Using VBScript to send message using CDO.message
Ok, I don't get this. I used the stock script from the Script Center
repository for sending a message on my PC and it works. I use it on a
Windows 2003 server and it won't. I'm getting this message:
CDO.Message.1: The "SendUsing" configuration value is invalid.
What's this mean? I thought it was because Outlook wasn't installed on the
server. Well, a full-blown install is now there and I STILL get this problem.
The code is just this easy and nothing but the Script Center website sample:
Dim objEmail
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "server@mycompany.com"
objEmail.To = "jms@mycompany.com"
objEmail.Subject = "Something didn't work!"
objEmail.Textbody = "The import at " & now & " failed."
objEmail.Send
Set objEmail = Nothing Tag: Script to uninstall software Tag: 173942
com-enum
hello
im using a com-server-dll in vb script.
my problem is how to use the defined enums in the dll?
the tlb looks like this:
typedef [uuid(2A0CC5DF-448E-351B-8136-2772C265D95B), version(1.0),
custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9,
testWrapper.Styles+LineStyles)
]
enum {
LineStyles_Normal = 0,
LineStyles_Strichpunkt = 1,
LineStyles_StrichStrich = 2,
LineStyles_PunktPunkt = 3
} LineStyles;
i get the server-instanze via CreateObject.
after that i can access the methods but how to use the enum-fields?
btw.: enum-parameter in the com-dll-interface are mapped to integer-value
but i think thats a com-thing and no further problem
thanks
micha Tag: Script to uninstall software Tag: 173941
Object required error
Hi
I'm a VB newbie does anyone know what I'm doing wrong in this script?
Dim hostcompname
Dim WshNetwork
Set WshNetwork =Wscript.createObject("Wscript.Network")
'WshNetwork.MapNetworkDrive "H:", "\\server\faelles"
'WshNetwork.MapNetworkDrive "I:", "\\server\clientapps"
'WshNetwork.MapNetworkDrive "J:", "\\server\Administration"
Set hostcompname = WshNetwork.ComputerName
Last line results in this error 800A01A8, object required??
TIA Henry Tag: Script to uninstall software Tag: 173931
Problem with script.
Hello I want to disable some user account in domain, I take users from
Excel, and this is OK, but please look bottom -> this is the problem.
Please Help
Thanks for all
Best regards
Thomas
'[Something in top]
Sub DisablingUser(name)
strUserName = name
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = _
"<LDAP://dc=domain,dc=org>;(&(objectCategory=User)" &_
"(name=" & strUserName & "));distinguishedName;subtree"
Set objRecordSet = objCommand.Execute
While Not objRecordSet.EOF
'This is block with I have problems
people = objRecordSet.Fields("distinguishedName")
Set objUser = GetObject("In this moment I want variables from people ") '
This is the clue
intUAC = objUser.Get("userAccountControl")
objUser.Put "userAccountControl",ADS_UF_ACCOUNTDISABLE
objUser.SetInfo
objRecordSet.MoveNext
Wend
objConnection.Close
End Sub Tag: Script to uninstall software Tag: 173929
This script to send mail to Lotus Notes does not work for R6
I tried the following script against a Notes 5 system it works but
against a notes 6 system this just does not work.
I get the message : "ActiveX component can't create object:
"Notes.NotesSession"
I replaced this by CreateObject("Lotus.NotesSession")
the error goes then I get the message the session is not initialised
now I put in the following
nSession = Call nSession.Initialise("password")
without password it does not work I do not want to be prompted for
password. After this none of the remaining lines work in the following
code against R6.
Set nSession = CreateObject("Notes.NotesSession")
session.initialise
'Gets the current user's maildatabase
Set db = nSession.GETDATABASE("","")
Call db.OPENMAIL
Set doc = db.CREATEDOCUMENT
Call doc.REPLACEITEMVALUE("SendTo", "Fn Ln/CA/ABC@ABC.com")
Call doc.REPLACEITEMVALUE("Subject", "Mail checked")
Call doc.REPLACEITEMVALUE("Body", "Did you get it")
Call doc.SEND(False)
can any of you kindly share a working code for R6 VB script to send
and receive mails from Lotus Notes
Thanks
Karen. Tag: Script to uninstall software Tag: 173928
Remotely searching for files
Thanks for the script Torgeir Bakken.
I modified it and was getting access denied on Line 45.
Any ideas why?
Torgeir Bakken \(MVP\) wrote:
> *nnanna wrote:
>
> > I use the code below to query each sever, but I would love to run
> it
> > remotely and the result written to a log file. Any ideas?
> > (snip)
> Hi,
>
> Please see my first post in this thread...
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> [url]http://www.microsoft.com/technet/scriptcenter/default.mspx[/url]
> *
--
nnanna
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: Script to uninstall software Tag: 173924
How to send a email with a attachment to Lotus Notes
The following code works for sending email to a Lotus Notes email
user.
Set nSession = CreateObject("Notes.NotesSession")
'Gets the current user's maildatabase
Set db = nSession.GETDATABASE("","")
Call db.OPENMAIL
Set doc = db.CREATEDOCUMENT
Call doc.REPLACEITEMVALUE("SendTo", "Fn Ln/SRV01/SOC@ABC.com")
Call doc.REPLACEITEMVALUE("Subject", "Test message")
Call doc.REPLACEITEMVALUE("Body", "Did you get it correctly")
Call doc.SEND(False)
I want to be able to send attachments like a .TXT or .XLS file
attachment to a user.
I would greatly appreciate if you could share the code to add to this
to send a attachment file to a Notes user.
Thanks
Karen Tag: Script to uninstall software Tag: 173921
How to parse a email with attachment- Miyahn please help
Hi Miyahn
The code here works fine to extract the email but my problem is I want
to extract a text file attachment that comes with the email.
I would greatly appreciate if you could share the code that enables to
download the attachment which is a text file to a folder than just
parse the email.
Thanks
Karen
Subject: Re: How to parse a email and reply to the parsed email
View: Complete Thread (4 articles)
Original Format
Newsgroups: microsoft.public.scripting.vbscript
Date: 2004-10-23 21:21:24 PST
"Karen Middleton" wrote in message news:a5fd468a.0410231756.4f62dcb9@posting.google.com
> > What email system are you running?
>
> Unfortunately we are running Lotus Notes I know it is not the best
> system to use but we are struck with it.
I can't understand your hope completely, because of my poor English
ability.
So, the following script may not be helpful.
I use this script to check new Notes mails in plain text.
(Of course, in the Notes of Japanese edition.)
Pay attention to the comment lines before you try it.
Dim FS, WS ,aFile, nSs, nDb, nVw, nDoc
Dim MailServer ,MailFile, From, dDate, Title, Body, Buf
Dim oFile, tFile, LastTime
oFile = "NewMail.txt": tFile = "LastTime.txt"
Set WS = CreateObject("WScript.Shell")
If Not WS.AppActivate("Lotus Notes Desktop") Then
' ^^ This line should be modified by the 'Notes' version
MsgBox "The 'Notes' isn't running"
Set WS = Nothing: WScript.Quit
End If
LastTime = "2004/10/24"
' ^^ This line should be modified by DateTimeFormat of the system
Set FS = CreateObject("Scripting.FileSystemObject")
If FS.FileExists(tFile) Then
Set aFile = FS.OpenTextFile(tFile, 1)
LastTime = aFile.ReadLine
aFile.Close
End if
Set aFile = FS.CreateTextFile(tFile)
aFile.Write Now & vbCrLf
aFile.Close
Set nSs = CreateObject("Notes.NotesSession")
MailServer = nSs.GetEnvironmentString("MailServer", True)
MailFile = nSs.GetEnvironmentString("MailFile", True)
Set nDb = nSs.GetDataBase(MailServer, MailFile)
Set nVw = nDb.GetView("($Inbox)")
Set nDoc = nVw.GetFirstDocument
On Error Resume Next
Do Until nDoc Is Nothing
dDate = nDoc.GetFirstItem("DeliveredDate").Text
If CDate(dDate) > CDate(LastTime) Then
From = nDoc.GetFirstItem("PName").Text
' ^^ This line may be modified by mail database template.
Title = nDoc.GetFirstItem("Subject").Text
Body = nDoc.GetFirstItem("Body").Text
Buf = Buf & "Sender : " & From & vbCrLf
Buf = Buf & "Subject : " & Title & vbCrLf
Buf = Buf & "Date : " & dDate & vbCrLf
Buf = Buf & "Body : " & vbCrLf & Replace(Body, vbLf, vbCrLf) &
vbCrLf
Buf = Buf & String(65, "=") & vbCrLf
End If
Set nDoc = nVw.GetNextDocument(nDoc)
Loop
Set nDoc = Nothing : Set nVw = Nothing : Set nDb = Nothing
Set nSs = Nothing
If Buf = "" Then
MsgBox "No new mail"
Else
Set aFile = FS.CreateTextFile(oFile)
aFile.Write Buf
aFile.Close
WS.Run oFile
End If
WScript.Quit
--
Miyahn (Masataka Miyashita) JPN
Microsoft MVP (Office Systems - Excel)
HQF03250@nifty.ne.jp Tag: Script to uninstall software Tag: 173920
Can this GP change be scripted?
In Group Policy Computer Configuration, you can right-click an IP Security
Policy and either 'Assign' or 'Un-assign' it. Does anyone know if these
'Assign' and 'Un-assign' selections can be scripted?
Thanks... Tag: Script to uninstall software Tag: 173916
script out of time?
hi
i have the following script which takes a server list, splits it up, maps a
drive to each server and checks the date last modified of a particular file
seems ok except for one strange issue
server1's file has a dlm of 11/04/05
server2's file has a dlm of 28/04/05
when i run the script it reports back the other way round. i.e. server1 as
28/04/05 and server2 as 11/04/05
the map.cmd command removes the current L: mapping and maps to servlist(x).
this is OK as i have generated an audit file from this and it maps the
correct way around (i.e. server1 first followed by server2)
any ideas?
cheers
option explicit
Dim WshShell, fso, file, lmdate, servfile, servlist(30), sl, x, y, server
set WshShell = createobject("wscript.shell")
set fso = createobject("scripting.filesystemobject")
set file = fso.getfile("L:\myfile.vbs")
set servfile = fso.opentextfile("serverlist.txt",1)
x = 0
Do While Not servfile.AtEndOfStream
sl = servfile.readline
servlist(x) = sl
x = x + 1
loop
y = x
x = 0
for x = 0 to eval(y-1)
wshshell.run "map.cmd "&servlist(x),true
lmdate = file.DateLastModified
lmdate = left(lmdate,10)
if lmdate = "11/04/2005" then
msgbox servlist(x)&" "&lmdate
else
msgbox servlist(x)&" wrong date"
end if
next Tag: Script to uninstall software Tag: 173911
Embed a spreadsheet
Is there a way to display an Excel spreadsheet in an hta?
Also, can one create Tabs in an hta.... One for user input data and another
to display the result of my script?
I'm also looking for good website on scripting and hta programming.
Thanks.
Daniel Tag: Script to uninstall software Tag: 173904
Login Script to Disable Password When Resume From Standby
When our workstations resume from standby, users are prompted for a password.
The client OS is XP Pro. The setting is on the Advanced tab in Power Options,
which needs admin priviledges to change, which they do not have.
We have been trying to stop this and have hit nothing but dead ends.
1- We tried powercfg.exe with the proper switches- only works for admins.
If anyone knows of a solution (script, registry mod, adm file, anything), I
would be extremely gratefull for your wisdom. Tag: Script to uninstall software Tag: 173903
<#include>
Using the directive <#include> in a asp page what are the differences
between
"file" and "virtual" ?
thanks Tag: Script to uninstall software Tag: 173899
scripting events
Hi, I consider myself a newbie to vbscript. Been working with VBA for a bit
however. I'm trying to see if I can interact with applications using event
based code. An example of such is:
'Snip******************************
Option Explicit
Dim objExcel
Dim i
Set objExcel = CreateObject("Excel.Application")
WScript.ConnectObject objExcel,"objExcel_"
objExcel.Visible = True
objExcel.Workbooks.Add
i = 0
Do
WScript.Sleep(100)
i = i + 1
Loop While (i < 100)
WScript.Echo("Script Complete")
Sub objExcel_WindowActivate()
WScript.Echo("WindowActivate")
End Sub
'Snip******************************
I tried referencing some of the articles in the library, but I think I wound
up confusing myself. The above code just returns an error that it can not
connect to the object. If I use WScript.CreateObject("Excel.Application",
"objExcel_") instead, it compiles, but does not respond to events. Any
pointers for a newbie?
-J Tag: Script to uninstall software Tag: 173897
How to find network places on a network
and find other computers, list them and attempt to connect them (or
list ip-name datas)with vbs (inside HTA)?
Thank you
Caglar Orhan Tag: Script to uninstall software Tag: 173896
Copy file on a file server not on domain using IP address
I need to copy a file on a file server that is not on the domain to the
local machine using IP address and login ID/password. Is this possible
using vbscript? Thank you for your help. Tag: Script to uninstall software Tag: 173891
Remove selected items from listBox
I have populated A listbox with a list of processes.
After selecting i click a button to kill the selected processes.
>>Can anyone tell me how i can refresh the listbox.<<
I've tried simply by re-populating the listbox as i did above but the
highlighted selections still show and i end up with double the amount of
processes showing.
hope u can understand this!!!
thanks in advance
so far i have ....
Sub Window_Onload
document.body.style.cursor = "wait"
'Get processes
strComputer = "."
Set colProcesses = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer & _
"\root\cimv2").ExecQuery("Select * from Win32_Process")
For Each objProcess in colProcesses
Return = objProcess.GetOwner(strNameOfUser)
If strNameOfUser = "Ben" then
Set objOption = Document.createElement("OPTION")
objOption.Text = objProcess.Name
objOption.Value = objProcess.Name
Processess.Add(objOption)
End If
Next
document.body.style.cursor = "default"
End Sub
*** Sent via Developersdex http://www.developersdex.com *** Tag: Script to uninstall software Tag: 173889
ASPUpload problem
I'm using ASPUpload to upload a file to my server, and then to auto email it
to me, and it works fine except for one part. The start of the code is shown
below, and you will see that I have set it to only accept .doc or .txt
files.
If a file other than these is sent, the user gets the correct message saying
it's not the correct file type, and I don't get the email (which is right),
but the file IS being uploaded to my server, so I could end up with any type
of ile in there.
Could anyone explain how I can tweak the code blow so that the file doesn't
make it on to my server (which I assume is what the "File.Delete" part of
the code is supposed to do!
Thanks
Andrew
<%
DIM File, Upload, Count, Ext
DIM Mail, strMsgHeader
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False
Count = Upload.SaveVirtual("cv_files/")
IF NOT Count=0 THEN
FOR EACH File IN Upload.Files
Ext = UCase(Right(File.Path, 3))
IF Ext <> "TXT" AND Ext <> "DOC" THEN
response.Redirect("contact_not_sent.asp")
'Response.Write "Sorry, your CV is not in a .DOC or .TXT format and has
not been delivered through our system. Please save your CV in one of these
formats and resubmit it. Alternatively, please send an email and attach your
CV using the email link on this page."
File.Delete
ELSE
...rest of code here..... Tag: Script to uninstall software Tag: 173887
personal cert
I am looking for ways to export the personal cert *.pfx file with a password
on a Windows XP SP1 machine. Is this possible? Tag: Script to uninstall software Tag: 173882
Datetime with vbscript?
Hi:
There is a datetime field in a SQL Server database. Using ADO, I
extract the maximum date as follows:
strSQL = "SELECT MAX([Timestamp]) AS MaxDate FROM " & TableName
which I then execute. I then set a variable to this value:
varMaxDate = objRS.Fields("MaxDate")
and then I use this to set a SQL Statement:
sSQLStatement = "SELECT * FROM " & TableName & " WHERE Timestamp >= '"
& _
varMaxDate & "'"
The problem is, the resulting SQL Statement is a date, not a datetime.
What is the best way to create a SQL Statement that uses a real
datetime. This SQL Statement is to be used in a SQL Server DTS package
as a query against a Sybase database via ODBC (I'm using VB Script in
an ActiveX Script Task). So my goal is to look in the target table (SQL
Server) for the maximum datetime, and then get any records in the
source (Sybase) with a datetime greater than what is in the SQL Server
database.
Thanks,
Kayda Tag: Script to uninstall software Tag: 173881
How to disable File and Print Sharing using VBScript
How do we disable File and Printer Sharing using VBScript for Windows 2003.
Is there any other automated way to get this done. Like a registry tweak?
I used Regmon to identify the changes in registry. But when I made the
changes in the registry, it wouldn't reflect in the Network Properties even
after a re-boot.
Any help is appreciated. Thanks. Tag: Script to uninstall software Tag: 173872
Dynamicaly resizing popup-windows
Hi!
I use a "popup"-window to display the contents in a stringvariable (strMsg):
Dim oPopUp
Set oPopUp = window.open("about:blank","",
"height=450,width=400,scrollbars=yes,status=no,toolbar=no,menubar=no,locatio
n=no")
With oPopUp.Document
.Open
.Write "" & strMsg & ""
.Close
End With
The problem is that I don't know in advance how much text oPopUp is to
display. The contents of strMsg varies considerably. Sometimes oPopUp ends
up with a lot of unused space and sometime the user has to scroll a lot.
Is there a way to determine how high oPopUp needs to be and thereafter
resizing the window before displaying it to the user?
TIA
PO Tag: Script to uninstall software Tag: 173869
Copying newerfiles and subfolders
Hi
Is it possible (how) to only copy newer files inclusive subfolderes using
VBScript?
Set FSO = CreateObject("Scripting.FileSystemObject")
I need this for the domain login script.
I there an easier way of doing this?
regards
Henry Tag: Script to uninstall software Tag: 173867
Need Script to add computer description from text file
Can anyone get me some sample code for a vb script to add a computer
description from a text file to Active Directory? Thanks, Rick Tag: Script to uninstall software Tag: 173865
InternalName
Does anyone know how I could echo back a internal name of an dll or exe
file? I found this link:
http://www.nedcomp.nl/support/origdocs/dotnetsdk/cpref/frlrfsystemdiagnosticsfileversioninfoclassinternalnametopic.htm
, but its for Visual Basic, C#, JScript only, and I can't figure out
how I would do it in vbscript. Tag: Script to uninstall software Tag: 173864
Please help with vbscript, Mysql, mysql control center & text field display on web page
hi,
I'm new to mysql & vbscript and am trying to figure out why I can query so
far almost all the information in my mysql database but can't figure out why
I can't query and display the information for a text field that has a lot of
text in it (several lines)?
using:
MyODBC-standard-3.51.9-win.exe
mysql-4.0.20d-win.zip (mysql 4.0.20d) just upgraded to
mysql-4.1.4-gamma-win.zip
mysqlcc-0.9.4-win32.zip (mysql control center)
Language="vbscript"
Software is of type varchar
Solution is of type text
if I write this, the information in Software is displayed on the web page
but if I try to do the same with the field Solution, nothing at all gets
displayed.
Response.Write "<TR><TD>Software: " & objRecSQL("Software") & "</TD></TR>"
Response.Write "<TR><TD>Solution: " & objRecSQL("Solution") & "</TD></TR>"
I think this one I get to see some of the information but not all of it as
if it's too long to fit, but I know it's there as I can see the entire
information directly in the mysql control center database.
Response.Write "<TR><TD>Solution: " & Request.QueryString("Solution") &
"</TD></TR>"
anyway I can see all of it or at least capture a line at a time so I can
display it on my webpage?
as you can see I'm extremly new at this and would appreciate any help at
all.
Thank You
France Tag: Script to uninstall software Tag: 173858
Read last lines of logfiel
Hello,
I want to make a script that reads 8 different logfiles and grep the
last 10 lines from those files (the result) and past that in a new txt
file.
Can someone point me in the right direction.
Thanx,
Marco Tag: Script to uninstall software Tag: 173853
Search or users in AD based on Groups
Hi
I quite new to VB scripts, and I have a slight challange on my hands. The
thing I want to do is something like this:
Search through AD for users and check group memberships
For all users in Group1
Print to file 1.txt
For all users in Group2
Print to file 2.txt
For all users in Group3
Print to file 3.txt
End script
As my knowledge in VB script is quite low, i would really appreciate if
someone could give me a hand here.
Regards
Frank G Tag: Script to uninstall software Tag: 173834
Text File Size Limit?
I'm using a script to get all of the shares of some servers on my network
and then write them to a text file. The script runs find until it gets to
one of either two servers that have hundreds of shares. The script will
crash. If I run each of these two servers in their own individual script,
they work okay. Is there some size limit to the file it can create? I'm a
bit of newbie here and appreciate any help. Here's the basis of my script
that uses the rmtshare command to get the shares. I reuse the code for each
server:
SET servername=server1
FOR /F "tokens=1 skip=4" %%i in ('rmtshare \\%servername%\ ^|findstr /L /V
"IPC$ ADMIN$ successfully." ^|findstr /B /I /V /C:"[A-Z][$]"') do (SET
Share=%%i) & (CALL :SecondTry)
FOR /F "tokens=1,*" %%i in ('rmtshare \\%servername%\%Share% ^|findstr /I
"Remark"') do (SET Remark=%%j)
IF "%Remark%"=="" FOR /F "tokens=2" %%i in ('rmtshare \\%servername%\%Share%
^|findstr /I "Path"') do echo \\%servername%\%Share%=%%i /unlimited>>
source.txt & GOTO :Last
FOR /F "tokens=2" %%i in ('rmtshare \\%servername%\%Share% ^|findstr /I
"Path"') do echo \\%servername%\%Share%=%%i /unlimited /remark:"%Remark:
=%">> source.txt
SET servername=server2
FOR /F "tokens=1 skip=4" %%i in ('rmtshare \\%servername%\ ^|findstr /L /V
"IPC$ ADMIN$ successfully." ^|findstr /B /I /V /C:"[A-Z][$]"') do (SET
Share=%%i) & (CALL :SecondTry)
:SecondTry
FOR /F "tokens=1,*" %%i in ('rmtshare \\%servername%\%Share% ^|findstr /I
"Remark"') do (SET Remark=%%j)
IF "%Remark%"=="" FOR /F "tokens=2" %%i in ('rmtshare \\%servername%\%Share%
^|findstr /I "Path"') do echo \\%servername%\%Share%=%%i /unlimited>>
source.txt & GOTO :Last
FOR /F "tokens=2" %%i in ('rmtshare \\%servername%\%Share% ^|findstr /I
"Path"') do echo \\%servername%\%Share%=%%i /unlimited /remark:"%Remark:
=%">> source.txt
:Last
GOTO :EOF Tag: Script to uninstall software Tag: 173831
Dynamicly propagating a List Box
I'm writing an HTA that does an LDAP query to find all computers in my AD
domain. Let's say the results are returned in an array called aryComputers
My goal is to take the output from the query and propagate a listbox in a
manor similar to the following:
HTML:
<select name="lstComputers" id="lstComputers">
<script language="VBScript">
<!--
for each computer in aryComputers
{code to propagate the listbox}
next
-->
</script>
Any pointers would be a big help!! Tag: Script to uninstall software Tag: 173823
How do I print multiple strings from an array in one window?
Ok I wanted to solve this on my own... however I am stuck. Here is the
code:
For i = 0 to RecordCount-1
PrinterName = PrinterNameField(i)
FinalName = PrinterName & VBCRLF & Printernamefield(i)
'MsgBox FinalName
Wscript.Echo PrinterNameField(i)
Next
What I have here is an array called PrinterNameField. It has a bunch
of printer names I got from a previous function. What I WANT to do is
print all the values from the array in one window, so it would look
like this:
printername1
printername2
etc...
However I can't figure out a way to make a string that will
automatically store this info so I can just "msgbox string" and get
this output. All I can do is get the outputs in their own window since
each loop prints it's own value.
Any help is GREATLY apprecieated.
thanks,
Thor Peterson Tag: Script to uninstall software Tag: 173821
Createing a directory on a remote computer
Is there a object or objects, available from WSH, that will allow me to
pass credentials and create a directory and set access permissions on a
remote computer? Tag: Script to uninstall software Tag: 173814
Hello,
Please post a script how to uninstall software from computer. Software is
McAfee Antivirus