Try accessing \\fileserver\serverlist.txt from the problem machine and see
what you get.
Sincerely,
_____
(, / | /) /) /)
/---| (/_ ______ ___// _ // _
) / |_/(__(_) // (_(_)(/_(_(_/(__(/_
(_/ /)
(/
Microsoft MVP - Directory Services
www.readymaids.com <http://www.readymaids.com> - we know IT
www.akomolafe.com <http://www.akomolafe.com>
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: [EMAIL PROTECTED] on behalf of Cothern, Jeffrey D Mr
CTR USSOCOM HQ
Sent: Mon 3/27/2006 11:22 AM
To: [email protected]
Subject: [ActiveDir] Script not working thru GPO
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 error
script:
path and name of script
Line:13
Char: 1
Error: Invalid Procedure call or argument
Code: 800A0005
Source: Microsoft VBScript runtime error
As 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?
Jeff
Here is the Script Code:
Dim WshShell, bKey
Dim regComputerName
Dim ComputerName
Dim Serverlist
Dim objServerlist
DIM objFSO
DIM strCurrenLine
DIM intIsComment
Serverlist = "\\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\AutoBack
upLogFiles", 1, "REG_DWORD"
WshShell.
RegWrite"HKLM\System\CurrentControlSet\Services\Eventlog\Security\AutoBackupL
ogFiles", 1, "REG_DWORD"
WshShell.
RegWrite"HKLM\System\CurrentControlSet\Services\Eventlog\System\AutoBackupLog
Files", 1, "REG_DWORD"
bKey =
WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Application
\AutoBackupLogFiles")
bKey =
WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Security\Au
toBackupLogFiles")
bKey =
WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\System\Auto
BackupLogFiles")
WScript.Echo
WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Application
\AutoBackupLogFiles")
WScript.Echo
WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\Security\Au
toBackupLogFiles")
WScript.Echo
WshShell.RegRead("HKLM\System\CurrentControlSet\Services\Eventlog\System\Auto
BackupLogFiles")
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/