|
|
|
date: 6 Feb 2006 12:48:33 -0800,
group: microsoft.public.windowsnt.registry
back
Re: Access Denied Error
I dont have any webservices on that server. Iam registering the dlls
through a vb script that calls a batch file.
contents of batch file
-------------------------------
regsvr32 First.dll
regsvr32 Second.dll
contents of vbscript
----------------------------
LogMessage "Registering" & SourcePath & strDllName & " in COM+"
ExecuteCommand("register_dll.bat")
LogMessage logs to a text file.
ExecuteCommand executes the given command.
Sub LogMessage(strMsg)
dim fso, ts, strLogMsgOut, i, strScreenMsgOut, pos, logFile
logFile = CCNum & ".log"
pos = instr(1, strMsg, ": ")
if pos > 0 then
strScreenMsgOut = right(strMsg, len(strMsg) - pos - 1)
else
strScreenMsgOut = strMsg
end if
wscript.echo strScreenMsgOut
strLogMsgOut = PadLeft(Month(now), 2, "0") & "/" & PadLeft(day(now),
2, "0") & " " & PadLeft(hour(now), 2, "0") & ":" & PadLeft(minute(now),
2, "0") & ":" & PadLeft(second(now), 2, "0") & "> "
strLogMsgOut = strLogMsgOut & strMsg
set fso = CreateObject("Scripting.FileSystemObject")
set ts = fso.OpenTextFile(logFile, 8, true)
ts.WriteLine (strLogMsgOut)
ts.close
End Sub
-------------------------------------------------------------
Function ExecuteCommand(cmd)
Dim WshShell, oExec
'LogMessage "About to exec: " & cmd
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec(cmd)
dim resultstring
Do While oExec.Status = 0
LogMessage oExec.STDOut.ReadAll
LogMessage oExec.STDErr.ReadAll
WScript.Sleep 100
Loop
'ExecuteCommand = oExec.STDOut.ReadAll
'LogMessage oExec.STDOut.ReadAll
LogMessage oExec.STDErr.ReadAll
WScript.Sleep 250
End Function
---------------------------------------------------------------------------------
Thanks
Raghu
Dave Patrick wrote:
> Probably by stopping your web services.
>
> --
>
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "jakk" wrote:
> <snip>
> | I could see that a process dllhost.exe is using this folder. I tried to
> | kill it but it says Access denied. Please let me know what can be done.
> | Thanks a lot for your help!!
> |
> | Raghu
> |
date: 7 Feb 2006 08:16:17 -0800
author: jakk
Re: Access Denied Error
Use this tool to see what process is using dllhost.exe
http://www.sysinternals.com/Utilities/ProcessExplorer.html
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"jakk"wrote:
|I dont have any webservices on that server. Iam registering the dlls
| through a vb script that calls a batch file.
|
| contents of batch file
| -------------------------------
| regsvr32 First.dll
| regsvr32 Second.dll
|
| contents of vbscript
| ----------------------------
|
| LogMessage "Registering" & SourcePath & strDllName & " in COM+"
| ExecuteCommand("register_dll.bat")
|
| LogMessage logs to a text file.
| ExecuteCommand executes the given command.
|
|
| Sub LogMessage(strMsg)
| dim fso, ts, strLogMsgOut, i, strScreenMsgOut, pos, logFile
|
| logFile = CCNum & ".log"
|
| pos = instr(1, strMsg, ": ")
| if pos > 0 then
| strScreenMsgOut = right(strMsg, len(strMsg) - pos - 1)
| else
| strScreenMsgOut = strMsg
| end if
|
| wscript.echo strScreenMsgOut
|
| strLogMsgOut = PadLeft(Month(now), 2, "0") & "/" & PadLeft(day(now),
| 2, "0") & " " & PadLeft(hour(now), 2, "0") & ":" & PadLeft(minute(now),
| 2, "0") & ":" & PadLeft(second(now), 2, "0") & "> "
| strLogMsgOut = strLogMsgOut & strMsg
|
| set fso = CreateObject("Scripting.FileSystemObject")
| set ts = fso.OpenTextFile(logFile, 8, true)
|
| ts.WriteLine (strLogMsgOut)
| ts.close
| End Sub
|
| -------------------------------------------------------------
|
| Function ExecuteCommand(cmd)
| Dim WshShell, oExec
| 'LogMessage "About to exec: " & cmd
| Set WshShell = CreateObject("WScript.Shell")
|
| Set oExec = WshShell.Exec(cmd)
|
| dim resultstring
| Do While oExec.Status = 0
| LogMessage oExec.STDOut.ReadAll
| LogMessage oExec.STDErr.ReadAll
| WScript.Sleep 100
| Loop
| 'ExecuteCommand = oExec.STDOut.ReadAll
| 'LogMessage oExec.STDOut.ReadAll
| LogMessage oExec.STDErr.ReadAll
| WScript.Sleep 250
| End Function
|
| ---------------------------------------------------------------------------------
|
| Thanks
| Raghu
date: Tue, 7 Feb 2006 20:50:04 -0700
author: Dave Patrick
|
|