Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Auto-register .OCX and .DLL libraries/models

This isn't complex by any means, but I had some .ocx models that I needed to register and I didn't want to manually do them through the terminal. So lo and behold...

Note: the UAC invoke is not mine. This script indexes all libraries and models in the current directory was well as the sub-directories too.
Code
@echo off >NUL
REM UAC Elevation script from: shorturl.at/pyV35
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
   echo [REQUESTING ELEVATION]
   goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
   echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
   set params = %*:"=""
   echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
   "%temp%\getadmin.vbs"
   del "%temp%\getadmin.vbs"
   exit /B

:gotAdmin
   pushd "%CD%"
   CD /D "%~dp0"

Set "index=%temp%\lib_list.ini"
dir /b /s *.ocx >"%index%"
dir /b /s *.dll >>"%index%"

Setlocal EnableDelayedExpansion
For /F "delims=" %%A IN (%index%) DO (
set "path=%%A"
regsvr32 "!path!"
)
DEL /F /Q "%index%"

cls
ECHO ALL LIBRARIE(S) / MODEL(S) REGISTERED
Timeout /T 5 >NUL
EXIT
شكرا على المشاركة
Thank you for sharing ✌👍
(Apr 13, 2020 12:27 AM)Hackoo Wrote:  شكرا على المشاركة
Thank you for sharing ✌👍

Anytime 😁 سررت بالمساعدة


Possibly Related Threads...
Thread / Author Replies Views Last Post
[The Brotherhood] by HackersMar 16, 2026 08:20 AM 18 693 Mar 16, 2026 08:20 AM
Last Post: Stanley
by user344335Apr 10, 2023 11:11 AM 0 146 Apr 10, 2023 11:11 AM
Last Post: user344335
[C] by jBarrelNov 15, 2022 02:52 PM 8 325 Nov 15, 2022 02:52 PM
Last Post: HFDone