Friday 1 June 2018

Fix different Sydi-Server issues


General post pulling together different issues that I've come across and fixed in Sydi-Server

Cannot find cscript.exe

Got an error “Can’t find script engine “VBScript” for script “”.
This sometimes means that the dll needs to be re-registered.
but it can also be a change made by an AV engine. McAfee and symantec do this a lot

Basically the antivirus software had changed the regkey that should point to the VBScript.dll.  
Fix that bad entry and the scripts all run fine

  1. Logon to the server as an administrator.
  2. Open the registry editor (regedit.exe) and navigate to the following registry key.[HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32]
  3. Check the path of the Default registry key, it will most likely point to the path of your Anti-Virus Product.
  4. Right click on InprocServer32 and select permissions. Give the Administrators group full access.
  5. Modify the Default registry key and change the path to C:\Windows\system32\vbscript.dll
  6. Change the regkey permissions back.


To re-register the vbscript.dll

Click on start button, type cmd. In the search result right-click on cmd and select
Run as Administrator.
Type cd %windir%\system32 and press enter.
Type regsvr32 vbscript.dll in command prompt and press enter.
If the registration was successful, you should now see the following message:
DllRegisterServer in vbscript.dll succeeded.


Cannot run Cscript.exe

Error running the cscript.exe command


Adding info on cscript.exe not running on Server 2012R2/ Server 2016 and Windows 10.
Copy the cscript.exe file from %windir%\syswow64 to to folder that you have Sydi-Server
saved to and run it now. All fixed!

Fix for SydiServe Excel issue on Excel 2013 and higher.

Sydi Server not working with Excel 2013 or Excel 2016
Sydiserver 2.4 released http://networklore.com/sydi/


When using the overview module sydi-overview.vbs I was getting errors;


sydi-overview2-4.vbs(596, 2) Microsoft VBScript runtime error: Subscript out of range
Great error message!


Turns out Excel 2013 opens 1 sheet by default, so you need to add in sheets 2 and 3
by copying in line 598 a few times.


Code lines for original are (590 to 601) objExcel.Cells.Select


objExcel.Cells.EntireColumn.AutoFit objExcel.ActiveWindow.SplitRow = 0.8 objExcel.ActiveWindow.FreezePanes = True
objExcel.Range("A1").Select objExcel.Sheets(1).Name = "Computers" objExcel.Sheets(2).Name = "WMI Programs"
objExcel.Sheets(3).Name = "Registry Programs" objExcel.Sheets.Add ,objExcel.Sheets(3) ' Add a new sheet after the last
one objExcel.Sheets(4).Name = "Processes" objExcel.Sheets.Add ,objExcel.Sheets(4) ' Add a new sheet after the last one
objExcel.Sheets(5).Name = "OS Distribution Data"



New lines need to be as follows (590 to 603) objExcel.Cells.Select
objExcel.Cells.EntireColumn.AutoFit objExcel.ActiveWindow.SplitRow = 0.8 objExcel.ActiveWindow.FreezePanes = True
objExcel.Range("A1").Select objExcel.Sheets(1).Name = "Computers" objExcel.Sheets.Add ,objExcel.Sheets(1) ' Add a new
sheet after the last one objExcel.Sheets(2).Name = "WMI Programs" objExcel.Sheets.Add ,objExcel.Sheets(2) ' Add a new
sheet after the last one objExcel.Sheets(3).Name = "Registry Programs" objExcel.Sheets.Add ,objExcel.Sheets(3) ' Add a
new sheet after the last one objExcel.Sheets(4).Name = "Processes" objExcel.Sheets.Add ,objExcel.Sheets(4) ' Add a new
sheet after the last one objExcel.Sheets(5).Name = "OS Distribution Data"

Thanks to Patrick Ogenstad http://networklore.com/ for the tools


MD5 hash of file
sydi-overview.vbs: 5f1d5ca7da8e83d5487d08e362ce4994
SHA1 hash of file
sydi-overview.vbs: 9b94e94a59d711155ffc4ec49026198a9e95a4e5

Command to check the hash CertUtil -hashfile sydi-overview.vbs MD5 CertUtil -hashfile
sydi-overview.vbs SHA1
File to download
https://raw.githubusercontent.com/wobblewobble/SydiServe_Excel_Fix/master/sydi-overview.vbs

No comments: