FIX: Requested Registry Access is not allowed (Visual Studio 2008)
Symptom: in Visual Studio 2008, you attempt to add a new WebContentForm and associate it with a MasterPage. You receive an error dialog "Requested Reqistry Access is not allowed".
Don't ask me what caused this; I'm guessing that the registry keys involved had their access denied due to removal of a previous version of Visual Studio, leaving the new guy (Visual Studio 2008) in the lurch.
Here's the fix:
Download "subinacl" here. This is a command-line tool that enables administrators to obtain security information about files, registry keys, and services, and transfer this information from user to user, from local or global group to group, and from domain to domain.
After installing subinacl.exe (it will be in the C:\Program Files\Windows Resource Kits\Tools folder.), drop to a command prompt and run the following batch file, which you have saved in the same folder with the filename "FIX.bat":
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.vbproj.9.0 /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.vbproj.9.0 /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.vbproj.9.0 /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=system=f
BAM! All fixed! Have fun.


57 Comments:
Works great on Vista!
You did all the hard work :)
Thank you... you saved me
Didn't work for me. I still get the same message when I try to open a new project.
I just posted a few minutes ago that it didn't work for me. However, I found this, and now it works: subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f
thks! great solution :)
thanks, also for my Vista Premium edition the second solution is perfect!
This works. The second FIX worked for me on Vista. Let it run and VS will not have the issues anymore. I can't say how much I am thankful for finding this fix. THANKS!!!
CLOSE ALL COPIES OF VS2008.
Download and Install SubInACL (AS ADMINISTRATOR)
Create bat file, with the lines provided above. Close it. Run bat (as administrator if your not an admin).
Works flawlessly on Vista Ultimate SP1 + VS 2008 Std installed ontop of VB/VWD 2008 Express Remenants.
I love you man!!!!!!1 You are great!!!!!!!!!!!!!! You save my life with this article!! XD Thank's a lot!!!!
working great for me, thank you very much.
====================
http://tvradionet.com
The 2nd solution looks like it changes the permissions on everything in the Registry. Is that the case?
I wanted something specific to VCSExpress, so I looked in the Registry for references to it. There were about 20 or so entries all of which said Access Denied when clicked.
However, running a batch file with these statements
subinacl /subkeyreg HKEY_CLASSES_ROOT\VCSExpress.csproj.9.0 /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VCSExpress.csproj.9.0 /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VCSExpress.csproj.9.0 /grant=system=f
gave access to the csproj entry.
Attempting to create a project in VCSEXpress still doesn't work, so I guess I'll have to run the same subinacl command against ALL relevant entries. Can a wildcard be used?
Most Excellent!!!
Thanks a bunch.
The solution proposed by Peter didn't run on my computer, but someone from Microsoft helped me.
Look at the 2nd Gilles TOURREAU's answer. You just need to change something in the registery.
Have a look at : http://forums.microsoft.com/MSDN-FR/ShowPost.aspx?PostID=3457523&SiteID=12&mode=1
You've saved my life... thanks
Does not work with registries in Windows x64 versions.
I Allowed to Administrator, Users, and System the whole HKEY_CURRENT_USER using the regedit GUI. Now I can view all keys that I can't see before. The problem is that the issue keeps on, when i create a new project, it saind "Requested registry access is not allowed" (Important data: with this modification, the error message appears in English [At the begining, appears in Spanish if you have vista in spanish])
Other ideas???
OS:Vista Busisness
App: Visual Studio 2008
150 more applications installed.
VS2008 worked with the same configuration before format mi PC.
thank you, very useful.
Thanks a lot it worked.
very special thanks to you, !!! youknow, I think it is a shame for microsoft because they forgot to test their VS product on Windows Vista !! haha , but thanks any way, it works now !! :D
VERY VERY VERY thanks form ISTANBUL,TURKEY!
this was my big problem. Thanks a lot my firend :D
Çok sevaba girdin adamım ;)
thanks a bunch. the 2nd suggestion worked!!!
woot!! it works, the only problem is i got more then 200k files in the registry
Doesn't work for me. I don't have a fix.bat file and when I run the program, it flashes into a cmd screen for about half a second then returns. I try running in administrator but it doesn't work. How do I make this work im getting frustrated!!!! :( >-(
For those who are lost. To create the batch file, open notepad and copy and paste the above lines.
Then save the file as fix.bat in the C:\Program Files\Windows Resource Kits\Tools folder.
When you run subinacl.exe, a dos box will open and then close.
After that, open command prompt (Start, type cmd, right click 'cmd' and run as administrator).
At the command prompt type:
cd C:\program files\windows resource kits\tools (hit 'enter')
fix.bat (hit 'enter')
The program will take a while to run. When it is finished you can run VS 2008.
BTW, the second fix worked for me.
Thx fellers!
neither worked for me. All the registries report that they failed.
am i missing something?
-I installed subinacl
-created "fix.bat" with 2nd solution where subinacl is found.
-ran subinacl (to test)
-ran cmd prompt under Admin and cd'd the folder and loaded the fix.bat file.
-it goes through 300,000+ registries before restarting the whole process over.
32bit vista
compaq presario F700
1.9ghz Athlon 64 X2.
Wow! Thank you very much!!!
you also need to adjust the .sln, .vcs ,.vbz etc entries to get it to work...
I just used this line to get the VSEXPRESS issue corrected
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
Darrell
yay it worked!!! =) coool! thanks a lot guys.
There are a lot of posts on this subject with many "broad stroke" fixes, but they all cause trouble because of their scope. I have narrowed it down to two registry keys(after several hours of trial and error). I used Acronis TrueImage Home 11's Try&Decide Feature to quickly un-do changes to my system. I am using Visual C# Express Edition 2008, on Vista Business Edition x64. Full Visual Studio may be different.
Download and install "subinacl" from Microsoft.
Create a batch file with just the two lines below":
(You are granting full permissions to the "administrators", and "system" groups and read-only permissions to the "users" group.)
Save the file as "fix.bat" in the install directory that "subinacl" software was installed in (C:\Program Files (x86)\Windows Resource Kits\Tools)**
**32-bit versions of windows will probably be located at (C:\Program Files\Windows Resource Kits\Tools).
------------------------------------------------------------------------------
subinacl /subkeyreg HKEY_CLASSES_ROOT\.csproj /grant=administrators=f /grant=system=f /grant=users=r
subinacl /subkeyreg HKEY_CLASSES_ROOT\VCSExpress.csproj.9.0 /grant=administrators=f /grant=system=f /grant=users=r
------------------------------------------------------------------------------
Both keys must have permissions set ... not just one.
Open a command prompt (with administrator rights), change the directory(cd) to where you saved the batch file (see above note).
Type in fix.bat
It will finish very quickly.
You should be able to create new VCS programs again.
Israel
********************** Visual C# 2005 Express Edition will probably use different keys ... instead of VCSExpress.csproj.9.0, I think it will be VCSExpress.csproj.8.0 instead. ************************ Browse your registry to check for sure.
hey
didn´t work for me :(
i tried all versions...
...but the weird thing is
i get an error in cmd when i type in -> fix.bat
it writes (in German:HKEY_CLASSES-ROOT:administrator 1337 Die Struktur der Sicherheitserkennung ist unzulässig
programm wird nicht ausgeführt
in english:HKEY_CLASSES-ROOT:administrator 1337 security identification is not valid
program will not be processed)
-> i have the german version :)
i have done all the things
1. run subinacl
2. create fix.bat file
3. open cmd and type in (cd C:\program files\windows resource kits\tools (enter)
fix.bat (enter)
=> error
i hope someone has a good idea for me because i am really frustrated and helpless.
maybe i did something wrong???
PS: vista ultimate
thx tom
In other languages the batch fil has to be modified according to the language.
In German it has to be this way :
ubinacl /subkeyreg HKEY_CLASSES_ROOT\.csproj /grant = Administratoren=F /grant=system=F /grant = Benutzer=R
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=Administratoren=F /grant=system=F /grant=Benutzer=R
Theo
In other languages the batch fil has to be modified according to the language.
In German it has to be this way :
ubinacl /subkeyreg HKEY_CLASSES_ROOT\.csproj /grant = Administratoren=F /grant=system=F /grant = Benutzer=R
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=Administratoren=F /grant=system=F /grant=Benutzer=R
Theo
Thanks baby, you are the best, very helpful!
respect rasta! worked perfectly!
i friggin' love you man! the 2nd vista fix worked.
Thnx to Peter for the solution and thnx to our anonymous friend from Germany for the hint: I spent some 20 minutes trying to find out where I was wrong, and it was my Russian Vista which uses Russian words for "administrators" and "users"))) I would never believe Windows does it!!! I was sure these Russian substitutes are only aliases, and the true names should be exactly "administrators" and "users". Seems quite logical as my localized copy uses "system" in its original English spelling.
Thank you :) it worked for me on Vista Business x64
Very useful. Thanks a lot.
None of these worked. Didn't try the broad spectrum, cause I don't wanna ruin the rest of my comp. Vista Home Premium, VS2008 Pro, registered, etc. used all the bat files located here, tried everything, fresh install, everything...I'll post a vid on youtube if wanted
help is appreciated, cause Microsoft is useless
Hi ,thanks,if you add more then you can also solve silver light issues like below..........
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.vbproj.9.0 /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.vbproj.9.0 /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.vbproj.9.0 /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.csproj.9.0 /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.Solution.9.0 /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.Solution.9.0 /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio.Solution.9.0 /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\._sln /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\._sln /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\._sln /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\._sln90 /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\._sln90 /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\._sln90 /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\AgControl.AgControl /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\AgControl.AgControl /grant=users=f
subinacl /subkeyreg HKEY_CLASSES_ROOT\AgControl.AgControl /grant=system=f
Didn't work...any other way?
Hey thanks...worked just fine on VB 2008 Studio Pro on Vista SP2 Beta
i love you man.good job. and thomas explain very clear. u saved me.thanks
the second code worked for me but when i restarted my comp the sound wouldn't work, internet was disconnected, system restore failed and other system tools failed... nothing would open apart from internet (even though it said it was disconnected). so i restarted, pressed f11 and did system restore from there. so its back to normal now. but i tried the steps again and got VB working again with the second code, but when i restarted again it was the same as before. so i just did the system restore and gave up on VB. (running vista basic btw.)
Thank you great work
You saved loads of my effort. Thanks a ton.
Thanks SO SO SO MUCH. Im an developer and could not get it to work. boy im studpid.
Thanks you saved my day!
the codes really messed up my computer so i stopped using them, they messed up all the drives and had to system restore. But i downloaded visual basic 6.0 which worked, then i tried 2008 again and it worked? strange. after using vb6.0... 2008 suddenly started working o.O
I have been trying every solution available on the internet (almost). Just before I decided to give up I found out what I did wrong.
Have a look at one of the command lines...
****
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
****
I was looking at the line for a few minutes then I realized that my pc´s administrator account IS NOT CALLED "administrators" but instead its "administratorer" (danish).
So I changed from
****
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
****
to
****
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administratorer=f
****
Thats it...everything works now. I just like to remind you that the administrators/users/guests/systemsmay not be called the same from country to country/continent to continent.
Hope this helps out a few.
2 questions...
do i paste all the lines or 1 line?
do i have to restart my pc?
2 questions...
do i paste all the lines or 1 line?
do i have to restart my pc?
aahhh I love you guys.. this saved my life!
Thanks for posting this. I used the initial post and the 3rd comment and my issue seems to be gone now (*.bat took around 20 minutes to run!). FWIW I believe I got the problem from installing SP1 for VS.NET 2008 on Vista... thanks a ton Microsoft.
After lots of trying, "VCSExpress.csproj.9.0" is the key for me. In Registry Editor, I could not even open the key before running the subinacl batch file.
once i ran it through the command prompt, it worked like a dream, cheers!!!
Post a Comment
Links to this post:
Create a Link
<< Home