Scheduling task with other account rather than LOCALSYSTEM
Hello to all,
i´m developing a script using the clas Win32_ScheduledJob. The method create
of this class allow create Scheduled task in a machine, but, always under the
account LOCALSYSTEM adn also this Scheduled task cannot be modified later.
Can anyone help me??
Thanks in advanced Tag: How do you add a link to a site that uses a vbs script..... Tag: 164125
How to Authenticate to Create Local User On Remote WorkGroup Computer?
Hi,
First let me start by saying I'm no vbscripter but I've been doing some
playing around and I'm trying to write a small vbscript that I can
execute with cscript to create a local user on a remote Standalone
machine.
I started by creating a simple script that allows me to enter the
computer name to create the account on along with the username and
password of the new user account that will be created. I was able to run
this script on my local machine without problems and I was also able to
supply a different computer and successfully created the account after
authenticating myself with net use \\remotepc /user:<Administrator>
<Password>
------
strComputer = InputBox("Enter Computer Name: ", "Computer Name")
strUserName = InputBox("Enter UserName: ", "User Information")
strPassword = InputBox("Enter Password: ", "Password")
Set Accounts = GetObject("WinNT://" & strComputer & ",computer")
Set objUser = Accounts.Create("user", strUserName)
objUser.SetPassword strPassword
objUser.Put "PasswordExpired", 1
objuser.Fullname = "Test User"
objuser.description = "Test Description"
objUser.SetInfo
------
So now my problem, after two days of reading, I haven't really been able
to figure out how I can avoid the net use procedure and have the script
authenticate and create the user on a remote standalone box. I've read
that it's farily easy to authenticate a user on Active Directory using
the LDAP Provider, I've been trying to do the same thing using the WinNT
provider. As you can see from some good I pieced together with sames on
the net.
As I said before, I'm not vbscripter and I'm not sure if I'm even going
in the right direction, but I hope that someone could give me some
suggestions or point me to a sample script that can authenticate as a
user on a remote box that isn't on the domain to perform administrative
tasks.
Thanks in Advance!
---
strComputer = InputBox("Please enter Computer Name: ", "Computer Name")
strUserName = InputBox("Please enter UserName: ", "User Information")
strPassword = InputBox("Please enter Password: ", "Password")
on error resume next
strADsPath = ("WinNT://" & strComputer)
if (not strADsPath= "") then
' bind to the ADSI object and authenticate Username and password
Dim oADsObject
Set oADsObject = GetObject(strADsPath)
WScript.Echo "Authenticating"
Dim strADsNamespace
Dim oADsNamespace
strADsNamespace = left(strADsPath, instr(strADsPath, ":"))
set oADsNamespace = GetObject(strADsNamespace)
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath & "/" &
strUserName, strUserName, strPassword, 1)
' we're only bound if err.number = 0
if not (Err.number = 0) then
WScript.Echo "Failed to bind to object" ' & strADsPath
WScript.Echo err.description
WScript.Echo "Error number is " & err.number
else
WScript.Echo "USER AUTHENTICATED!"
WScript.Echo "Currently viewing object at " & oADsObject.ADsPath
WScript.Echo "Class is " & oADsObject.Class
end if
end if
--- Tag: How do you add a link to a site that uses a vbs script..... Tag: 164124
How to grab text from an open console window?
Is it possible to grab the text being displayed by an open console
window? I understand that console windows don't expose a scriptable
object model, so you can't do something like:
Set objCMD = CreateObject( "Command.Application" )
strText = objCMD.Document.DocumentElement.Text
But are there other approaches? Can you work with the desktop, for
instance? Thanks in advance to all who respond.
Leslie Tag: How do you add a link to a site that uses a vbs script..... Tag: 164123
Why xmlhttp detection fails?
I have following code to detect for xmlhttp object and it fails on default
security settings in IE6 Win XP, but works on IE6.0 Wn 2000
<SCRIPT language="VBScript">
Function DetectWinhttp()
On error resume next
DetectWinhttp = IsObject(CreateObject("Microsoft.XMLHTTP"))
end function
</SCRIPT> Tag: How do you add a link to a site that uses a vbs script..... Tag: 164122
Set the default local printer LPT1 using script
Hi,
I'm very new with scripting and I have a very small network and I'm trying
to get spesific machines to default to LPT1 printer. Is this something I
could do with scripts or changing the win.ini? What should be the command to
use?
Thanks in advance. Tag: How do you add a link to a site that uses a vbs script..... Tag: 164121
Programmatically change NICs Link Speed and Duplex
If someone could get me started in the right direction on this one I would
greatly appreciate it.
I want to have a script running from a scheduled task that will change the
link speed of machines it is run on:
Basically the scheduled task runs at 8am in the morning and changes the
machine link speed to 10Mb Full, then at 8pm at night the task runs with a
different set of variables and changes the link speed up to 100Mb Full (or
1Gb Full)...
I realize this could very since it is a rather hardware specific setting and
I am guessing it would be different from Intel to Netgear.
Any help is appreciated.
Joe Tag: How do you add a link to a site that uses a vbs script..... Tag: 164120
VBScript to do FTP
I have some problems finding an easy way to do FTP in VBScript so I
put this script together to do what I needed. I initially thought it
would be a hassle but it turn out pretty managable. Here is a strip
down version of the script with comments for anyone who'd like to try
it out. Basically your just creating a FTPCommands file the is used
with a ftp -s: switch.
You may need to reformat this thing before using it, the Google post
isn't wide enough I think.
Here it is...
'****Script to FTP using VBScript (With Comments)
'****By Matthew Ososky
'****Happy FTP'n!
'****THESE ARE YOUR VARIABLES TO SET
DirectoryRoot = "C:\Scripts" 'PATH OF THE FOLDER YOUR RUNNING THIS
SCRIPT IN
LogsDir = "C:\Logs" 'PATH OF THE FILE YOU WANT TO TRANSFER
FTPFile = "server.log" 'FILE TO FTP
FTPSERVER = "ftp.iris.state.wy.us" 'YOUR FTP SERVER's NAME OR ADDRESS
set objFSO = CreateObject("Scripting.FileSystemObject")
'****CHECK TO SEE IF YOUR TARGET FILE EXISTS
'****IF YES GET INTO THE FTP EXECUTION
'****IF NOT, LOG IT AND END SCRIPT
if objFSO.FileExists(LogsDir & "\" & FTPFile ) then
'***GET A HANDLE ON YOUR TARGET FILE
'***COPY TARGET FILE TO THE DIRECTORYROOT
Set LogFile = objFSO.GetFile(LogsDir & "\" & FTPFile)
LogFile.copy DirectoryRoot & "\" & FTPFile , true
'****NOW CREATE OR RECREATE THE FTPCOMMANDS.TXT FILE
'****THIS FILE DETERMINES HOW FTP WILL EXECUTE
if CheckFTPCommands = TRUE then
DeleteFTPCommands()
CreateFTPCommands()
else
CreateFTPCommands()
end if
'****NOW WRITE THE COMMANDS TO HANDLE FTP
WRITELINE("anonymous") 'LOG IN
WRITELINE("ls") 'RETRIVE DIRECTORY (YOU NEED TOO)
WRITELINE("cd Logs") 'CHANGE TO THE DIRECTORY YOU WANT
'WRITELINE("cd Server1Logs) 'AS MANY TIMES AS YOU NEED
WRITELINE("put " & FTPFile) 'ONCE IN THE RIGHT DIR. PUT YOUR FILE IN
WRITELINE("Quit") 'THEN GET OUT
'****OK, NOW YOU NEED TO EXECUTE THE FTP SHELL COMMAND THAT DOES ALL
THIS
Set WshShell = CreateObject("WScript.Shell")
'****HERE'S THE SYNTAX STRING;
'****THE -s: flag calls our FTPCommands.txt file
'****Which is located at ~ DirectoryRoot & "\FTPCommands.txt
'****AFTER THAT YOU ENTER THE FTP SITE'S NAME OR ADDRESS
FTPString = "FTP -s:" & DirectoryRoot & "\FTPCommands.txt " &
FTPSERVER
'****EXECUTE THE SHELL COMMAND
'****LOG THE OPERATION
'****WAIT 2 SECONDS (you need to) THEN DELETE THE COPY OF THE FILE
YOU PUT IN DIRECTORYROOT
Set oExec = WshShell.Exec(FTPString)
LogStart 4, "The Server Log has finished FTP Transfer " & time()
wscript.sleep 2000
DeleteFTPFile(FTPFILE)
'****YOUR ALL DONE
'****YOU CAN CHANGE THE SCRIPT TO DO ANOTHER FILE,
'****OR EVEN GET FILES AND DO STUFF WITH THEM
else
LogStart 4, "Your target file does not exist." & time()
end if
'****These are the Subroutines
'****LOGSTART MAKES LOGS ENTRIES IN THE WINDOWS EVENT LOG (APPLICATION
under "WHS" - Windows script Host)
Sub LogStart (strEventType, strMessage)
Set objShell = CreateObject("Wscript.Shell")
objShell.LogEvent cint(intEventType), strMessage
Err.Clear
Exit Sub
End sub
Sub CreateFTPCommands()
set objFSO = CreateObject("Scripting.FileSystemObject")
Set FTPCommands = objFSO.CreateTextFile(DirectoryRoot &
"\FTPCommands.txt")
End Sub
Function CheckFTPCommands()
set objFSO = CreateObject("Scripting.FileSystemObject")
CheckFTPCommands = objFSO.FileExists(DirectoryRoot &
"\FTPCommands.txt")
End Function
Sub DeleteFTPCommands()
set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(DirectoryRoot & "\FTPCommands.txt")
End Sub
Sub WRITELINE(strLINE)
set objFSO = CreateObject("Scripting.FileSystemObject")
set FTPCommands = objFSO.OpenTextFile(DirectoryRoot &
"\FTPCommands.txt",8,true)
FTPCommands.writeline strLINE
End Sub
Sub DeleteFTPFile(FILENAME1)
set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(DirectoryRoot & "\" & FILENAME1)
End Sub Tag: How do you add a link to a site that uses a vbs script..... Tag: 164117
ASP Page as a remote function call in JavaScript
Hello,
I've been playing with the idea of just how to use an ASP page to provide a
remote function call. In an ideal world this would be a web service but how
can you do it if restricted to ASP 3.0 ?
Idea 1 was to write an ASP page that accepted arguments using the classic
?X=1&Y=2 type of strings and have the page return an ADO disconnected record
set containing the results of the action. This is call very well, and works,
but you do have to allow the browser to create an ADODB.RecordSet in which
to place the results which goes against some security principles.
Idea 2 was to use an <IFRAME> and replace the src for this frame at run time
with the result from an ASP page, again using the ?X=1&Y=2 type of string to
pass in arguments. The results could then come back as a table and be
accessed via the DOM. The problem with this is that the client needs to wait
for the page to be loaded before it can be sure that the contents of the
table is valid and the browser does not seem to allow waits and does not
like busy waits.
Idea 3 - I'm still looking for this ! Does anyone have any ?
Many thanks
Martin Tag: How do you add a link to a site that uses a vbs script..... Tag: 164111
Is it possible to restart a service so all the dependancies get restarted as
Is it possible to restart a service so all the dependancies get restarted as
well rather than stop and start one. The problem is the Cim agents and
snmp. I can't send a stop and start command via script since cim agents
depend on it.
Jason Tag: How do you add a link to a site that uses a vbs script..... Tag: 164110
Someone know Why WMI actions d'ont work in to a IE form?
Firts sorry for my bad English (I'm Spanish) and sincerly thanks for read
this.
My problem is the next; this vbscript code work fine directly from a .vbs
file in Win2k Sp4 and VBS 5.6:
Dim objWMIService, objProcess, colProcessList, proceso
proceso = "notepad.exe"
Set objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\tsystems1\root\cimv2"
)
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process
Where Name = 'notepad.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
msgbox "Proceso Parado"
But if it is integrated in to a IE form:
<html><head><title>Listando Procesos</title>
<SCRIPT LANGUAGE="VBScript">
Sub x1692
Dim objWMIService, objProcess, colProcessList, proceso
proceso = "notepad.exe"
Set objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\equipo\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process
Where Name = 'notepad.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
msgbox "Proceso Parado"
End Sub
<tr><td width='20%'>notepad.exe</td><td width='10%'>1692</td><td
width='50%'>C:\WINNT\system32\notepad.exe</td>
<td width='20%'><FORM name="frmone"><INPUT TYPE="BUTTON" value="Parar"
NAME="x1692" onclick="x1692"></FORM></td></tr>
</table></body>
</html>
D'ont show errors and no msgs appears and I stay sure that the code is ok.
My questions are;
Have win2k any security patch that make impossible execute
this code in IE form?
Anyone know how will do for execute it whitout this
problem? Tag: How do you add a link to a site that uses a vbs script..... Tag: 164106
Basic script help please
created a script to delete files ie) *.jpg files in folder and log entrys,
but must be missing something as it doesnt log
anything and doesnt delete anything anymore. It had it deleting at one stage,
but must have changed something and not sure what.
Any ideas clever people?
Path1 = "C:\Documents and Settings\REMOTEINSTALL\My Documents\My
Pictures\QuickCam\Album\Motion Images\Security Videos"
Dim objFSO 'File System Object - connection to file system
Dim oFolder 'holds path to image folder
Dim oFile 'variable for each file in folder
Dim logfile 'holds path to the log file
Dim objFile 'used by OpenTextFile command to allow writing to
file
Const ForWriting = 2
Const ForAppending = 8
logfile = "C:\Delete Files Script\log.txt"
Set objFSO = Createobject("Scripting.FileSystemObject")
Set oFolder = objFSO.GetFolder(Path1)
For Each oFile In oFolder.Files
If DateDiff("d", oFile.DateCreated,Now) > 14 Then
oFile.Delete
wscript.Echo "this file was deleted " & oFile.Name
If objFSO.FileExists(logfile) Then
Set objFile = objFSO.OpenTextFile(logfile, ForAppending)
objFile.Write oFile.Name
Else
Set objFile = objFSO.OpenTextFile(logfile, ForWriting)
objFile.Write oFile.Name
objFile.Close
'WScript.Echo "file " & oFile.Name
'objFile.WriteLine oFile.Name & Now 'Now command writes data/time
'objFile.Close
'WScript.Echo "Log file ammended"
End If
End If
Next Tag: How do you add a link to a site that uses a vbs script..... Tag: 164103
Remove proxy addresses from AD
Hi
I am trying to remove some mail aliase from my users account i AD, here are
the script
set oOu = getobject("LDAP://ou=test,ou=people,dc=test,dc=local")
oOu.filter = array("user")
for each oUser in oOu
for each adr in oUser.proxyAddresses
if instr(adr,"test.no") then
oUser.putex 1, proxyAddresses, array(adr)
oUser.setinfo
end if
next
next
msgbox "Finish"
The line oUser.setinfo genrates the error "A constraint violation has
occoured"
Any suggestions ?? Tag: How do you add a link to a site that uses a vbs script..... Tag: 164102
Service Pack version
Can anyone tell me if you can get the SP versions by scripting. I need the SP
versions for office? Tag: How do you add a link to a site that uses a vbs script..... Tag: 164100
How to Block the Inherit permisson on new created folder by script
I have to create a lot of folder by the script.However,I also want to clear the
"Allow inherit permission from parent to propagate to this object" for each
new created folder automatically.Therefore,i would like to know how to do
this in the script.Thanks! Tag: How do you add a link to a site that uses a vbs script..... Tag: 164095
Vbscript for database manipulation
Hi all,
Here is what I am trying to do, hope someone can help me implement
this.
Every hour, I would like a script that does the following (in vbscript
cause that's the only one I am even remotely comfortable with)
1- Extract from a secure database 4 query result tables and copy them
into a new unsecure database
2- Connect to the internet
3- Send the new unsecure database to our servers online
4- Close the internet connection
I think I have figured out how to do step number 3 through an ftp -s:
script and ftp command .txt file.
My problem is really step 1, so far, I have only been able to create a
new blank database, with the structures of the 4 tables receiving the
query results built. I am stuck here, I can't even transfer the query
results to the database, and I haven't even started looking at how to
unsecure the new database, and/or tables.
Does anyone know of any efficient, quick way of doing, the above?
I think I can manage with steps 2 and 4, Step 1 is really my problem
here.
I have so far the following code.
----BEGINNING OF CODE
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
' DECLARE VARIABLES
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
Dim appAccess, appAccess2, filesys, filedelete, db
Dim t1, t2, t3, t4, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12,
f13, f14, i1, i2, i3, i4
Const DB_TEXT = 10
Const DB_LONG = 4
Const DB_DATE = 8
Const DB_DOUBLE = 7
Const AcFormatXLS = "Microsoft Excel (*.xls)"
Const AcOutputTable = 0
Const AcOutputQuery = 1
Const et1 = "FastTrackOperation"
Const OldPath = "D:\Main\Design\FlashTest\Bck-Jun-10-04.mdb"
Const InterPath = "D:\db2.xls"
Const NewPath = "D:\db2.mdb"
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
' DELETE DB2.MDB IF PRESENT
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FileExists(NewPath) Then
Set filedelete = filesys.GetFile(NewPath)
filedelete.Delete
Set filedelete = Nothing
End If
Set filesys = Nothing
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
' CREATE BRAND NEW DATABASE
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
Set appAccess = CreateObject("Access.Application.10")
appAccess.NewCurrentDatabase NewPath
Set db = appAccess.CurrentDb
'**********************************************************************************************
'**********************************************************************************************
' CREATE TABLE 1
'**********************************************************************************************
'**********************************************************************************************
Set t1 = db.CreateTableDef("t1")
Set f1 = t1.CreateField("f1", DB_LONG, 40)
f1.Required = -1
t1.Fields.Append f1
Set f2 = t1.CreateField("f2", DB_LONG, 40)
f2.Required = -1
t1.Fields.Append f2
Set f3 = t1.CreateField("f3", DB_TEXT, 40)
f3.Required = -1
t1.Fields.Append f3
Set f4 = t1.CreateField("f4", DB_TEXT, 40)
f4.Required = -1
t1.Fields.Append f4
Set f5 = t1.CreateField("f5", DB_DATE, 40)
f5.Required = -1
t1.Fields.Append f5
Set f6 = t1.CreateField("f6", DB_TEXT, 40)
f6.Required = -1
t1.Fields.Append f6
Set f7 = t1.CreateField("f7", DB_DATE, 40)
t1.Fields.Append f7
Set f8 = t1.CreateField("f8", DB_TEXT, 40)
t1.Fields.Append f8
Set f9 = t1.CreateField("f9", DB_TEXT, 40)
t1.Fields.Append f9
Set i1 = t1.CreateIndex("i1")
Set f1 = i1.CreateField("f1", DB_LONG, 40)
i1.Fields.Append f1
i1.Primary = -1
i1.Unique = -1
t1.Indexes.Append i1
Set i2 = t1.CreateIndex("i2")
Set f2 = i2.CreateField("f2", DB_LONG, 40)
i2.Fields.Append f2
i2.Primary = 0
i2.Unique = 0
t1.Indexes.Append i2
db.TableDefs.Append t1
'**********************************************************************************************
'**********************************************************************************************
' CREATE TABLE 2
'**********************************************************************************************
'**********************************************************************************************
Set t2 = db.CreateTableDef("t2")
Set f1 = t2.CreateField("f1", DB_LONG, 40)
f1.Required = -1
t2.Fields.Append f1
Set f2 = t2.CreateField("f2", DB_TEXT, 40)
f2.Required = -1
t2.Fields.Append f2
Set f3 = t2.CreateField("f3", DB_LONG, 40)
f3.Required = -1
t2.Fields.Append f3
Set f4 = t2.CreateField("f4", DB_TEXT, 40)
f4.Required = -1
t2.Fields.Append f4
Set f5 = t2.CreateField("f5", DB_TEXT, 40)
t2.Fields.Append f5
Set f6 = t2.CreateField("f6", DB_LONG, 40)
t2.Fields.Append f6
Set f7 = t2.CreateField("f7", DB_LONG, 40)
t2.Fields.Append f7
Set f8 = t2.CreateField("f8", DB_LONG, 40)
f8.Required = -1
t2.Fields.Append f8
Set i1 = t2.CreateIndex("i1")
Set f1 = i1.CreateField("f1", DB_LONG, 40)
i1.Fields.Append f1
i1.Primary = 0
i1.Unique = 0
t2.Indexes.Append i1
Set i2 = t2.CreateIndex("i2")
Set f2 = i2.CreateField("f2", DB_TEXT, 40)
i2.Fields.Append f2
i2.Primary = 0
i2.Unique = 0
t2.Indexes.Append i2
Set i3 = t2.CreateIndex("i3")
Set f8 = i3.CreateField("f8", DB_LONG, 40)
i3.Fields.Append f8
i3.Primary = -1
i3.Unique = -1
t2.Indexes.Append i3
db.TableDefs.Append t2
'**********************************************************************************************
'**********************************************************************************************
' CREATE TABLE 3
'**********************************************************************************************
'**********************************************************************************************
Set t3 = db.CreateTableDef("t3")
Set f1 = t3.CreateField("f1", DB_LONG, 40)
f1.Required = -1
t3.Fields.Append f1
Set f2 = t3.CreateField("f2", DB_DATE, 40)
f2.Required = -1
t3.Fields.Append f2
Set f3 = t3.CreateField("f3", DB_DATE, 40)
f3.Required = -1
t3.Fields.Append f3
Set f4 = t3.CreateField("f4", DB_LONG, 40)
t3.Fields.Append f4
Set f5 = t3.CreateField("f5", DB_TEXT, 40)
f5.Required = -1
t3.Fields.Append f5
Set f6 = t3.CreateField("f6", DB_TEXT, 40)
t3.Fields.Append f6
Set f7 = t3.CreateField("f7", DB_TEXT, 40)
t3.Fields.Append f7
Set i1 = t3.CreateIndex("i1")
Set f1 = i1.CreateField("f1", DB_LONG, 40)
i1.Fields.Append f1
Set f2 = i1.CreateField("f2", DB_DATE, 40)
i1.Fields.Append f2
Set f3 = i1.CreateField("f3", DB_DATE, 40)
i1.Fields.Append f3
i1.Primary = -1
i1.Unique = -1
t3.Indexes.Append i1
Set i2 = t3.CreateIndex("i2")
Set f5 = i2.CreateField("f5", DB_TEXT, 40)
i2.Fields.Append f5
i2.Primary = 0
i2.Unique = 0
t3.Indexes.Append i2
db.TableDefs.Append t3
'**********************************************************************************************
'**********************************************************************************************
' CREATE TABLE 4
'**********************************************************************************************
'**********************************************************************************************
Set t4 = db.CreateTableDef("t4")
Set f1 = t4.CreateField("f1", DB_LONG, 40)
t4.Fields.Append f1
Set f2 = t4.CreateField("f2", DB_TEXT, 40)
t4.Fields.Append f2
Set f3 = t4.CreateField("f3", DB_DATE, 40)
t4.Fields.Append f3
Set f4 = t4.CreateField("f4", DB_DOUBLE, 40)
t4.Fields.Append f4
Set f5 = t4.CreateField("f5", DB_DOUBLE, 40)
t4.Fields.Append f5
Set f6 = t4.CreateField("f6", DB_DOUBLE, 40)
t4.Fields.Append f6
Set f7 = t4.CreateField("f7", DB_DOUBLE, 40)
t4.Fields.Append f7
Set f8 = t4.CreateField("f8", DB_DOUBLE, 40)
t4.Fields.Append f8
Set f9 = t4.CreateField("f9", DB_DOUBLE, 40)
t4.Fields.Append f9
Set f10 = t4.CreateField("f10", DB_LONG, 40)
t4.Fields.Append f10
Set f11 = t4.CreateField("f11", DB_LONG, 40)
t4.Fields.Append f11
Set f12 = t4.CreateField("f12", DB_DOUBLE, 40)
t4.Fields.Append f12
Set f13 = t4.CreateField("f13", DB_DOUBLE, 40)
t4.Fields.Append f13
Set f14 = t4.CreateField("f14", DB_TEXT, 40)
t4.Fields.Append f14
db.TableDefs.Append t4
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
' EXPORT ACCESS QUERIES TO EXCEL
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
Set appAccess = Nothing
Set db = Nothing
Set appAccess2 = CreateObject("Access.Application.10")
appAccess2.OpenCurrentDatabase OldPath
'appAccess2.DoCmd.OutputTo acOutputTable, et1, acFormatXLS, InterPath
'appAccess2.DoCmd.TransferDatabase acExport, "Microsoft Access",
NewPath, AcOutputTable, et1, "[Test1]", False
appAccess2.DoCmd.CopyObject NewPath, , AcTable, et1
'NOTHING SEEMS TO WORK HERE _ GET VARIOUS ERRORS ACCROSS ALL THREE
TECHNIQUES
appAccess2.CloseCurrentDatabase
appAccess2.Quit
Set appAccess2 = Nothing
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
' CLEAR ALL OBJECTS
'**********************************************************************************************
'**********************************************************************************************
'**********************************************************************************************
Set t1 = Nothing
Set t2 = Nothing
Set t3 = Nothing
Set t4 = Nothing
Set f1 = Nothing
Set f2 = Nothing
Set f3 = Nothing
Set f4 = Nothing
Set f5 = Nothing
Set f6 = Nothing
Set f7 = Nothing
Set f8 = Nothing
Set f9 = Nothing
Set f10 = Nothing
Set f11 = Nothing
Set f12 = Nothing
Set f13 = Nothing
Set f14 = Nothing
Set i1 = Nothing
Set i2 = Nothing
Set i3 = Nothing
Set i4 = Nothing
Set appAccess2 = Nothing
Set appAccess = Nothing
Set db = Nothing Tag: How do you add a link to a site that uses a vbs script..... Tag: 164094
DHCPOBJS.DLL
I've been trying to use DHCPOBJS.DLL to populate a DHCP database however it
doesn't seem to have an option to set the value for the Supported Types -
defaults to "Both", i need "DHCP only". Is there any way of setting this
option from within vbscript (Using DHCPOBJS or another API) or do I need to
revert to a command script using Netsh?
Thanks in advance :)
--
Tez Tag: How do you add a link to a site that uses a vbs script..... Tag: 164093
vbs script to create vpc and differencing disks
I have a need to automate the creation of many new Virtual PCs and their
differencing disks.
Ideally I would like the user to select one of 4 parent drives and have all
other vpc properties populated.
OS: Windows XP SP1
Virtual PC 2004
Does anyone have any insight into this dilema? Tag: How do you add a link to a site that uses a vbs script..... Tag: 164090
Laptop Power Configurations
Hi
The power options for laptops in our organization has been set so that
the Advanced option "When I close the lid of my portable computer" is
set to "Hibernate". We need to change this to "Do Nothing". Is it
possible to midify these Power settings programatically using
VBSCripts, WMI or even VB6 ?
Any help is appreciated.
Thanks Tag: How do you add a link to a site that uses a vbs script..... Tag: 164087
Add a local printer
I have a need to check if the local printer HP LaserJet 4 is already
installed on the local machine and quit if it is. If not the printer should
be installed on the local machine. I am fairly new to scripting and got this
example from another posting from Torgeir and have been trying to modify it
to work for me. I seem to be having a syntax issue in the WshShell.run
statement, but I am unsure how to correct the issue.
Set oPrnSet = GetObject( _
"winmgmts:{impersonationLevel=impersonate}!//localhost") _
.ExecQuery("select Name from Win32_Printer")
Set WshShell = WScript.CreateObject ("WScript.Shell")
For Each oPrn in oPrnSet
If Lcase(oPrn.Name) = LCase("HP LaserJet 4") Then
Wscript.Quit
Else
WshShell.run rundll32 printui.dll,PrintUIEntry /q /if /b "HP LaserJet 4" /f
%windir%\inf\ntprint.inf /r "lpt2:" /m "HP LaserJet 4"
End If
Next
If anyone could provide an explanation of what I'm doing wrong it will be
appreciated!!!
Joel Tag: How do you add a link to a site that uses a vbs script..... Tag: 164083
ACCESS and ASP
Working on dynamically deleting a database entry. Below is the code I'm
running into an error with. There is a column in the database by the name of
"email".
Is it possible for the ASP code to define an ACCESS column as a Form?
<%
' Declaring variables
Dim email, con, data_source, sql_delete
email = Request.Form("email")
sql_delete = "delete email from users where email = '" & email & "'"
data_source = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source = " & _
Server.MapPath("mail.mdb")
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_delete
con.Close
Set con = Nothing
Response.Write "Your email address " & email & _
" was successfully deleted from our database."
%> Tag: How do you add a link to a site that uses a vbs script..... Tag: 164081
Adding MIME types via script to IIS
I am trying to update MIME types in an IIS virtual directory via code. It is
not adding any new type to the system. Any ideas? Is there a way to check if
the MIME types exists before attempting to add it?
CALL SetRequiredIISMimeTypes
'============================================
Sub SetRequiredIISMimeTypes
const strMIME_TYPE_EXT_1 = ".abc"
const strMIME_TYPE_DATA_1 = "text/plain"
const strMIME_TYPE_EXT_2= ".efg"
const strMIME_TYPE_DATA_2 = "application/octet-stream"
'Call procedure to set MIME types.
AddTypeToIIS strMIME_TYPE_EXT_1, strMIME_TYPE_DATA_1
AddTypeToIIS strMIME_TYPE_EXT_2, strMIME_TYPE_DATA_2
End Sub
Sub AddTypeToIIS(strExtension, strMimeType)
Dim objMimeMap
Dim objMimeMapList
Dim lngMimeMapListCount
Const ADS_PROPERTY_UPDATE = 2
' Specify the location in the IIS metabase for the 'MimeMap' node.
' Note: 'MimeMapObj' acts a 'container' object for the 'objMimeMapList'
object.
Set objMimeMap = GetObject("IIS://localhost/W3SVC")
' Use GetEx to retrieve an array of 'MimeMap' objects.
objMimeMapList = objMimeMap.GetEx("MimeMap")
' Create a new 'MimeMap' item in the array.
lngMimeMapListCount = UBound(objMimeMapList) + 1
ReDim Preserve objMimeMapList(lngMimeMapListCount)
Set objMimeMapList(lngMimeMapListCount) = CreateObject("MimeMap")
' Create our new 'MimeType'
objMimeMapList(lngMimeMapListCount).Extension = strExtension
objMimeMapList(lngMimeMapListCount).MimeType = strMimeType
' Use PutEx to UPDATE the MimeMap array with our new array.
objMimeMap.PutEx ADS_PROPERTY_UPDATE, "MimeMap", objMimeMapList
objMimeMap.SetInfo
End Sub
Any help would be appreciated!
--
Primetime
{Coding to the break of dawn} Tag: How do you add a link to a site that uses a vbs script..... Tag: 164080
Change rights on C and D drives to read only
Where can I go to look up information on how to change the
rights one user has on his C and D drives. I want to
change the rights to read only so the user can't delete
anything.
I have looked in my VBScript Programmer's Reference,
Microsoft Windows 2000 Scripting Guide, and Microsoft
Windows Scripting Self-Paced Learning Guide.
Thanks,
Jeff Tag: How do you add a link to a site that uses a vbs script..... Tag: 164079
Data field format problem
I am having a strange problem with ASP. Whenever I build an SQL query using a text field with text in it, I get and error "[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.". The underlying table uses a text field, and I have tried cStr thru various methods in the ASP page to no avail. AS long as numbers only are entered, it works. I am comparing data to a session variable. Can anyone help? Here is the initial code for one of the datasets.
Set rsCEMData = Server.CreateObject("ADODB.Recordset")
rsCEMData.ActiveConnection = MM_connApp_STRING
rsCEMData.Source = "SELECT * FROM tblCustResults WHERE fldSampNum = " + Replace(rsCEMData__MMColParam, "''", "''''") + " AND fldCN = " + Replace(rsCEMData__MMColParam2, "''", "''''") + " AND fldSerial = " + Replace (cStr(rsCEMData__MMColParam3), "''", "''''") + ""
rsCEMData.CursorType = 0
rsCEMData.CursorLocation = 2
rsCEMData.LockType = 1
rsCEMData.Open()
Here is how I set the variables:
Dim rsCEMData2__MMColParam3
rsCEMData2__MMColParam3 = "1"
If (Session("VarSerial") <> "") Then
rsCEMData2__MMColParam3 = Cstr(Session("VarSerial"))
Any help is greatly appreciated!!
-----------------------------
This message is posted by http://asp.forumszone.com Tag: How do you add a link to a site that uses a vbs script..... Tag: 164070
Enumerating ALL windows?
I've got Microsoft Outlook, Internet Explorer, Mozilla Firefox, and a
couple of open console windows on my desktop. I run the following
code:
set oShApp = CreateObject("Shell.Application")
wscript.echo "starting..."
for each oWin in oShApp.windows
set oDoc = oWin.document
wscript.echo oDoc.title
next
wscript.echo "done."
It returns only the Internet Explorer window title. How should I
modify it to return the titles of all the windows? Thanks in advance
to all who respond.
Leslie Tag: How do you add a link to a site that uses a vbs script..... Tag: 164069
Getting Text and Value From Option/Select
In VBScript how would someone get the text value from a pulldown
select/option list in HTML?
If you look at the following html, I would like to get the text of
whatever is selected. "One" instead of "1". How would I go about doing
that in VBScript?
<form name="myform">
<select name="selectname">
<option value="1">One</option>
<option value="2">Two</option>
</select>
thanks for any help in advance,
Geoff Tag: How do you add a link to a site that uses a vbs script..... Tag: 164065
script to create account
I have a script that creates a local account on a server
and puts the user in the Users group. I need it to also
check the following boxes: User cannot change password
and Password never expires.
Here is what I have:
'Create gssrdp local user account
strComputer = "MyComputer"
Set colAccounts = GetObject("WinNT://" & strComputer
& ",computer")
Set objUser = colAccounts.Create("user", "gssrdp")
objUser.SetPassword "password"
objUser.SetInfo
'Add gssrdp user to the local Users group
strComputer = "MyComputer"
Set objGroup = GetObject("WinNT://" & strComputer
& "/Users,group")
Set objUser = GetObject("WinNT://" & strComputer
& "/gssrdp,user")
objGroup.Add(objUser.ADsPath)
Any thoughts?
Thanks,
Jeff Tag: How do you add a link to a site that uses a vbs script..... Tag: 164063
Grabbing a certain file from a networked machine
Hi
I have some roving colleagues with laptops who are supposed to be making
backups of certain files (mostly PST) when they check back to the office.
But they don't. Is there any reliable VBS way to grab a file from a laptop
once the machine is hooked back onto the lan ?
All these machine have a certaine name beginning with "PORT"
PORT-HARRY
PORT-JENNY etc
I imagine it would be feasible to have a script that would run - say -every
two hours on a server that would check to see if a "PORT-xxx" machine had
reconnected and then scan its entire C: disk looking for PST files? Then
copy them somewhere safe on the server?
Could anyone please give me some ideas on how to do that ?
TIA
Mosalie Rignon Tag: How do you add a link to a site that uses a vbs script..... Tag: 164062
Print file to windows queue
I'm looking for a way to programmatically (vbscript) to send data to a
windows print queue (no user interface). The request to me was to have a
web form that the user can fill out and then the web application would take
this form data and send it to a print queue.
I've googled several times and couldn't really find anything specific
(probably just wrong keywords).
Any help would be greatly appreciated.
BBB Tag: How do you add a link to a site that uses a vbs script..... Tag: 164061
Install network OR Local printer - script
I learned how to use cnprt2.exe to install a network printer as default
utilising the LOCATION=Suite variable.
How do I take one step further to say if LOCATION is not suite OR if
location=classx then connect to local printer EpsonC84 on LPT1
Server is 2k3 w/s are XP Pro SP2
Thanks Tag: How do you add a link to a site that uses a vbs script..... Tag: 164060
Search Domain
I would like to search a network domain for workstations then check each
work station found for the installation of a particular program and if found
ad a short cut to the all users startup.
Is VBscript (or VB6) a logical way to do this?
Where would I look to for information to start such a script?
Thanks
Martin Tag: How do you add a link to a site that uses a vbs script..... Tag: 164059
Possible to get DFS information through WMI on Windows 2000?
Windows 2003 has the "Win32_DfsNode" class, and a couple of others - is there a way when using a Windows 2000 environment to get information about DFS shares?
In particular, how to determine which physical server is being connected to when a DFS share is in use?
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources... Tag: How do you add a link to a site that uses a vbs script..... Tag: 164057
WMI query to get disk I/O and process creating files
Is there a class in WMI to monitor when disk activity happens and then
what process is creating the I/O to the disk? We have a server that
when a file is created it is causing the drives to spin at full capacity
and we cannot stop it without rebooting. We think we know what it is,
but cannot be sure. So we want to monitor the disk activity and see
what is causing the drives to spin at full capacity.
TIA Tag: How do you add a link to a site that uses a vbs script..... Tag: 164055
Removing Temp Files
I regularly have to remove spyware/adware from different client PCs. Some of
these PCs have multiple users. The first thing I do is boot into safe mode
and remove all temp files, temp internet files, and cookies out of each
users profile and delete the temp files out of the windows\temp folder. I
was looking for a way to automate this process. Disk Cleanup does not remove
all instances of these file. Does anyone know of a script or batch file that
will clear out all file in the directories mentioned above?
I also install 3 programs with regularity; SpyBot, Ad-Aware, and Spyware
Blaster. If I could utilize a script or batch file to install all three at
the same time that would be great. I understand that this may sound lazy.
However, I do this with such regularity, with different clients at different
locations. I am just looking for something to help automate the process.
Thank you all in advance for your advice. I greatly appreciate it!
Michael D. Alligood Tag: How do you add a link to a site that uses a vbs script..... Tag: 164050
How to determine the supported interfaces of an ADSI object
Is there any way (using VBScript) to determine the supported interfaces of a
random ADSI object ?
Best regards
Johnny Nielsen Tag: How do you add a link to a site that uses a vbs script..... Tag: 164049
Question about query sql server database
I have a SQL Server possiblely with a database installed on it. I want to
test if the database is installed and query for a table if it is installed.
How do I do it with VBScript code? Any sample code? Tag: How do you add a link to a site that uses a vbs script..... Tag: 164048
Registry Changes
I have been tasked to write a script to manually update several local
security policy entries in a large list of computers but without the
use of group policy! All reserach I have done indicates the
Administrative Templates section is registry addressable and is easy
enough to script updates to, but not the Security Settings or Windows
Settings sections, as they write to the Registry's protected area in
HKLM\Security. Does anyone have any suggestions? Without calling
secedit and template files, I've found no other alternatives.
Thanks,
Jack Tag: How do you add a link to a site that uses a vbs script..... Tag: 164047
Printer driver unknown error on Script
I have a win2003 server, and a bunch of XP Pro machines logging into it.
I have written a script to map the shared printer durring login, but I get
the following error upon execution:
Script: \\server\netlogon\script.vbs
Line: 3
Char: 1
Error: The printer driver is unknown
Code: 80070705
Source: (null)
The script is written as follows:
Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\server\share"
wshNetwork.AddWindowsPrinterConnection PrinterPath
wshNetwork.SetDefaultPrinter "\\server\share"
It is my understanding that anything after Win 2000 or NT, that the driver
does not need to be pre-loaded on the PC running the script, according to
this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthaddwindowsprinterconnection.asp Tag: How do you add a link to a site that uses a vbs script..... Tag: 164046
OnKeyDown Event - Unicode
Ok, the OnKeyDown event handler allows me to cancel a key down event if the
pressed key is not allowed. I understand that the value in window.event.keyCode
is the Unicode value of the key pressed and not the keyCode of the character?
So...if I want to write client-side (SIMPLE!!) script to not allow specified
values, but allow other values (such as a formatted phone number) and auto-format
the number entered (such as automatically enter the dashes and parens) ... how
would YOU go about doing it? I've done it several times...but right now, I'm
checking just about every value possibly that can be entered....isn't there a
better way? (I have to make sure the user can delete, insert, et cetera...and
paste too...but all data has to be validated and formatted prior to accepting the
keystroke...)
Any help would be appreciated...
thanks
Mythran Tag: How do you add a link to a site that uses a vbs script..... Tag: 164041
Script to populate a profilePath to ALL Users in an OU
i need some advise in modifying the below script-example so that i can use it
to give ALL my users in an OU a profilePath because i don't want to add the
profilePath to each of 800 users manually :-(
The profilePath should be something like \\server\profiles\%USERNAME%
The example creates the profilePath for only one user, but i need to create
them on the fly for all.
Any help is much appreciated !!
regards
Thomas
Set objUser = GetObject _
("LDAP://cn=Myerken,ou=Management,dc=NA,dc=fabrikam,dc=com")
objUser.Put "profilePath", "\\sea-dc-01\Profiles\myerken"
objUser.SetInfo Tag: How do you add a link to a site that uses a vbs script..... Tag: 164035
Prevent Keystrokes
Is the any scripts that could prevent any keystrokes for a period of time?
Thank you in advance. Tag: How do you add a link to a site that uses a vbs script..... Tag: 164029
VBScript to change smtp mail address
Hello,
I need to change the smtp mail address in exchange properties of AD
objectfor lots of distribution groups. Can anyone guide me to a
ADSI/VBSbscript to get to those properties
Thx,
Didier Tag: How do you add a link to a site that uses a vbs script..... Tag: 164026
creating local printer port..
Hello everybody,
Can somebody help me getting a vbscript that creates a "Local Printer Port"
?
So far I could get information only on "TCP/IP printer port" but my
requirement is creating a "Local Printer Port".
Thank you,
Vinod. Tag: How do you add a link to a site that uses a vbs script..... Tag: 164025
CSV Header Row is incomplete
Help! I'm trying to help out another post in this newsgroup.
I don't understand why the following does not display each field in the
header row.
Only "Customer" is displayed along with all of the data columns.
Watch for word-wrap.
<< test.csv >>
Material, Customer, month
10000,19ABC, 122004
<< test.vbs >>
Option Explicit
'*
Const cVBS = "test.vbs"
Const cCSV = "test.csv"
Const cDIR = "C:\Temp\"
Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=?;Extended
Properties=""text;HDR=NO;FMT=Delimited"""
'*
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adCmdText = &H0001
'*
Dim intRST
intRST = 0
Dim strRST
'*
Dim objADO
Set objADO = CreateObject("ADODB.Connection")
objADO.Open Replace(cDSN,"?",cDIR)
Dim objRST
Set objRST = CreateObject("ADODB.Recordset")
objRST.Open "SELECT * FROM " & cCSV, objADO, adOpenStatic,
adLockOptimistic, adCmdText
'*
Do Until objRST.EOF
WScript.Echo "#" & objRST.Fields.Count
For Each strRST in objRST.Fields
WScript.Echo "*" & strRST
Next
objRST.MoveNext
Loop
'*
Set objRST = Nothing
Set objADO = Nothing
However, it will work if I change the CSV to:
<< test.csv >>
0,1,2
10000,19ABC, 122004
The above is based on:
Much ADO About Text Files
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/ht
ml/scripting03092004.asp
Thanks in advance. Tag: How do you add a link to a site that uses a vbs script..... Tag: 164024
How to import a arbitrary CSV file into SQL Server or Oracle from command line
I have a CSV file with the first row in the CSV file to be the column
headers.
The file is as follows:
Material, Customer, month,qty, sales
10000,19ABC, 122004, 90.5, 10000
20000,20ABC, 122004, 80.5, 12000
30000,21ABC, 122004, 70.5, 14000
40000,22ABC, 122004, 60.5, 16000
50000,23ABC, 122004, 50.5, 18000
I want to import this file from DOS command prompt command line into
SQL Server or Oracle table.
I am aware of tools like Bulk Insert in SQL Server or sqlloader in
Oracle
to import these files into the database but I want something simple to
run from a command line given the database, table name, server
name,etc can import this file by a make table into a Oracle or SQL
Server table.
Also, if possible I want to set a command line option to insert into
the target table if existing rather than creating it.
Can somebody please share a ADO VBscript that given the DSN can import
a CSV file with column headers into a SQL or Oracle database.
Thanks
Karen Tag: How do you add a link to a site that uses a vbs script..... Tag: 164021
How can I write some text?
Hi,
Is it possible to write some text at the bottom of what is already on the
page so I can flash a message for example. If I use document.write it wipes
the whole page and starts again at the top.
Dave Tag: How do you add a link to a site that uses a vbs script..... Tag: 164018
add Printer at logon
Hi,
I'm trying to add printer at logon on clients with win98 and win2003 sbs
server. I install on the server, the drivers for win98.
I've found a lot of script but doesn't works well.
Someone could help me?
This is what I have found on the VBS documentation:
AddWindowsPrinterConnection Method
Adds a Windows-based printer connection to your computer system.
Windows NT/2000:
object.AddWindowsPrinterConnection(
strPrinterPath
)
Windows 9x/Me:
object.AddWindowsPrinterConnection(
strPrinterPath,
strDriverName[,strPort]
)
Arguments
object
WshNetwork object.
strPrinterPath
String value indicating the path to the printer connection.
strDriverName
String value indicating the name of the driver (ignored if used on Windows
NT/Windows 2000).
strPort
Optional. String value specifying a printer port for the printer connection
(ignored on Windows NT/Windows 2000).
Remarks
Using this method is similar to using the Printer option on Control Panel to
add a printer connection. Unlike the AddPrinterConnection method, this
method allows you to create a printer connection without directing it to a
specific port, such as LPT1. If the connection fails, an error is thrown. In
Windows 9x/Me, the printer driver must already be installed on the machine
for the AddWindowsPrinterConnection method to work. If the driver is not
installed, Windows returns an error message.
Example 1
The following code uses the AddWindowsPrinterConnection method to connect a
network printer to a Windows NT/2000 computer system.
[VBScript]
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\printserv\DefaultPrinter"
WshNetwork.AddWindowsPrinterConnection PrinterPath
Example 2
The following code uses the AddWindowsPrinterConnection method to connect a
network printer to a Windows 9x/Me computer system.
[VBScript]
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\printserv\DefaultPrinter"
PrinterDriver = "Lexmark Optra S 1650"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
I have tryed this but it doesn't works on my 98 clients.
Help pls.
Thank you Tag: How do you add a link to a site that uses a vbs script..... Tag: 164017
Sending messages with a complex body format
I need to create a message with a quite complex body format (in term of
fonts, pictures, signatures, logos and so on) and sent it using Outlook
Automation.
The samples I found look like the following:
.Body = "This is the body of the message." &vbCrLf & vbCrLf
A possible solution could be creating a message, saving it and then using
Outlook Automation to send a copy just adding the recipient.
Where can I find documentation and/or samples about sending messages with a
complex format?
Regards
Mario Tag: How do you add a link to a site that uses a vbs script..... Tag: 164016
ADSI Scripting Question
A generic ADSI scripting question. How do you retrieve information
about or manipulate an object in Active Directory if you don't want to
specify the LDAP path in the script. For example; take a list of users
in a text file, they could be located in many different OUs and then
move the accounts to a newly created OU.
Thanks in advance for any assistance. Tag: How do you add a link to a site that uses a vbs script..... Tag: 164015
Modifying Local Policy - User Rights Policy with VBScript
Hi there,
I've been searching forever, and can't figure out how to edit a local policy
with VBScript. I dont think using a command line tool is an option, unless
it is included with XP Pro.
Basically, I've created a user, assigned it to a service, but cannot figure
out how to grant the user "Log in as a service" policy membership. I hope
someone can help, I'm losing my mind.
Darren Tag: How do you add a link to a site that uses a vbs script..... Tag: 164014
Need install vbs script
I have not used VB scripting before and hope to get some
help from the experts out there.
We need to create a .vbs file that will accomplish the
following:
1) Get the path to the Windows system directory
(SYSTEMROOT).
2) Call the .NET installutil.exe utility from within the
appropriate folderin SYSTEMROOT to register a service we
wish to install. This is a command line utility. So in our
case, we would need to do something like:
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322
\installutil.exe myprogram.exe"
3) Same as #2 above but for the regasm.exe utility.
Thanks in advance for any assistance you can provide. Tag: How do you add a link to a site that uses a vbs script..... Tag: 164009
How do you add a link to a website that fires off a vbs script on a local
server?
I need it for work and I'm not sure how to accomplish this.
RE: How do you add a link to a site that uses a vbs script..... by thorpe
thorpe
Thu Oct 07 20:15:03 CDT 2004
the easiest way would be to write your script in an .asp file instead of a
.vbs, then just link to the .asp file.
"DigiMajik" wrote:
> How do you add a link to a website that fires off a vbs script on a local
> server?
> I need it for work and I'm not sure how to accomplish this.
>
> Thx