RegistryKey: Access denied under Vista


Author
Message
Ralph Rutschmann
Ralph Rutschmann
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 69, Visits: 1.3K
Hi Trent,

I have got the same problem again as mentioned here: http://forum.strataframe.net/Topic18446-21-1.aspx but now with the Database Deployment Toolkit. The Registry-Key is the same: HKEY_LOCAL_MACHINE\Software\MicroFour\...

This Time an a different Machine with also a new and clean install of Vista Ultimate. I'm logged on as admin. No other programs as Vista Ultimate standard programs, VS 2008 SP1, and SQL Management Studio. And StrataFrame, of course. Wink

At the other thread (see above) you wrote: "This is actually an environment issue as this does actually work on Vista Ultimate..."

Unfortunately I must say, maybe it is an environment issue, but this does actually not working for me on Vista Ultimate.

It is my second install of Vista Ultimate on two different machines. Both seems to have the same problem. I can't believe that it is an environment issue, because it happened within a few days and on both machine at the first try from the beginning on. And both was my first install of Vista...

For me it looks like a generally Vista problem, because of two clean installs from scratch with no changes to the environment after install. Why is the key "HKEY_LOCAL_MACHINE\Software\MicroFour\..." read only? Is it a problem of "HKEY_LOCAL_MACHINE\Software\..." generally?

This thing is very annoying, because the DDT is not closing, I have to shoot them up any time thru the Task-Manager.

Any hint highly appreciated.

TIA, Ralph

Attachments
DDT - RegistryKey access denied.jpg (287 views, 161.00 KB)
Ralph Rutschmann
Ralph Rutschmann
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 69, Visits: 1.3K
Hi, it's me again...

the same problem is with the Message Localization Editor too. I think it will happen with all StrataFrame-Tools which try to access the "HKEY_LOCAL_MACHINE\Software\MicroFour\..." registry key.

Sorry for any inconvenience,

Ralph

Juan Carlos Pazos
Juan Carlos Pazos
StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)
Group: Forum Members
Posts: 144, Visits: 227
Hi



This is a Windows Vista issue related to the security features of the OS. Is not a SF problem.



The easiest way is run the Database Deployment Toolkit, the Role Based Security Editor as Administrator in Vista. These apps, creates and saves some values in the Registry, areas that Windows Vista don't let to write.



Another related problem is if you run VS2005 or 2008 in normal mode, and the enter to the Bussines Object Mapper, you will have some problems. Again run VS as administrator and all works.



Usually I run VS as administrator and lunch from there the Localization app. and the Security editor, doing this I don't see any problems.



According to the document "Windows Vista Application Development Requirements for User Account Control Compatibility" there is something called called "Registry Virtualization", but this must be enabled in the application code.



I aattach the MS document regarding the Vista UAC Requirments for Developers. I think that can be usefull if we use registry entries for our applications, in the document says that registry virtualization could not be present in future Windows versions, these can be a problem for us as developers in future.



Regards

Smile Everything is possible, just keep trying...
Attachments
WindowsVistaUACDevReqs.doc (1.5K views, 703.00 KB)
Ralph Rutschmann
Ralph Rutschmann
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 69, Visits: 1.3K
Hello Juan

many thanks for your help, but I'm in fear, it is not as helpful as i wish it would be.

Please emphasize at my words above, first phrase:

I'm logged on as admin.

This is a Windows Vista issue related to the security features of the OS. Is not a SF problem.

I don't think so. StrataFrame should run on Vista as well as on XP. XP is outdated sooner or later...

The easiest way is run the Database Deployment Toolkit, the Role Based Security Editor as Administrator in Vista.

Sorry, I've got these problems while I'm logged on as admin.

These apps, creates and saves some values in the Registry, areas that Windows Vista don't let to write.

So I think, StrataFrame should use other, not restricted access keys of the registry.

Again run VS as administrator and all works.

Sorry, not for me. At least not on a new and clean install.

Usually I run VS as administrator and lunch from there the Localization app. and the Security editor, doing this I don't see any problems.

This kind of problem seems not to occur to everyone. I'm glad it works for you! Smile

I attach the MS document regarding the Vista UAC Requirements for Developers.

It is not opening on my machine because of many pictures, which "can not be converted"?

Beside that, I think Trent should read it, because it's his code not always and anywhere running on Vista. The more people will use StrataFrame on Vista, the more complains he will get. So I think it's up to him do do something, or even not...

For the code of the users of StrataFrame, he was offering an solution: http://forum.strataframe.net/Topic18446-21-1.aspx

However, we have added the ability to get around this error by forcing the registry to save over on the CURRENT_USER instead of the LOCAL_MACHINE.  Just set this:
MicroFour.StrataFrame.Security.SecurityBasics.ForceCurrentUserOnRegistrySettings = True
A good place to set this would be in the AppMain.vb or program.cs file in either the InitApplication or SetDataSources methods.

I can't see why this would not work for the framework itself? A property we can tweak in case of problems, or let the framework generally use a "CURRENT_USER"-key which is not read only?

Thank you very much again, Juan! Smile

