Registrare DLL con il mouse

beccoblu, 07 October 2008,
Categories: Sviluppo, Tips, Windows

dll_icon

Tutti gli sviluppatori Windows si scontrano prima o poi con la registrazione manuale di qualche DLL. Si tratta di un’operazione da poco, ma che richiede quella manciata di secondi: apri la finestra di comando, controlla il Path preciso della dll, scrivi il comandino REGSVR32 (e occhio a non sbagliare: io una volta su tre scrivo REGSRV32) etc. etc.

In realtà basta un micro-tweak sul registry. Basta crearsi un file .reg e copincollare al suo interno queste righe…

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\dllfile\shell]

[HKEY_CLASSES_ROOT\dllfile\shell\register]
@="&Registra"

[HKEY_CLASSES_ROOT\dllfile\shell\register\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\dllfile\shell\unregister]
@="&Annulla Registrazione"

[HKEY_CLASSES_ROOT\dllfile\shell\unregister\command]
@="regsvr32.exe -u \"%1\""

[HKEY_CLASSES_ROOT\ocxfile\shell]

[HKEY_CLASSES_ROOT\ocxfile\shell\register]
@="&Registra"

[HKEY_CLASSES_ROOT\ocxfile\shell\register\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\ocxfile\shell\unregister]
@="&Annulla Registrazione"

[HKEY_CLASSES_ROOT\ocxfile\shell\unregister\command]
@="regsvr32.exe -u \"%1\""

A questo punto salvate il file, importatelo nel registry (basta un doppio clic) e da questo momento, facendo clic con il tasto destro del mouse su una DLL (o su un OCX, altro "pane" di molti sviluppatori) vi verrà chiesto se volete registrare o deregistrare il controllo. Il tutto con ben due clic del mouse. Voilà.

Comments

Leave a Reply:

Name *

Mail (hidden) *

Website