[ 09. July 2001]
- Nasinec
Registrßcie komponentov v ASP
Neviem, ako vy, ale ja som si zvykol pri pφsanφ ASP aplikaciφ na Microsoftacku stavbu aplikßcie 3-Tier (trojradovß) a vÜetky funkcie vkladßm do komponenty. Je to jednoduchÜie pri opravovanφ ch²b a nikto mi nevidi do k≤du. Len₧e to mi prinieslo mno₧stvo stresu pri ladenφ, preto₧e pri zmene k≤du v komponente je potrebnΘ ju odregistrova¥ a zaregistrova¥.
V₧dy som pφsal do command promtu regsrv32.dll namiesto regsvr32.dll (pripadß mi to logickejÜie), dlho mi trvalo k²m som napisal path ku komponente - jednoducho: strata Φasu. Ak mßte podobnΘ problΘmy, vytvorte si tento maly RegSvr32.inf s·bor (na konci Φlßnku) a dvakrßt na≥ho kliknite. Odteraz staΦφ ukßza¥ na DLL, OCX, EXE alebo AX s·bor pravou myÜou a vybra¥ bu∩ Register alebo Unregister a je to.
Druh² problΘm pri aplikßcii s komponentami je, ₧e IIS dlho "dr₧φ" komponentu a nie je mo₧nΘ ju bez reÜtartovania IIS servisu alebo celΘho poΦφtaΦa (aj to som robieval pri mojich zaΦiatkoch, LOL) uvo╛ni¥ a prepisa¥. AvÜak staΦφ si vytvori¥ mal² .bat s·bor a do≥ho napφsa¥ jedin² prφkaz: iisreset - tento reÜtartuje IIS service a uvo╛nφ komponentu a potom ju m⌠₧ete prepφsa¥ novou verziou. Prφkaz sa dß napφsa¥ aj do command promtu alebo spusti¥ pomocou Start/Run/iisreset. Nezabudnite predt²m komponentu odregistrova¥ a po reÜtartovanφ IIS spa¥ zaregistrova¥.
Skopφruj tento text do notepadu a pomenuj s·bor RegSvr32.inf - dvakrßt klikni na s·bor.
; RegSvr32 Shell Extension
; Allow you to register DLL, OCX, EXE and AX with a right click !
; Win 9x, NT4 & 2k
; Release 1.1
;
[Version]
signature="$chicago$"
[DefaultInstall]
CopyFiles=Files.inf
AddReg=Reg.Add,Reg.Uninstall
[DefaultInstall.ntx86]
CopyFiles=Files.inf
AddReg=Reg.Add,Reg.Uninstall.NT
[DefaultUninstall]
DelFiles=Files.inf
DelReg=Reg.Add,Reg.Uninstall,Reg.Uninstall.NT,Reg.Remove,
[SourceDisksNames]
1="%01%",,1
[Reg.Uninstall]
HKLM,%UnInstallPath%,DisplayName,,%UninstallDispName%
HKLM,%UnInstallPath%,UninstallString,,"%10%
undll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%%InfFile%"
[Reg.Uninstall.NT]
HKLM,%UnInstallPath%,DisplayName,,%UninstallDispName%
HKLM,%UnInstallPath%,UninstallString,,"%11%
undll32.exe setupapi,InstallHinfSection DefaultUninstall 132 %17%%InfFile%"
[Reg.Add]
HKCR,.ocxshellGejRegOCX,,,Register
HKCR,.ocxshellGejRegOCXcommand,,,"regsvr32 %1"
HKCR,.ocxshellGejUnRegOCX,,,UnRegister
HKCR,.ocxshellGejUnRegOCXcommand,,,"regsvr32 /u %1"
HKCR,.axshellGejRegAX,,,"Register Filter"
HKCR,.axshellGejRegAXcommand,,,"regsvr32 %1"
HKCR,.axshellGejUnRegAX,,,"UnRegister Filter"
HKCR,.axshellGejUnRegAXcommand,,,"regsvr32 /u %1"
HKCR,dllfileshellGejRegDLL,,,Register
HKCR,dllfileshellGejRegDLLcommand,,,"regsvr32 %1"
HKCR,dllfileshellGejUnRegDLL,,,UnRegister
HKCR,dllfileshellGejUnRegDLLcommand,,,"regsvr32 /u %1"
HKCR,exefileshellGejRegEXE,,,"Register Server"
HKCR,exefileshellGejRegEXEcommand,,,"%1 /regserver"
HKCR,exefileshellGejUnRegEXE,,,"UnRegister Server"
HKCR,exefileshellGejUnRegEXEcommand,,,"%1 /unregserver"
[Reg.Remove]
HKCR,.ocxshellGejRegOCX
HKCR,.ocxshellGejRegOCXcommand
HKCR,.ocxshellGejUnRegOCX
HKCR,.ocxshellGejUnRegOCXcommand
HKCR,.axshellGejRegAX
HKCR,.axshellGejRegAXcommand
HKCR,.axshellGejUnRegAX
HKCR,.axshellGejUnRegAXcommand
HKCR,dllfileshellGejRegDLL
HKCR,dllfileshellGejRegDLLcommand
HKCR,dllfileshellGejUnRegDLL
HKCR,dllfileshellGejUnRegDLLcommand
HKCR,exefileshellGejRegEXE
HKCR,exefileshellGejRegEXEcommand
HKCR,exefileshellGejUnRegEXE
HKCR,exefileshellGejUnRegEXEcommand
[Strings]
InfFile="RegSvr32.inf"
SetupRegPath="SoftwareMicrosoftWindowsCurrentVersionSetup"
UninstallDispName="Gej's RegSvr32 Shell Extension"
UnInstallPath="SoftwareMicrosoftWindowsCurrentVersionUninstallGejRegSvr32ShellEXtension"
[DestinationDirs]
Files.Inf=17
[Files.Inf]
Regsvr32.inf
|
|
|