Best regards,

Ralph

Juan Carlos Pazos
Juan Carlos Pazos
StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)
Group: Forum Members
Posts: 144, Visits: 227
Ralph



I agree with you in most. regarding the solution Trent post, I notice this problem and put here in forum, Trent was kindly in adjust SF for work with the given solution.



In the rest, if SF developers could adjust the LOCALMACHINE entry in the registry to LOCALUSER, must problems should go, according to Microsoft, the problem is given in these values, as programmers we can not write values related to LocalMachine, we are strongly advised to use LocalUser.



Now, I use Vista since came up day one. In Visual Studio 2005, it was recommended by MS run it as administrator permission. So, when VS 2008 appear I use in the same way.



Please note that log Vista as administrator is different to run an application as administrator. For example, almost every application you want to install prompts for permission to be installed, even if you start logged as administrator; when you give the permission you are running the installer with the proper permission.



Same way, running VS 2008 as administrator is just clic on the icon and select run as administrator, once VS 2008 is running, you can launch any StrataFrame modules from there and you will not have any problems.



The document I attach before is from MS and is in 2007 format, maybe that's the reason why you can not read it.



I really like to read Trent answer, but SF is working fine for me in Vista of course, taking care of situations like this.



Regards




Smile Everything is possible, just keep trying...
Ralph Rutschmann
Ralph Rutschmann
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 69, Visits: 1.3K
Hello Juan,

thanks for your quick and friendly answer! Smile

Now, I use Vista since came up day one. In Visual Studio 2005, it was recommended by MS run it as administrator permission. So, when VS 2008 appear I use in the same way.

Arghhh! Crazy

Now I see my misunderstanding: VS should run as administrator, not me!

I really hate Vista from the first sight on, since three days. And I don't believe this will be much better in future. It looks 'Mickey-Mousey' to me, like a comic-book, not like an operating system. Is it build to have us playing like children? I don't know, it doesn't matter also. But I know I hate it. Vista seems to be unbelievable slow, pedantically and bulkily, nearly unusable. OK, it may be secure. But where is the fun, the speed and the pleasure to work with?

Please note that log Vista as administrator is different to run an application as administrator.

Yes, I see now. Thank you for the explanation and sorry for my stupidity letting you explain this twice.

I'm very new to Vista and would have never thought that a program could run as 'administrator'. What does a program have to administrate? I will never understand, what the guys at MS are thinking...

But I have to live with it as long as MS sells operating systems and my customers buy for that stuff to have my apps running on it.

Sorry, I'm far beside the topic...

Thank you very much again. I tried your suggestion and it works. One mouse-click more saves me to kill the StrataFrame tools thru the task manager. Annoying enough, but better as nothing. What don't we do it all for our security...

Thanks again and best regards,

Ralph

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hey guys.

Just jumping in to sugest something.

I am also running on Vista from the begining. I like it a lot. Sorry, it is just me... BigGrin

I haven't faced the problems you've been discussing on this thread, so I can't test it here on my environment. You might not need to right click VS every time you want to run it. Go to its properties (hopefully the las Right+Click you use), then go to the Shortcut tab, Advanced button and set the "Run as administrator" check box. Mine is not checked, but you may try that.

Just curious, do you guys run with UAC on?

Cheers.

Dustin Taylor
Dustin Taylor
StrataFrame Team Member (484 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Great answers Juan, you nailed it exactly!

One more thing you may look at Ralph is turning off User Account Control alltogether on your development machines. It is less secure, but so long as you are responsible in your use of the machine, it shouldn't kill you and is much less annoying Wink

Here is an article that gives you the easiest way to turn off UAC: http://www.howtogeek.com/howto/windows-vista/disable-user-account-control-uac-the-easy-way-on-windows-vista/

And here is one from microsoft that detailes UAC in more depth: http://technet.microsoft.com/en-us/library/cc709691.aspx

Hope it helps!

Ralph Rutschmann
Ralph Rutschmann
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 69, Visits: 1.3K
Hi all,

thank you very much for the many hints. I feel much better now. BigGrin

And yes, I was working with UAC on. What a pain! Shame on me... Or MS for this "feature".

Thanks again and best regards,

Ralph

Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well instead of me replying to each point here, let me just add a couple of comments here.

I am a huge fan if Vista regardless of all of the bad press, the fact that it has a huge overhead and many existing machines could not run it, etc.  But there are certain things that are extremely irritating beginning with UAC.  I think that UAC is one of the worst security implementations that Microsoft has ever had...period!  In fact, if you'll notice, you can actually make your .NET applications UAC aware...but I would recommend against this since it is just better off having UAC turned off.

Microsoft has even had to work around their UAC issues and have recommended, as Juan mentioned, to run VS as an admin.  This is not an issue for most developers anyway since developers generally have control over their machines as it is.

But in short, we will change the LOCAL_MACHINE keys to LOCAL_USER in the long run which this was already slated to do anyway just so these types of forums posts don't popup and save us all time when there is a security issue on a developers machine.  So this will be changed in the long-run anyway.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search