stuck in (dll registration in system32 by c#)
-
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.
-
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.
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
-
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.
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