Thank you
That fixed that line.. Now to another line. As I
mentioned before this script works fine outside of GPO.
Do you see anything wrong with ComputerName =
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Darren Mar-Elia
Sent: Tuesday, March 28, 2006 12:16 PM
To: [email protected]
Subject: RE: [ActiveDir] Script not working thru GPO
Good catch Kamlesh. Jeff, check out:
for an example of this.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kamlesh Parmar
Sent: Tuesday, March 28, 2006 8:59 AM
To: [email protected]
Subject: Re: [ActiveDir] Script not working thru GPO
If this is the exact script then
Where have you defined value of "ForAppending" ??
As error message contains "invalid argument"
--
Kamlesh
On 3/28/06, Cothern,
Jeffrey D Mr CTR USSOCOM HQ <[EMAIL PROTECTED]> wrote:
I have a script i created in vbs. This script works when run on the machines locally but when i set it up as a machine startup script it gets this errorscript:path and name of scriptLine:13Char: 1Error: Invalid Procedure call or argumentCode: 800A0005Source: Microsoft _vbscript_ runtime errorAs I said this runs correctly when run on the machine localy but not thru GPO. I am assuming that I cannot do a objFSO.OpenTestFile thru the GPO. Is there some other way I can accomplish the write to the test file?JeffHere is the Script Code:Dim WshShell, bKey
Dim regComputerName
Dim ComputerName
Dim Serverlist
Dim objServerlist
DIM objFSO
DIM strCurrenLine
DIM intIsCommentServerlist = "\\fileserver\serverlist.txt"
regComputerName = "HKLM\SYSTEM\CurrentControlSet\Control" & "ComputerName\ComputerName\ComputerName"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objServerlist = objFSO.OpenTextFile(serverlist, ForAppending)
Set WshShell = WScript.CreateObject("WScript.Shell")
ComputerName = objShell.RegRead(regComputerName)
objfile.Write "ComputerName"WshShell. RegWrite"HKLM\System\CurrentControlSet\Services\Eventlog\Application\AutoBackupLogFiles", 1, "REG_DWORD"
WshShell. RegWrite"HKLM\System\CurrentControlSet\Services\Eventlog\Security\AutoBackupLogFiles", 1, "REG_DWORD"
WshShell. RegWrite"HKLM\System\CurrentControlSet\Services\Eventlog\System\AutoBackupLogFiles", 1, "REG_DWORD"
bKey = WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Application\AutoBackupLogFiles")
bKey = WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Security\AutoBackupLogFiles")
bKey = WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\System\AutoBackupLogFiles")WScript.Echo WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Application\AutoBackupLogFiles")
WScript.Echo WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Security\AutoBackupLogFiles")
WScript.Echo WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\System\AutoBackupLogFiles")
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Be the change you want to see in the World"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
