abbodi1406's Batch Scripts Repo

Discussion in 'Scripting' started by abbodi1406, May 4, 2017.

  1. shekarsiripalli

    shekarsiripalli MDL Novice

    Aug 21, 2015
    8
    0
    0
    #421 shekarsiripalli, Aug 31, 2018
    Last edited by a moderator: Aug 31, 2018
    @abbodi1406

    Here is the log ....
    Code:
    ==========================================
    Running in Debug Mode...
    The window will be closed when finished
    
    >set KMS_Emulation=1
    
    >set KMS_ActivationInterval=43200
    
    >set KMS_RenewalInterval=43200
    
    >set Windows=Random
    
    >set Office2010=Random
    
    >set Office2013=Random
    
    >set KMS_IP=172.16.0.2
    
    >set KMS_Port=1688
    
    >color 1F
    
    >title KMS_VL_ALL Manual
    
    >setlocal EnableExtensions EnableDelayedExpansion
    
    >cd /d "C:\Users\Shekar\Downloads\KMS_VL_ALL-SppExtComObjPatcher-kms-25\SppExtComObjPatcher-kms2\"
    
    >IF /I "AMD64" EQU "AMD64" (set xOS=x64 )  else (set xOS=Win32 )
    
    >set "IFEO=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options"
    
    >set "OSPP=HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
    
    >set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
    
    >wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%') get Name   2>nul  | findstr /i Windows   1>nul  && (set SppHook=1 )  || (set SppHook=0 )
    
    >wmic path OfficeSoftwareProtectionService get Version    && (set OsppHook=1 )  || (set OsppHook=0 )
    Node - SHEKAR-PC
    
    ERROR:
    
    Description = Access is denied.
    
    
    
    
    >for /F "tokens=6 delims=[]. " %G in ('ver') do set winbuild=%G
    
    >set winbuild=7601
    
    >if 7601 GEQ 9200 (set OSType=Win8 )  else if 7601 GEQ 7600 (set OSType=Win7 )  else (goto :UnsupportedVersion )
    
    >if 7601 GEQ 9600 (reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoGenTicket /t REG_DWORD /d 1 /f  )
    
    >if 7601 LSS 9200 set win7=1
    
    >if 7601 LSS 14393 goto :Main
    
    >call :StopService sppsvc
    
    >sc query sppsvc   | find /i "STOPPED"    || net stop sppsvc /y
    The Software Protection service is stopping.
    The Software Protection service was stopped successfully.
    
    
    >sc query sppsvc   | find /i "STOPPED"    || sc stop sppsvc
            STATE              : 1  STOPPED
    
    >goto :eof
    
    >if 0 NEQ 0 call :StopService osppsvc
    
    >set AclReset=0
    
    >for %A in ("x64\SppExtComObjHook.dll") do set "PatcherPath=%~fA"
    
    >set "PatcherPath=C:\Users\Shekar\Downloads\KMS_VL_ALL-SppExtComObjPatcher-kms-25\SppExtComObjPatcher-kms2\x64\SppExtComObjHook.dll"
    
    >mklink "C:\Windows\system32\SppExtComObjHook.dll" "C:\Users\Shekar\Downloads\KMS_VL_ALL-SppExtComObjPatcher-kms-25\SppExtComObjPatcher-kms2\x64\SppExtComObjHook.dll"
    symbolic link created for C:\Windows\system32\SppExtComObjHook.dll <<===>> C:\Users\Shekar\Downloads\KMS_VL_ALL-SppExtComObjPatcher-kms-25\SppExtComObjPatcher-kms2\x64\SppExtComObjHook.dll
    
    >icacls "C:\Windows\system32\SppExtComObjHook.dll" /findsid *S-1-5-32-545    | find /i "SppExtComObjHook.dll"    || (
    set AclReset=1
     icacls "C:\Windows\system32\SppExtComObjHook.dll" /grant *S-1-5-32-545:RX
    )
    processed file: C:\Windows\system32\SppExtComObjHook.dll
    Successfully processed 1 files; Failed processing 0 files
    
    >if Win7 EQU Win8 call :CreateIFEOEntry SppExtComObj.exe
    
    >if Win7 EQU Win7 if 0 NEQ 0 call :CreateIFEOEntry sppsvc.exe
    
    >if 0 NEQ 0 call :CreateIFEOEntry osppsvc.exe
    
    >for %A in (14 15 16) do call :eek:fficeLoc %A
    
    >call :eek:fficeLoc 14
    
    >set loc_off14=0
    
    >for /F "tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" set loc_off14=1
    ERROR: The system was unable to find the specified registry key or value.
    
    >for /F "tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" set loc_off14=1
    ERROR: The system was unable to find the specified registry key or value.
    
    >if exist "C:\Program Files\Microsoft Office\Office14\OSPP.VBS" set loc_off14=1
    
    >if exist "C:\Program Files (x86)\Microsoft Office\Office14\OSPP.VBS" set loc_off14=1
    
    >exit /b
    
    >call :eek:fficeLoc 15
    
    >set loc_off15=0
    
    >for /F "tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" set loc_off15=1
    ERROR: The system was unable to find the specified registry key or value.
    
    >for /F "tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" set loc_off15=1
    ERROR: The system was unable to find the specified registry key or value.
    
    >if exist "C:\Program Files\Microsoft Office\Office15\OSPP.VBS" set loc_off15=1
    
    >if exist "C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS" set loc_off15=1
    
    >exit /b
    
    >call :eek:fficeLoc 16
    
    >set loc_off16=0
    
    >for /F "tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" set loc_off16=1
    ERROR: The system was unable to find the specified registry key or value.
    
    >for /F "tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" set loc_off16=1
    ERROR: The system was unable to find the specified registry key or value.
    
    >if exist "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" set loc_off16=1
    
    >if exist "C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS" set loc_off16=1
    
    >exit /b
    
    >call :SPP
    
    >reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f" /f
    ERROR: The system was unable to find the specified registry key or value.
    
    >reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f
    ERROR: The system was unable to find the specified registry key or value.
    
    >set spp=SoftwareLicensingProduct
    
    >set sps=SoftwareLicensingService
    
    >if 0 EQU 0 if 0 EQU 0 (set "aword=No Installed" )  else (set "aword=No Supported KMS Client" )
    
    >wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%') get Name    | findstr /i Office    && (set office15=1 )  || (if not defined win7 echo. & echo No Installed Office 2013/2016/2019 Product Detected... )
    No Instance(s) Available.
    
    
    >wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%') get Name    | findstr /i Windows    && (set WinVL=1 )  || (echo. & echo No Supported KMS Client Windows Detected... )
    No Instance(s) Available.
    
    
    No Supported KMS Client Windows Detected...
    
    >if not defined office15 if not defined WinVL exit /b
    
    >call :OSPP
    
    >reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\59a52881-a989-479d-af46-f275c6370663" /f
    ERROR: The system was unable to find the specified registry key or value.
    
    >reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f
    ERROR: The system was unable to find the specified registry key or value.
    
    >set spp=OfficeSoftwareProtectionProduct
    
    >set sps=OfficeSoftwareProtectionService
    
    >if defined win7 (set "aword=2010/2013/2016/2019" )  else (set "aword=2010" )
    
    >wmic path OfficeSoftwareProtectionService get Version    || (echo. & echo No Installed Office 2010/2013/2016/2019 Product Detected...  & exit /b )
    Node - SHEKAR-PC
    
    ERROR:
    
    Description = Access is denied.
    
    
    
    
    No Installed Office 2010/2013/2016/2019 Product Detected...
    
    >del /f /q "x64\sppchk.txt"
    Could Not Find C:\Users\Shekar\Downloads\KMS_VL_ALL-SppExtComObjPatcher-kms-25\SppExtComObjPatcher-kms2\x64\sppchk.txt
    
    >del /f /q "x64\osppchk.txt"
    Could Not Find C:\Users\Shekar\Downloads\KMS_VL_ALL-SppExtComObjPatcher-kms-25\SppExtComObjPatcher-kms2\x64\osppchk.txt
    
    >call :StopService sppsvc
    
    >sc query sppsvc   | find /i "STOPPED"    || net stop sppsvc /y
    The Software Protection service is stopping.
    The Software Protection service was stopped successfully.
    
    
    >sc query sppsvc   | find /i "STOPPED"    || sc stop sppsvc
            STATE              : 1  STOPPED
    
    >goto :eof
    
    >if 0 NEQ 0 call :StopService osppsvc
    
    >if 1 == 1 (icacls "C:\Windows\system32\SppExtComObjHook.dll" /reset  )
    processed file: C:\Windows\system32\SppExtComObjHook.dll
    Successfully processed 1 files; Failed processing 0 files
    
    >if exist "C:\Windows\system32\SppExtComObjHook.dll" del /f /q "C:\Windows\system32\SppExtComObjHook.dll"
    
    >if exist "C:\Windows\system32\SppExtComObjPatcher.dll" del /f /q "C:\Windows\system32\SppExtComObjPatcher.dll"
    
    >if exist "C:\Windows\system32\SppExtComObjPatcher.exe" del /f /q "C:\Windows\system32\SppExtComObjPatcher.exe"
    
    >if Win7 EQU Win8 call :RemoveIFEOEntry SppExtComObj.exe
    
    >if Win7 EQU Win7 if 0 NEQ 0 call :RemoveIFEOEntry sppsvc.exe
    
    >if 0 NEQ 0 call :RemoveIFEOEntry osppsvc.exe
    
    >sc start sppsvc trigger=timer;sessionid=0
    
    SERVICE_NAME: sppsvc
            TYPE               : 10  WIN32_OWN_PROCESS
            STATE              : 2  START_PENDING
                                    (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
            WIN32_EXIT_CODE    : 0  (0x0)
            SERVICE_EXIT_CODE  : 0  (0x0)
            CHECKPOINT         : 0x1
            WAIT_HINT          : 0x4e20
            PID                : 5004
            FLAGS              :
    
    >echo.
    
    
    >echo.
    
    
    >echo Press any key to exit...
    Press any key to exit...
    
    >if 1 EQU 0 pause  1>nul
    
    >exit
    
     
  2. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,447
    1,421
    60
    Your logfile says :
    No Installed Office 2010/2013/2016/2019 Product Detected...
     
  3. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,194
    84,740
    340
    @shekarsiripalli

    there is some error in osppsvc (OfficeSoftwareProtectionService) and it's not working even without SppExtComObjHook.dll
    repair Office installation or remove/reinstall it
     
  4. rayleigh_otter

    rayleigh_otter MDL Expert

    Aug 8, 2018
    1,121
    933
    60
    @abbodi1406 - You have got some telemetry scripts for w7+, can you give me a link please because i cannot find them.
     
  5. rayleigh_otter

    rayleigh_otter MDL Expert

    Aug 8, 2018
    1,121
    933
    60
    W10-Block is missing from post no1, could you add it please. :)
     
  6. Add store to ltsb made by abbodi is also missing from 1st post.
     
  7. rayleigh_otter

    rayleigh_otter MDL Expert

    Aug 8, 2018
    1,121
    933
    60
    He's probably got so much stuff here he cant keep track of it all :D
     
  8. vze2mp9g

    vze2mp9g MDL Addicted

    Oct 13, 2012
    660
    117
    30
    Hello,
    I was using esd-decrypter-wimlib-39 and it came into errors. Now I cannot delete the files. I get the following errors:

    ISO-FOLDER.PNG

    Can anyone tell me how to delete these folders?
    Thank you...
     
  9. rayleigh_otter

    rayleigh_otter MDL Expert

    Aug 8, 2018
    1,121
    933
    60
    Also missing from post no1 is the batch.commands for NSudo
     
  10. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,194
    84,740
    340
    Updated XP dotNetFx AIO
     
  11. eesly

    eesly MDL Novice

    Sep 4, 2016
    18
    9
    0
    Thanks a lot for your great job :worthy:
     
  12. rayleigh_otter

    rayleigh_otter MDL Expert

    Aug 8, 2018
    1,121
    933
    60
    @abbodi1406 Thank you for adding w10-block to post no1. :) I take it blocking telemetry on 8.1 is as easy as w7 then.
     
  13. l33tissw00t

    l33tissw00t MDL Addicted

    Dec 6, 2012
    819
    520
    30
    #436 l33tissw00t, Sep 13, 2018
    Last edited: Sep 13, 2018
    @abbodi1406 , what is the latest clear-kms-cache (standalone) version? i've already came across the need for it a few times, so I wanted to make sure i'm using latest version. (im using this)

    unsure if its related:
    i had a pc with office 2016 proplus installed. i uninstalled via control panel, and ran c2r-officediag_uninstall twice (rebooting multple times). i then installed 2019 via ODT. when i opened word, it opened as 2016 (activated). i then ran kms_vl_all (qewlpal) and it said something about installing keys, had some error, and then got stuck.. exited out. ran the activate_local you provided for online activation, and it succesffully saw and activated office 2019 gvlk (as well as 2016). opened word, got 2019 activated. 2 questions: (1) why was 2016 still around? (2) would clearing kms cache even help?

    Thanks in advance :)

    P.S. Sorry for no logs, it was 2:30 am, and I just wanted to turn it off and go to bed :D
     
  14. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,194
    84,740
    340
    https://forums.mydigitallife.net/posts/1446900/

    KMS cache only affect registered KMS server IP/port
    it doesn't remove uninstalled Office product licenses

    O15CTRRemove.diagcab doesn't contain cleanospp, which remove the licenses
    the older O15CTRRemove.diagcab contain it, i don't why they removed it
    even the old download link point to new one
    http://go.microsoft.com/?linkid=9815935

    i can upload it if you want, but it contain older version of OffScrub vbs scripts

    best solution:
    - get latest OffScrub vbs scripts (right-click and save as)
    https://github.com/OfficeDev/Office...yment/Deploy-OfficeClickToRun/OffScrubc2r.vbs
    https://github.com/OfficeDev/Office...t/Deploy-OfficeClickToRun/OffScrub_O16msi.vbs

    - put the scripts next to Convert-C2R.cmd (from my Office C2R-R2V pack)

    now when you run OffScrub_O16msi.vbs or OffScrubc2r.vbs it should detect and execute cleanospp.exe
     
  15. l33tissw00t

    l33tissw00t MDL Addicted

    Dec 6, 2012
    819
    520
    30
    Thank you for the detailed response! Clear, info-packed, and helpful as usual :)
    Thank you very much! :)
     
  16. 正义羊

    正义羊 MDL Senior Member

    Feb 21, 2016
    255
    147
    10
    When I make these scripts handification version,I know the localization is very important for every user
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. oldee

    oldee MDL Member

    May 27, 2012
    171
    47
    10
    @abbodi1406, You have hyperlink error for 17763 on OP. It shown 10240 x32 x64. Thank you.