Jump to content

Running regsvr32 during unattended install


Recommended Posts

Hi,

I've been searching the forum but not come across a how to for this. I'm wanting to add the regsvr32 command to my install to remove zipflr.dll but I'm not sure where to put it or what the exact syntax should be. I'm currently looking to use the RunOnceEx in my setup and I'm guessing I can put it here. :unsure:

Thanks for any assistance.

Jase

:)

Link to comment
Share on other sites


Thanks for replying, but my question was exactly where would I put that. Would it go into this RunOnceEx command file as is or do I need to use the %system% variables to run it or put it somewhere else?

Cheers

Link to comment
Share on other sites

well, you can put it in RunOnceEx if you want. Operations like this I usually put in a cleanup script and call it through RunOnceEx as the last option, so various files get deleted and additional DLLs get registered.

You could probably also put it in CMDLines.TXT if you wanted.

Link to comment
Share on other sites

Thanks I'll give that a go. I tried using the nLite option but for some reason my install kept blue screening with 7f after it had done its initial file copy. So the gloves are off and its time to use the deploy tools plus some old fashioned know-how :thumbup

Link to comment
Share on other sites

Here's an example using the pertinent portions of an inf file.

[Version]
Signature = $Windows NT$

[DefaultInstall]
AddReg = RunOnEx
Needs = MyProgs

[RunOnEx]
HKLM,"%RunOnceEx%\",Title,0,"Installing Applications"
HKLM,"%RunOnceEx%\",Flags,0x10001,20

[MyProgs]
AddReg = 7Zip

[7Zip]
HKLM,"%RunOnceEx%\install05",,,"7-Zip"
HKLM,"%RunOnceEx%\install05",1,,"%11%\regsvr32.exe /u /s %11%\zipfldr.dll"
HKLM,"%RunOnceEx%\install05",2,,"%11%\REG DELETE HKCR\.zip\CompressedFolder /f"
HKLM,"%RunOnceEx%\install05",3,,"%11%\REG DELETE HKCR\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31} /f"
HKLM,"%RunOnceEx%\install05",4,,"%11%\REG DELETE HKCR\CompressedFolder /f"
HKLM,"%RunOnceEx%\install05",5,,"%24%\install\7-Zip\7z420.exe /S"
HKLM,"%RunOnceEx%\install05",6,,"%11%\%RunAnInf% DefaultInstall 132 %24%\install\7-Zip\7Zip.inf"

[Strings]
RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"
RunAnInf = "rundll32.exe setupapi.dll,InstallHinfSection"

It should give you the general idea.

  • Unregister the dll
    Remove compressed folders registry entries
    Install new compression utility
    Add new compression utility specific stuff

I find keeping it all together helps with my poor memory retention.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...