How can I regsvr32 my controls at a user (HKEY_CURRENT_USER) level?

6

1

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.

Siddiqui

Posted 2012-03-14T09:48:38.703

Reputation: 301

regsvr32 does not control the registration process. It only calls DllRegisterServer of the given library, and the library itself performs registration. – user1686 – 2012-03-14T12:13:16.620

@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 – 2012-03-14T12:29:29.987

Answers

7

Like this:

regsvr32 /n /i:user name.dll

sune

Posted 2012-03-14T09:48:38.703

Reputation: 71

4Care to explain what this does or how it works @Sune? – Ivo Flipse – 2012-03-27T13:11:46.530

it registers the dll for the current user?! – sune – 2012-04-02T13:33:38.173

3I 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 – 2012-04-02T14:01:05.147

4That 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 – 2012-09-19T14:34:14.323

3

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

Posted 2012-03-14T09:48:38.703

Reputation: 1 747