How to register DLL files before the first login in Windows 7

Discussion in 'Windows 7' started by Asim Omer, Oct 22, 2011.

  1. Asim Omer

    Asim Omer MDL Member

    Jan 28, 2011
    104
    6
    10
    Hello everyone,

    I want to know how to register some dll files (CmdPromptHere_3.0.dll FileExtToggle_3.0.dll HiddenFilesToggle_3.0.dll). Is putting them in System32 folder in the mounted folder will register them automatically or do I need some code in SETUPCOMPLETE.cmd and if I need a code can you please give me it.
    Note: I want these files to be in System32 folder.

    Thanks in advance.
     
  2. chianf092

    chianf092 MDL Senior Member

    Aug 29, 2008
    279
    21
    10
    Create a Setupcomplete.cmd and add this line

    regsvr32 /s %systemroot%\system32\CmdPromptHere_3.0.dll
    regsvr32 /s %systemroot%\system32\FileExtToggle_3.0.dll
    regsvr32 /s %systemroot%\system32\HiddenFilesToggle_3.0.dll

    EXIT

    That should do it for you. I made a .txt file for you, just change it from .txt to .cmd and add that to your setup If you are using x64 then you need to incorporate the syswow64 folder as well.

    Hope this helps, and good luck
     

    Attached Files:

  3. Asim Omer

    Asim Omer MDL Member

    Jan 28, 2011
    104
    6
    10
    #3 Asim Omer, Oct 22, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Thank you for the reply.

    1-Should I put these DLL files in System32 folder or in "sources\$OEM$\$$\Setup\Scripts\"?
    2-I put the code in for loop. Is it correct? :
    Code:
    for %%i in (CmdPromptHere_3.0 FileExtToggle_3.0 HiddenFilesToggle_3.0) do regsvr32 %systemroot%\system32\%%i.dll /s
    
    EXIT
    
    3-I want to add a registry key of KB890830. Is the version or the GUID responsible for its detection by Windows Update? :
    regtweaks.reg
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RemovalTools\MRT]
    "Version"="C0177BCC-8925-431B-AC98-9AC87B8E9699"
    "GUID"="BC143E22-6D00-41E5-B969-C00563C805E9"
    
    Setupcomplete.cmd:
    Code:
    regedit /s %systemroot%\Setup\Scripts\regtweaks.reg
    
    4-I want to install silverlight before user login can you or any body give me the code to do this?
     
  4. chianf092

    chianf092 MDL Senior Member

    Aug 29, 2008
    279
    21
    10
    #4 chianf092, Oct 22, 2011
    Last edited by a moderator: Apr 20, 2017
    In the OEM folder in the DVD make a system32 folder "sources\$OEM$\$$\system32" and drop the files there, Windows will copy them over for you. Then the Setupcomplete.cmd will find them perfectly. That code will require testing for your setupcomplete, I tend to not try to combine the .dll into one since there is always a risk of errors, or Windows ignoring the file altogether. Your tweaks setup is correct, that will ensure it goes to the machine, if you add any tweaks that are User tweaks you will have to apply them after user setup.
     
  5. Asim Omer

    Asim Omer MDL Member

    Jan 28, 2011
    104
    6
    10
    How can I do this?
     
  6. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,515
    7,171
    120
    Making an script to auto-run after setup, an APP to insert registry tweaks, and auto-exclude the auto-run ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Asim Omer

    Asim Omer MDL Member

    Jan 28, 2011
    104
    6
    10
    Can you make a one for me?
     
  8. Asim Omer

    Asim Omer MDL Member

    Jan 28, 2011
    104
    6
    10
    #9 Asim Omer, Oct 24, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
  9. chianf092

    chianf092 MDL Senior Member

    Aug 29, 2008
    279
    21
    10
    I see no reason, why Windows 7 would not apply those tweaks when you first login.
     
  10. chianf092

    chianf092 MDL Senior Member

    Aug 29, 2008
    279
    21
    10
    Without going into the other post, unless you want to attempt to edit the main registry with WAIK, the Setupcomplete.cmd is the easiest method. or you can Sysprep a system and capture the WIM file from that. The WIM capture will require a lot more work, so it just depends what you are looking to accomplish and how much work do you want to put into it.

    Hope this helps
     
  11. Asim Omer

    Asim Omer MDL Member

    Jan 28, 2011
    104
    6
    10
    I want this registry integration to be just like rt7lite.
     
  12. chianf092

    chianf092 MDL Senior Member

    Aug 29, 2008
    279
    21
    10
    That uses Setupcomplete.cmd in RT7lite. RT7lite takes your custom registry file, and adds it to the System32 folder in the WIM as Custom_reg.reg and it adds entries to the setupcomplete.cmd for you. It does nothing for after the user is created unfortunately, those you have to use firstlogin.cmd.