Lansweeper logo
Home Download Features Demo Buy now Help Support forum
 
    Most requested support articles:
  Lansweeper troubleshooting guide.
  The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  WMI Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  How to configure the windows firewall using group policies.
  Support:  
 support@lansweeper.com  
Skype: Lansweeper  
  Mo-Fri 9h-17h CET  
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
WMI Error Fixes - Cannot connect to DCOM port 135 & The RPC server is unavailable 0x800706BA
ntoupin
#1 Posted : Wednesday, June 09, 2010 4:11:16 PM
Rank: Freeware user

Groups: Member
Posts: 5
Location: MA, USA
If you are receiving the either of the errors:
Errors found during scanning
Cannot connect to DCOM port 135 : Firewalled?
The RPC server is unavailable 0x800706BA


These actions will help fix them by using some steps from the troubleshooting guide.

Please ensure you follow the steps to creating the files for the action to use.




Step 1:
Go to your server's Actions folder and create a new file (text file works fine (notepad), you are going to change the extension after when saving) and copy and paste the following into the text file and save it as "fw.cmd"
Code:

call netsh firewall set service RemoteAdmin enable
call netsh firewall add portopening protocol=tcp port=135 name=DCOM_TCP135
call netsh firewall add allowedprogram program=%windir%\system32\wbem\unsecapp.exe name=WMI
call netsh firewall add allowedprogram program=%windir%\system32\dllhost.exe name=Dllhost


Step 2:
Create another new file (textfile in notepad) and again copy and paste the following into it, saving this one as "wmifix.cmd"

Code:

@ECHO OFF

NET STOP SharedAccess

NET STOP winmgmt

CD %WINDIR%\System32\Wbem\Repository
DEL /F /Q /S %WINDIR%\System32\Wbem\Repository\*.*
CD %WINDIR%\system32\wbem

REGSVR32 /s %WINDIR%\system32\scecli.dll
REGSVR32 /s %WINDIR%\system32\userenv.dll

MOFCOMP cimwin32.mof
MOFCOMP cimwin32.mfl
MOFCOMP rsop.mof
MOFCOMP rsop.mfl
FOR /f %%s IN ('DIR /b /s *.dll') DO REGSVR32 /s %%s
FOR /f %%s IN ('DIR /b *.mof') DO MOFCOMP %%s
FOR /f %%s IN ('DIR /b *.mfl') DO MOFCOMP %%s
MOFCOMP exwmi.mof
MOFCOMP -n:root\cimv2\applications\exchange wbemcons.mof
MOFCOMP -n:root\cimv2\applications\exchange smtpcons.mof
MOFCOMP exmgmt.mof

rundll32 wbemupgd, UpgradeRepository


NET STOP Cryptsvc
DEL /F /Q /S %WINDIR%\System32\catroot2\*.*
DEL /F /Q C:\WINDOWS\security\logs\*.log
NET START Cryptsvc


msiexec /unregister
msiexec /regserver
REGSVR32 /s msi.dll

NET START winmgmt
NET START SharedAccess



(Both of the .cmd's information can be found from lansweeper's troubleshooting guide http://www.lansweeper.co...ubleshooting-guide.aspx)




Once you have the two .cmd files in your Actions folder the next thing you need is Psexec.exe (this can be found HERE (you only need the psexec.exe from the zip).

Once downloaded and extracted copy the psexec.exe into your Actions folder.

Next you can add the two following custom actions:

Code:

cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}fw.cmd


Code:

cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}wmifix.cmd



faccount
#2 Posted : Thursday, August 05, 2010 6:56:10 PM

Rank: Premium user

Groups: Premium Users, Member
Posts: 5
Location: Los Angeles
Hi,

Thank you for the great post, it works if i run the cmd's from the physical computer by walking over to it but if i try and do it using the lansweeper web console i get one of two error messages: 'The network path was not found' or 'Access denied'.

Please let me know what to do.

Thanks.

ntoupin wrote:
If you are receiving the either of the errors:
Errors found during scanning
Cannot connect to DCOM port 135 : Firewalled?
The RPC server is unavailable 0x800706BA


These actions will help fix them by using some steps from the troubleshooting guide.

Please ensure you follow the steps to creating the files for the action to use.




Step 1:
Go to your server's Actions folder and create a new file (text file works fine (notepad), you are going to change the extension after when saving) and copy and paste the following into the text file and save it as "fw.cmd"
Code:

call netsh firewall set service RemoteAdmin enable
call netsh firewall add portopening protocol=tcp port=135 name=DCOM_TCP135
call netsh firewall add allowedprogram program=%windir%\system32\wbem\unsecapp.exe name=WMI
call netsh firewall add allowedprogram program=%windir%\system32\dllhost.exe name=Dllhost


Step 2:
Create another new file (textfile in notepad) and again copy and paste the following into it, saving this one as "wmifix.cmd"

Code:

@ECHO OFF

NET STOP SharedAccess

NET STOP winmgmt

CD %WINDIR%\System32\Wbem\Repository
DEL /F /Q /S %WINDIR%\System32\Wbem\Repository\*.*
CD %WINDIR%\system32\wbem

REGSVR32 /s %WINDIR%\system32\scecli.dll
REGSVR32 /s %WINDIR%\system32\userenv.dll

MOFCOMP cimwin32.mof
MOFCOMP cimwin32.mfl
MOFCOMP rsop.mof
MOFCOMP rsop.mfl
FOR /f %%s IN ('DIR /b /s *.dll') DO REGSVR32 /s %%s
FOR /f %%s IN ('DIR /b *.mof') DO MOFCOMP %%s
FOR /f %%s IN ('DIR /b *.mfl') DO MOFCOMP %%s
MOFCOMP exwmi.mof
MOFCOMP -n:root\cimv2\applications\exchange wbemcons.mof
MOFCOMP -n:root\cimv2\applications\exchange smtpcons.mof
MOFCOMP exmgmt.mof

rundll32 wbemupgd, UpgradeRepository


NET STOP Cryptsvc
DEL /F /Q /S %WINDIR%\System32\catroot2\*.*
DEL /F /Q C:\WINDOWS\security\logs\*.log
NET START Cryptsvc


msiexec /unregister
msiexec /regserver
REGSVR32 /s msi.dll

NET START winmgmt
NET START SharedAccess



(Both of the .cmd's information can be found from lansweeper's troubleshooting guide http://www.lansweeper.co...ubleshooting-guide.aspx)




Once you have the two .cmd files in your Actions folder the next thing you need is Psexec.exe (this can be found HERE (you only need the psexec.exe from the zip).

Once downloaded and extracted copy the psexec.exe into your Actions folder.

Next you can add the two following custom actions:

Code:

cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}fw.cmd


Code:

cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}wmifix.cmd




Lansweeper
#3 Posted : Thursday, August 05, 2010 7:59:46 PM

Rank: Administration

Groups: Administration, Premium Users
Posts: 10,007
The problem is:

if the computer's firewall is on you won't be able to run these scripts remotely (because of the firewall)
Users browsing this topic
Guest
Tag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Contact: E-mail Lansweeper - Skype : Lansweeper
Copyright 2004 - 2011 © Hemoco bvba