ANN: Admin Script Editor
iTripoli, Inc. is pleased to announce the ultimate script editor for
Windows administrators. Admin Script Editor (ASE) offers
administrators a targeted solution to scripting with several features
found nowhere else. ASE supports VBScript, KiXtart, AutoIt and Batch
scripting languages?
* Script Packager ? Create secure executable packages from script with
the ability to run with alternate credentials. You may include support
files, dictate several security options, specify an optional system
tray icon and tool tip to display during execution, and more.
* WMI Code Wizard ? Provides sample data for properties so you can
choose which properties you wish to use. Extensive customization
options allow full control over generated script code.
* ScriptSense ? See the syntax for functions appear as you type. As
you type each parameter for the function, that parameter is
highlighted to help you keep your place. Further, nesting is supported
so you can even get this support when writing functions within other
functions.
* Integrated Keyword Help ? ASE uses its own database of syntax,
samples and more to provide keyword help for all supported languages
right within the editor!
* Collapsible code ? Organize your script and make it more readable
with the ability to collapse regions of code.
Flash movies are provided for all of these features, or download the
45 day trial version. For more details visit:
http://www.adminscripteditor.com/editor/index.asp Tag: Extract phone list to web? Tag: 165326
Looking for partners interested in beginning a "cut above the rest script website"
I don't want to give any ideas away, but interested people:
Should have mcse/a
I pay for site (or you can help pay for it, if you want)
We need to setup some kind of contract if this thing goes big.
mail me for more details.
jkoorts@myrealbox.com Tag: Extract phone list to web? Tag: 165317
Sharing Folder using VBS
Hi,
I would like to run a script that will change a drives Sharing properties
from "Do not share this folder" to "Share this folder" and set the required
Shared Name.
Any help would be appreciated. Tag: Extract phone list to web? Tag: 165316
Registry: Read all values from certain key?
Hi,
I am writing an vbscript and I have to access the windows registry.
To read and write a key works fine, i.e.:
Set WSHShell = WScript.CreateObject("WScript.Shell")
RegLocate = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet
Explorer\Version"
MyVersion = WSHShell.RegRead(RegLocate)
But how do I read all values from a certain key and I don´t know the names
of the value.
Is there a way like
for each MyEntry in key
msgbox MyEntry.type
msgbox MyEntry.caption
msgbox MyEntry.value
Next
The script has to run on W2K and XP.
Thanks a lot
J.Steinblock from germany Tag: Extract phone list to web? Tag: 165314
Cookie problem from ASP on XP SP2
Hi
The following code has been working fine for our site as part of the
authentication process right up until the SP2 upgrade. Now on SP2 PCs
the cookie isn't written even though the referer is www.abc.com. Works
fine on other Windows combinations. Can anyone help?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
If instr(Request.ServerVariables("HTTP_REFERER"), "www.abc.com") > 0
Then
'response.cookies("abcresource") = "ok"
'response.cookies("abcresource").expires = date + 1
Response.Cookies("abcresource")("Passed") = "OK"
Response.Cookies("abcresource").Expires = DateAdd("d",1,Date)
Response.Cookies("abcresource").Path = "/"
Response.Cookies("abcresource").Domain = "www.abc2.com"
End If
%>
<%
If Len(Request.Cookies("abcresource")("Passed")) = 0 Then
Session("abcresourcepage") = Request.ServerVariables("PATH_INFO")
Response.Redirect("/login.asp")
End If
%>
Thanks
W Tag: Extract phone list to web? Tag: 165310
RegRead
Hi,
I am trying to read a reg key from the registry. the problem is that if the
key doesn't exist, the script jumps to "If Err.Number <> 0 Then", or cause
runtime error, if i don't use "On Error Resume Next"
I wanted to use it in the following way:
Set RegistryOBJ = WScript.CreateObject("WScript.Shell")
'returns the path of my app writen in the registry
Get_ETS_PathInRegistry = RegistryOBJ.RegRead(ETS_RegistryLocation)
If ETS_UnInstallPath = False Then
'if the key doesn't exist, we can install the app
Install_ETS(ETS_InstallPath)
Else
'if the key exists, we should uninstall it and then install the new
version(might be in new path)
UnInstall_ETS(ETS_UnInstallPath)
'ETS_InstallPath is being obtained from user.
Install_ETS(ETS_InstallPath)
End If
The problem is that it doesn;t go to the "If ETS_UnInstallPath = False Then"
but as i described above, go to the end of the script and then ends the
script.
in this way, i will need to add in "If Err.Number <> 0 Then"
"Install_ETS(ETS_InstallPath)
" command.
Isn't there an elegant way to do so, or i should consider doing it using VC? Tag: Extract phone list to web? Tag: 165305
Where Do I Look for File Locks Using WMI ?
Hi everyone,
I ma trying to write a VB Script checking if a particular file is locked by
other process, that is, if the handle exists.
I have tried using WMI cim_datafile and Win32_Process files but I did not
found anything useful.
The only example I found uses .Net Framework
ManagementBaseObject.GetRelated() method which does not seem to have an
equivalent available from VB Script.
Tom Tag: Extract phone list to web? Tag: 165304
vbscript, asp, sockets responses not received
Howdy People,
I guess this might be more of an IIS architectural question, but there is
some vbscript content, so I'll post it here.
Grateful for any help people might have on this problem.
I have an asp page running some vbscript. The vbscript instances a COM dll.
The COM dll sends a UDP message to a process running on another server
somewhere, then blocks waiting for the response. My problem is that the
response is never received by the dll. I've tried running a sniffer on the
web server, and it shows that the response is coming back as expected,
coming to the correct port number and everything, but the dll just sits
there and receives nothing.
Any clues what's going on?
MIKE Tag: Extract phone list to web? Tag: 165300
WMI - User problem
I'm completely new to scripting.
I would like to write to file:
name, path, target and creation date for all shortcuts on my system.
I composed this script from two scripts from the Script Repository:
'------------------------------shortcuts.vbs--------------------------
Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
("C:\Scripts\Shortcuts.tsv", ForAppending, True)
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer _
& "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from _
Win32_ShortcutFile")
For Each objItem in colItems
strCreationDate = WMIDateStringToDate(objItem.CreationDate)
objTextFile.WriteLine _
(objItem.FileName & vbTab & _
objItem.Drive & objItem.Path & vbTab & _
objItem.Target & vbTab & _
strCreationDate)
Next
objTextFile.Close
Wscript.Echo "Finished!"
Function WMIDateStringToDate(dtmDate)
WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
& " " & Mid (dtmDate, 9, 2) & ":" & _
Mid(dtmDate, 11, 2) & ":" & Mid(dtmDate, _
13, 2))
End Function
'---------------------------------------------------------------------
On my XP Home system, with only one user, this seems to work for all
shortcuts, eg the shortcuts from the *All Users* Desktop and Start Menu,
but not for eg the shortcuts from the *User* Desktop and Start Menu.
Can anyone help, please?
TIA
--
Cheers,
S.F. Tag: Extract phone list to web? Tag: 165294
HTML DOM
Hi All,
I am attempting to automate a job which requires navigating through a
website with internet explorer. I don't wish to use the
InternetExplorer.Application object as I have found flaws with it. I am
using SendKeys and WScript and the MICROSOFT.XMLHTTP object to obtain the
contents of the pages as I go. In a former script I was able to obtain
textbox & button objects on a page with the InternetExplorer.Application
object.
eg.
set itms = ie.Document.All
itms.username.value = user
How can I acheive the same result with other objects? I have the
MICROSOFT.XMLHTTP object for the page.
Thanks,
Jesse Tag: Extract phone list to web? Tag: 165288
MAC Address
IS it possible to get the MAC address of the user ? Any tips would be
greatly appreciated.
Thanks in advance. Tag: Extract phone list to web? Tag: 165287
Enumerating Groups in ASP with IIS 6.0
I am having an issue enumerating a given users groups with the following ASP
script:
Sub GetGroups()
Dim sDomain
sDomain = "bsd-dean"
UserGroups = ""
if instr(1,Request.ServerVariables("LOGON_USER"),"\") > 0 then
sUser = replace(Request.ServerVariables("LOGON_USER"),"\","/")
else
sUser = sDomain & "/" & Request.ServerVariables("LOGON_USER")
end if
Set oUser = GetObject("WinNT://" & sUser)
For Each oGroup In oUser.Groups
if UserGroups <> "" then UserGroups = UserGroups & "," end if
UserGroups = UserGroups & oGroup.Name
Next
Response.Write UserGroups
Response.Write "<br>"
'Response.Write oUser.get("name")
if UserGroups<>"" then UserGroups=split(UserGroups,",")
set oUser = Nothing
set oGroup = Nothing
end sub
The script works fine on my 2000 server machine and also works for the
administrator on the 2003 machine. I get the user logon infor including the
domain, but I get an access denied error when it tries to read the groups
that the users are in. Anybody know how to get this to work? Tag: Extract phone list to web? Tag: 165283
Vbscript and WEB
Can anyone point me to the right resource?
I am trying to hvae a web interface for maintaining Active Directory. I want
to be able to do simple functions such as changing password - listing a
user's memberships, searching,etc.
I have created *.vbs scritps before to run some tasks - just not sure how to
integrate that onto a web form
Any help will be appreciated
thanks
-JPierre Tag: Extract phone list to web? Tag: 165282
How to connect to an access DB using vbscript
Plz, how i connect to my access db (c:/mydb.mdb),retrieve information from it
to a form on a web page and update it Tag: Extract phone list to web? Tag: 165274
Registry key with spaces not reading correctly
The code below seems to work unless the Registry key has spaces like RAM
Structural System v8.2 in the key. If I use a key that does not have spaces
it works fine. Do I need to put additional quotes or something ?
Thanks in advance
Steve
If
RegKeyExists("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RAM
Structural System v8.2") Then
WScript.Echo "Ram 8.2 Installed"
End if
Function RegKeyExists(ByVal sRegKey)
' Returns True or False based on the existence of a registry key.
Dim sDescription, oShell
Set oShell = CreateObject("WScript.Shell")
RegKeyExists = True
sRegKey = Trim (sRegKey)
If Not Right(sRegKey, 1) = "\" Then
sRegKey = sRegKey & "\"
End If
On Error Resume Next
oShell.RegRead "HKEYNotAKey\"
sDescription = Replace(Err.Description, "HKEYNotAKey\", "")
Err.Clear
oShell.RegRead sRegKey
RegKeyExists = sDescription <> Replace(Err.Description, sRegKey, "")
On Error Goto 0
End Function Tag: Extract phone list to web? Tag: 165268
Save a file in internet explorer
I use the following script to navigate to a site
set objexplorer = createobject("InternetExplorer.Application")
objexplorer.navigate http://10.3.1.48/devadmin/sys_adm.dhtml
I would like to use vbscript to save the page to a file. Any one know the
syntax
thank you Tag: Extract phone list to web? Tag: 165266
Script has stopped transfering files
I have been using a script to transfer files from several remote servers on
a daily basis. Up till now the script has been functioning as it should,
however I noticed this morning that my script was generating the "Job
Finished" echo way too quickly so I checked the contents of the mapped
shares and found that the files were still there. After commenting out the
"On Error Resume Next" the following error popped up:
Error: File already exist.
Code: 800A003A
Source: Microsoft VBScript runtime error
The line that is referenced is the 'objFileSystemObject.CopyFile' portion
of Sub Transfer. While there are files in that New Directory that might have
the same name, why didn't the OverWriteFiles option ignore this?
Dim objWshNetwork, objWshShell
' On Error Resume Next
Set objWshNetwork = WScript.CreateObject("WScript.Network")
objWshNetwork.RemoveNetworkDrive "m:"
objWshNetwork.MapNetworkDrive "m:", "\\server\share"
Call Transfer
objWshNetwork.RemoveNetworkDrive "m:"
WScript.Echo "Test Finished!"
' Sub routine for moving Audit results from the local DC
Sub Transfer
Dim objFileSystemObject
Set objFileSystemObject = WScript.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFileSystemObject.GetFolder ("m:\Data")
If objFolder.Files.Count > 0 Then
objFileSystemObject.CopyFile "m:\Data\*.xml",
"T:\New Directory\Data", OverWriteFiles
objFileSystemObject.DeleteFile "m:\Data\*.xml",
Force
End If
End Sub Tag: Extract phone list to web? Tag: 165265
mouse control
is there script that may simulate all user's action:
a) keyboard press, letters as well special win keys like alt+enter
b) mouse moving [pointer moving accross the screen] and click and double
click
the idea is to have recorded [i'll rather say programaticaly "constructed"]
all keyboard and mouse activities and than making "replay"
i suppose to have some control data file like:
<mouse_to> x1,y1
<wait> 1 second
<mouse_click>
<mouse_drag_to> x2,y2
<mouse_click>
etc...
script is reading that control file and performing action [moving mouse]
accros the screen.
this could allow me to controll some other win program, exactly as user
sitting in front of display.
is it possible? is there some script or com object or whatever? Tag: Extract phone list to web? Tag: 165264
Remove Security Groups
How can I, or what would be an efficient method to remove all but the
default security groups from a 1000+ user accounts. Can I just move all of
the accounts to a specific container and apply a policy that will do this or
is there another method that is recommended? Tag: Extract phone list to web? Tag: 165260
Problem inserting record into MS Access
Hi
I use the following VBScript to insert records into a MS Access db located
on our company server:
cn.Mode=adModeReadWrite
If Request.QueryString("Option")="ADD" Then
cn.Execute "INSERT INTO RPTFAVORITES (RPTFK, UID) " & _
"VALUES(" & Request.QueryString("ReportID") & _ ",'" &
Request.QueryString("User") & "')"
End If
I have set up the DB on my client and when I run the app on my "localhost"
it works perfectly. However when I run the app on the server I get the
following error
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable
query.
I suspect this has something to do with permissions. I have assigned the
default group account "users" to all tables. The users account has all
permissions set to TRUE. Are there any other permissions to be set?
Any ideas?
PO Tag: Extract phone list to web? Tag: 165252
Script connection to SQL Server db
Hi NG,
from within a script, I want to connect to a SQL Server database using a
dedicated user account that has 'INSERT' rights for a special table within
this db. As this table contains sensitive data, we want to use an account
with just this right so that anybody who guesses the password cannot read the
data.
The SQL server uses Windows NT authentication ONLY (no mixed security). How
must I construct the ADO connection to use the dedicated user account for the
connection? So far, I have scripts that authenticate an ADO connection using
a SQL server account (with SQL server in mixed security), but I cannot figure
out how to use a different domain user when connecting to a SQL server with
Windows NT authentication. Is this even possible??? Tag: Extract phone list to web? Tag: 165251
Attaching A Dos Window
I would like to run a script and have it open a Command/DOS window and send
all its outputs to the window. Is there a easy way to do this?
Thanks,
Ken Tag: Extract phone list to web? Tag: 165250
A Single Task Question
Hi Everyone:
I have a single task. I need to update some of the file properties fields
of about 300 image files for a wedding I just completed. I want to update
the 'Author' and 'Copyright' fields, but I don't want to have to right-
click, open the properties sheet, etc etc etc.
Can I do this in VB Script? I've been scanning the docs on Microsoft.com
and it's not readily apparent. I'm a SQL person primarily, so VB is kinda
alien. Any suggestions or pointers or doc references will be appreciated.
TIA,
Mike Tag: Extract phone list to web? Tag: 165247
Go to linenumber
Hi,
What is the syntax for going to a particular line number to start
processing. I want to stop reading at one point in the script and then start
processing at say line number 20 is there a way in VBScript,WMI etc
xor Tag: Extract phone list to web? Tag: 165237
how to change static DNS configuration to automaticaly DNS
Hi!
I'm trying to write a script that should change from static IP and DNS to
automaticaly obtain the IP address and DNS too.
I've already made the first point that is:
static IP ---> automatically IP
But the second point no...
static DNS ---> automatically DNS
Can somenone help me?...
Thanks
Nuno
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetAdapter In colNetAdapters
errEnable = objNetAdapter.EnableDHCP()
errEnable = objNetAdapter.SetDynamicDNSRegistration()
Next
For Each objNetCard in colNetCards
objNetCard.SetDynamicDNSRegistration True, True
Next Tag: Extract phone list to web? Tag: 165234
server-side editing of HTML via vbscript
I have a series of pages that are assembled dynamically from various
sources. Before the page is returned to the client, I want to find an
anchor matching a URL that's stored in a var. Then I will change the
class of that anchor.
It's easy enough to do this client-side, but I would much rather do
this server-side. I'm pretty new to ASP scripting, but I'm inclined
to think there's some way to use the DOM to get what I want.
I'd searched this group repeatedly and can't find anything on this
point. I'd sure appreciate any approach to this.
Jeff Tag: Extract phone list to web? Tag: 165233
The most powerfull group for account?
Hello!
How to obtain the most powerfull account for the group?
If account is in:
users
domain users
administrators
domain administrators
I want to take only domain administrators.
Anyone can help me? Tag: Extract phone list to web? Tag: 165232
VBscript to install & run app
I need a script that will push a utility to all the client PC's on our
network and start that utility's installation. I am testing it on my
machine first (XP with SP2), and I'm having some problems even running it.
Here's the script so far:
Dim oShell
Set oShell = WScript.CreateObject("WScript.Shell")
oShell.Run "C:\FxBeagle.exe"
oShell.SendKeys "{Tab2}"
oShell.SendKeys "{Enter2}"
Set oShell = Nothing
This is only to run the app. The app opens fine, however, the script stops
running due to the SP2 security prompt. Can anyone help with this script?
Thanks in advance. Tag: Extract phone list to web? Tag: 165230
Permission denied: 'CreateObject' ... all of the sudden
I haven't changed anything on my XP SP1 PC since last week - now all of the
sudden, I cannot create any IE instances via VBScript.
Even with this simple script:
Set s = CreateObject("InternetExplorer.application")
s.Visible = True
' Change the following line to the Internet site you want to open.
s.Navigate "http://www.microsoft.com"
I get :
Line: 1
Char: 7
Error: Permission denied: 'CreateObject'
Code: 800A0046
Source: Microsoft VBScript runtime error
I have various scripts that depend on the IE interface (I use it as a status
update)...what the heck can I do about this? Tag: Extract phone list to web? Tag: 165225
Using a vArg from the comand line for strComputer
I have this as part of a overall script...
Sub ParseCommandLine()
Dim vArgs
set vArgs = WScript.Arguments
if vArgs.Count <> 2 then
DisplayUsage()
Else
host = vArgs(0)
EventID = vArgs(1)
End if
End Sub
I want to use the host variable in the strcomputer = "." line in my script
(obviously replacing the . with the variable name) I have tried "'&host&'",
&host& and every other combonation... What is the correct syntax to get the
command line variable host (or) vArgs(0) for the strcomputer = line?
Thanks
-david Tag: Extract phone list to web? Tag: 165223
cant read event logs with code that should work (I think!)
Hi all. Keep getting the following error on WinXP boxes as well as my
Win2000 servers whenever I try to use vbs to read the event log: "
ActiveX component can't create object: 'GetObject'"
Heres the code I am using:
<html>
<head>
<title>OpLets v1.0</title>
</head>
<body>
<script type="text/vbscript">
<!-- event log -->
function eventlog
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colLoggedEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where Logfile = 'Application'")
For Each objEvent in colLoggedEvents
Wscript.Echo "Category: " & objEvent.Category
Wscript.Echo "Computer Name: " & objEvent.ComputerName
Wscript.Echo "Event Code: " & objEvent.EventCode
Wscript.Echo "Message: " & objEvent.Message
Wscript.Echo "Record Number: " & objEvent.RecordNumber
Wscript.Echo "Source Name: " & objEvent.SourceName
Wscript.Echo "Time Written: " & objEvent.TimeWritten
Wscript.Echo "Event Type: " & objEvent.Type
Wscript.Echo "User: " & objEvent.User
Next
end function
</script>
<p><a href="vbscript:eventlog">Check Event Logs</a> </p>
<hr>
<nobr Id=Results></nobr>
</body>
</html> Tag: Extract phone list to web? Tag: 165220
Defrag Report
Is there any way of pulling up a defrag report for a machine?
I've seen a lot scripts that will automate the defrag but that's not what I'm after. Tag: Extract phone list to web? Tag: 165213
Problem with variable scope
Hello all,
I have the following script:
Test = "hello"
If Test = "hello" then
MyVar = "ok"
end if
MsgBox MyVar
I would expect that variable MyVar would hold "ok" but it does not.
Is the scope of this variable limited to the if - end if construct ?
How can I workaround this ?
Thanks
Bar Tag: Extract phone list to web? Tag: 165212
Messagebox which is only 3 seconds active
Hi
Is there a possibility to show a messagebox only for seconds? I just want to
give some infos to the user and let the box automaticly remove an continuing
the code?
I think it is not a msgbox but is there a way?
Thanks for every help!
Nijazi Halimaji Tag: Extract phone list to web? Tag: 165210
How to create a simple web service and consume it from VB Script
Hello All
Can you kindly share how to create a simple web service in VB Script
if not possible in VB Script please provide a simple sample in VB and
how to compile it and then how to consume this web service form VB
Script.
Thanks
Karen Tag: Extract phone list to web? Tag: 165207
Accepting user input with WSH
Hi,
What I am going to do is write some scripts to generate a file with a
the text of all files in a certain directory. I will then create another
script to seach that created file and output the search results to a
.html page for viewing. My problem is not generating the file with the
text, or doing the searching or generating the results but after
searching all the docs I can find on MSDN, there doesn't seem to be a
way for my to create a way other than on the command line to accept user
input for the search parameters.
Any suggestions or URLs would be great.
Ideally I would like to popup a small dialog box to accept the users
input.
One caveat though I may only use scripts, no compiled executables are
allowed.
Thanks for the assistance
Jack Wayne Tag: Extract phone list to web? Tag: 165198
How to do something based on set of workstations
I want to do something based on the workstation that runs the script. I.E.
if is a workstation FRED or BARNEY or WILMA, or BAMBAM I want it to do x,
and if it is BART or HORMER or LISA I want it to do y and so on. I could
write a ton of if statements but that seems inefficient, is there another
way?
Thanks,
Arch Tag: Extract phone list to web? Tag: 165187
Newbie question about instantiating objects
If I want a script to bind to a folder "A", I understand that I need to
first instantiate the folder object
[e.g., Set fso = CreateObject("Scripting.FileSystemObject")],
' = Line #1
and then assign an object reference moniker to the folder object
[e.g., Set files = fso.GetFolder("C:\A").Files].
' = Line #2
Well, this raises a few questions for which I haven't been able to find
answers..
a. Must Line #2 come immediately after Line #1?
b. If I want to work on folder "B" too in this script:
1) Do I repeat Line #1 again as follows?
Set fso = CreateObject("Scripting.FileSystemObject")
' = Line #1 again
Set files = fso.GetFolder("C:\B").Files.
' = Line #3)
2) If I do repeat Line #1 again, how do I tell a routine which
folder object to work on?
3) Where can I find the answers/explanations for these questions?
Thanks,
marc hankin Tag: Extract phone list to web? Tag: 165183
Using GPG From Script
Hello,
Yes, I've Googled and so on, but am a bit stuck. This is actually my
first vbscript. The goal is to manage GPG encryption/decryption of
files from a script, which will eventually be a function of a larger
script. The script below is my attempt at getting this working. The
first WshShell.Exec works but the second does not (the first one may
wrap). I'm sure it's something simple.
---
Option Explicit
'Declare the variables
Dim WshShell, oExec
Dim GPGPTFName
Dim GPGRecip
'Define the variables
GPGPTFName = "c:\gnupg\test.txt" 'GPG plain-text filename
GPGRecip = "someone@somedomain.com" 'GPG recipient
'Define the constants
Const GPGEncrypt = "C:\gnupg\gpg.exe -e -r" 'GPG command to encrypt
Const GPGDecrypt = "C:\gnupg\gpg.exe -d" 'GPG command to decrypt
'Invoke the WScript Shell Object
Set WshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Exec "C:\gnupg\gpg.exe -e -r someone@somedomain.com
c:\gnupg\test.txt"
WshShell.Exec (GPGEncrypt & GPGRecip & GPGPTFName)
---
Also, please bear in mind that I will eventually need to capture an exit
status and error out to a mail function (with the reason why it failed),
if it fails. All help appreciated. Tag: Extract phone list to web? Tag: 165180
Wireless WMI class
Hello to all,
I´m Eduardo Martin(Spain). In first place, thanks to Ulf Dornheck Busscher
to reply me last question about configure several ip address.
I return with a new question. I´m developing a script to work with wireless
network. But i cannot find a WMI class to configure the SSID(Network name)
for a wireless network device. i have been searching in WMI class library,
command-line help, netsh command,etc...
Can anyone help me with this problem? Tag: Extract phone list to web? Tag: 165177
How can i refresh the desktop ?
i wrote a script to set the wallpaper
how can i refresh the desktop after i run the script ?
i found on the web that i can run "RunDLL32.EXE USER.DLL,repaintscreen" to
do that
but this is not supported in winxp
thank you.
gary Tag: Extract phone list to web? Tag: 165174
Can vbscript name files in a web folder?
I'm wondering if I should learn vbScript...
I'd like to have a folder in my webspace, where I can dump any number
of jpg's arbitrarily, and write a web-page that will pick up
everything in the jpg folder, without my having to name each jpg in
the script.
Can that be done with vbscript, or does it exceed security limitation.
tony Tag: Extract phone list to web? Tag: 165170
MsgBox return Values --- help please
I have this code block setup within my ASP page using VB Script as the main
language.
I want to be able to return the value of the client side VBScript back to
the main page for processing.
Does anyone know how to achieve this?
Thanks!
######
CODE
######
if entryExists > 0 then
%>
<SCRIPT LANGUAGE="VBScript">
MsgVal = MsgBox ("Date Already Exists!", 1, " PLEASE NOTE !!")
</SCRIPT>
<%
if MsgVal = 1 then
Response.Write "OK PRESSED"
else
Response.Write "CANCEL PRESSED"
end if
end if Tag: Extract phone list to web? Tag: 165168
From numbers to letters.
This script transforms a number in words.
It works fine but as I'm a non-native english speaker I don't know if the result is
correct english.
Especially for Billions. A few years ago some english and american friends of mine could
not agree on the value. In the scirpt are thousands of millions.
Hope a reader from Florida of this ng will appreciate. ;-)
I will not say his Name.
Bye.
Giovanni Cenati.
'************************************************
' File: From numbers to letters_test.vbs
' Author: Giovanni Cenati
' my address is at katamail dot com with name Reventlov
'************************************************
'SET FSO = CreateObject("Scripting.FileSystemObject")
'SET TextFile = FSO.CreateTextFile("test.txt", True)
'for i=23400000 to 23401700 step 17
'TextFile.Write i & " " & Trasformainlettere(i)
'TextFile.WriteLine
'next
'msgbox "end test"
A=inputbox("Number to be converted in letters:")
a=inputbox("Converted:",,Trasformainlettere(a))
wscript.quit
'-------------------------------------------------------
'************************************************
' File: Transforms to letters.vbs (function)
' Author: Giovanni Cenati
'
'************************************************
function TrasformaInLettere(byval n)
dim i, dec, lun, lett
dim tri(5)
n=cdbl(n)
num=cstr(fix(n))
Str=cstr("000000000000000000000"&num)
lun=len(Str)
for i=1 to 5
'cuts the string in pieces
tri(i)=mid(Str,lun-(i*3)+1,3)
'The number is now tri(5)& tri(4)& tri(3)& tri(2)& tri(1).
if tri(i)>0 then lett= TrasformaTerzina(tri(i),i) & lett
next
if lett="" then lett="zero" 'manages the zero
TrasformaInLettere= lett
end function
function TrasformaTerzina(tri,t)
'tri is "nnn" to be converted.
't is the number as below::
't=1 if the number is from 1 to 999
't=2 from 1000 to 999000, e.g. the thousands
't=3 are the millions, etc
dim ultimeduecifre,ris,decine,unita
dim n(30) 'all the figures in letters
n(0)=""
n(1)="one":n(2)="two":n(3)="three":n(4)="four":n(5)="five"
n(6)="six":n(7)="seven":n(8)="eight":n(9)="nine":n(10)="ten"
n(11)="eleven":n(12)="twelve":n(13)="thirteen":n(14)="fourteen":n(15)="fifteen"
n(16)="sixteen":n(17)="seventeen":n(18)="eighteeni":n(19)="nineteen"
n(22)="twenty":n(23)="thirty":n(24)="forty":n(25)="fifty"
n(26)="sixty":n(27)="seventy":n(28)="eighty":n(29)="ninety"
'manages the hundreds
if left(tri,1)>0 then ris=n(cint(left(tri,1)))&"hundred"
'if it is nxx then uses n+hundred
'manages numbers from 1 to 19 and from 20 on
Ultimeduecifre=cint(right(tri,2))
if Ultimeduecifre < 20 then
ris=ris&n(Ultimeduecifre) 'from 1 to 19 uses the array "n".
else
'manages separately tens and units from 20 then joins them
Decine=mid(tri,2,1) 'tens
Unita=right(tri,1) 'units
ris=ris & n(20+decine) 'from n(22) is twenty, n(23) is thirty,etc.
Ris=ris & n(Unita) 'adds one, two three...
end if
'manages the position of thousands, millions, etc.
if t=2 then
ris=ris&"thousand"
if tri=1 then ris="onethousand"
end if
if t=3 then
ris=ris&"millions"
if tri=1 then ris="onemillion"
end if
if t=4 then
ris=ris&"billions"
if tri=1 then ris="onebillion"
end if
if t=5 then
ris=ris&"thousandbillions"
if tri=1 then ris="onethoudandbillions"
end if
TrasformaTerzina=Ris
end function
'-------------------------------------------------------
--
Giovanni Cenati (Aosta, Italy)
Write to user "Reventlov" and domain at katamail com Tag: Extract phone list to web? Tag: 165166
Createing active directory users from non administrator accounts.
I work for a public school district. I have a script that will add users to
Active Directory from a .CSV file. My problem is that I don't get
notification of new hires and new students. I also don't get notification
of students or employee's that leave. What I would like to do is have human
resourses a script that will add new accounts for the new employee's and
also an office script for new students. How can I have my script
authenticate as an administrator so that it will create the accounts? Thank
you Tag: Extract phone list to web? Tag: 165157
create loop through three recipients email addresses
With iMsg
Set .Configuration = iConf
.To = sRecipients
.From = sFrom
.Sender = sSender
.Bcc = sBcc
.Subject = sSL
.HTMLBody = strHTML
Next
End If
.Send
End With
-----------------
How do I create loop through three recipients email addresses, one at a
time? Tag: Extract phone list to web? Tag: 165143
how to cactch activex event in html page
Hi,
I'm developing an activex in C++. I'm using it in HTML pages. I
managed to call proporties and functions of this one. But I can't
catch his events.
I try it in VB and test container, and it's working very well. I've
tried following code :
<SCRIPT LANGUAGE="javascript" FOR="TelephonyPayment"
EVENT="NetworkReachedEvent()">
alert ("usercontrol event fired");
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
Sub TelephonyPayment_NetworkReachedEvent()
msgbox "Event Fired"
End Sub
</SCRIPT>
<script language="JScript">
function TelephonyPayment::NetworkReachedEvent() {
alert('Event fired: ');
}
</script>
But nothing runs.
What's the problem ?
Thanks in advance for your help Tag: Extract phone list to web? Tag: 165142
If sExt = "jpg" or "jpeg"
is it possible for this piece of code to be amended to include more than one
type of file extension?
If sExt = "jpg" or "jpeg"
doesn't seem to work.
sExt = oFSO.GetExtensionName(oFile)
If sExt = "jpg" Tag: Extract phone list to web? Tag: 165138
vbs to issue command
Hi,
How can I get vbs to issue this command:
sfc /scanonce
--
Regards,
David
Windows XP home edition Tag: Extract phone list to web? Tag: 165133
Does anyone have some sample code I can see that will let me pull a
staff phone list from AD and display it on a web page?