8

I want to register my controls at user level, kindly guide me how can I achive this with regsvr32.

If its not possible with regsvr32 please tell any alternative way to achive this.

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
Siddiqui
  • 321
  • 3
  • 6
  • 14
  • `regsvr32` does not control the registration process. It [only calls `DllRegisterServer`](http://blogs.msdn.com/b/oldnewthing/archive/2011/11/10/10235540.aspx) of the given library, and the library itself performs registration. – u1686_grawity Mar 14 '12 at 12:13
  • 1
    @grawity, thanks for your reply, but how can I register my dll only for current user so that other user can't use this. – Siddiqui Mar 14 '12 at 12:29

2 Answers2

6

Like this:

regsvr32 /n /i:user name.dll
Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
sune
  • 69
  • 1
  • 5
    Care to explain what this does or how it works @Sune? – Ivo Flipse Mar 27 '12 at 13:11
  • it registers the dll for the current user?! – sune Apr 02 '12 at 13:33
  • 3
    I meant it rather that it would be helpful if you explained the syntax, what each part means, so others will know which options they might need – Ivo Flipse Apr 02 '12 at 14:01
  • 5
    That only works if the specified DLL happens to take an argument (specifically named `user`). It is not a universal solution (especially since few DLLs take arguments to `DllInstall` at all, let alone that one). It might work for the OP, but it depends on their DLL, and even then, it may require a different argument. – Synetech Sep 19 '12 at 14:34
4

There is a tool named RegSvrEx out on Code Project which seems to allow you just what you want.

The syntax is:

RegSvrEx [/u] [/c] servername

With

/u - Unregister server
/c - Register or unregister (if /u is also specified) only for the current user
servername - Full path of the server .exe or .dll

See the comments on the article's page on how to change the code for using with Windows Vista and above.

Uwe Keim
  • 2,062
  • 8
  • 31
  • 52