Jump to content

Recommended Posts

Posted

IdentityReference refer = new NTAccount(Environment.UserDomainName,

*** Environment.UserName);

RegistryAccessRule full = new RegistryAccessRule(refer,

* * RegistryRights.FullControl, AccessControlType.Allow);

RegistrySecurity sec = new RegistrySecurity();

sec.AddAccessRule(full);

 

RegistryKey key = Registry.LocalMachine.OpenSubKey(

*** @"SOFTWARE\Microsoft\VSTAHostConfig");

key = key.CreateSubKey("TestApp",

*** RegistryKeyPermissionCheck.ReadWriteSubTree, sec);

// Validate args first.

key.SetValue("AppName", args[0],

*** RegistryValueKind.String);

key.SetValue("ProjectTemplateLocations", args[1],

*** RegistryValueKind.String);

// done!

 

the above code should add the keys necessary to register a VSTA application to prepare it to create project templates.* problem is, .NET is telling me it can't change the registry.

Are my security checks incorrect?* i'm on a corporate network, but i'm local admin on all machines in my domain, including of course my own.

 

any help?

 

 

More...

 

View All Our Microsft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...