Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. stuck in (dll registration in system32 by c#)

stuck in (dll registration in system32 by c#)

Scheduled Pinned Locked Moved C#
helpcsharpworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sneha Bisht
    wrote on last edited by
    #1

    Hi, i m stuck in dll registration using c#. i have to register some dlls in system32. for that first in put all dlls in a seperate folder DLL. then create a batch file who first copy all dll in system32 folder then register a XYZ.dll. all goes well when we run code. M using this line in batch file.**

    copy .\DLL\*.dll %windir%\system32\
    regsvr32 %windir%\system32\XYZ.dll

    **but when we create setup and install project in client system, nothing happens. even i m logged with adminsiatrator if we run exe from client system by runas(my exe) it works. i google it and find a solution ProcessInfo.verb = "runas" but same problem exists, nothing happens. now the main problem is that how it works without administrator.

    A D 2 Replies Last reply
    0
    • S Sneha Bisht

      Hi, i m stuck in dll registration using c#. i have to register some dlls in system32. for that first in put all dlls in a seperate folder DLL. then create a batch file who first copy all dll in system32 folder then register a XYZ.dll. all goes well when we run code. M using this line in batch file.**

      copy .\DLL\*.dll %windir%\system32\
      regsvr32 %windir%\system32\XYZ.dll

      **but when we create setup and install project in client system, nothing happens. even i m logged with adminsiatrator if we run exe from client system by runas(my exe) it works. i google it and find a solution ProcessInfo.verb = "runas" but same problem exists, nothing happens. now the main problem is that how it works without administrator.

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      You need to basically run the exe as an administrator to make sure dlls are registered properly.

      Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial

      1 Reply Last reply
      0
      • S Sneha Bisht

        Hi, i m stuck in dll registration using c#. i have to register some dlls in system32. for that first in put all dlls in a seperate folder DLL. then create a batch file who first copy all dll in system32 folder then register a XYZ.dll. all goes well when we run code. M using this line in batch file.**

        copy .\DLL\*.dll %windir%\system32\
        regsvr32 %windir%\system32\XYZ.dll

        **but when we create setup and install project in client system, nothing happens. even i m logged with adminsiatrator if we run exe from client system by runas(my exe) it works. i google it and find a solution ProcessInfo.verb = "runas" but same problem exists, nothing happens. now the main problem is that how it works without administrator.

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        If you created a Setup (MSI) install for your app, when you add the .DLL's, you should have an option to register them. You don't need the batch file at all. Usually the tool your use to build the setup will detect this and enable registration for you automatically. What are you using to build the setup??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups