- Open folder as admin windows
- Question
- Answers
- All replies
- Open folder as admin windows
- Answered by:
- Question
- Answers
- All replies
- How to open a file for editing in Administrator mode?
- 11 Answers 11
- Not the answer you’re looking for? Browse other questions tagged windows-7 64-bit notepad++ administrator uac or ask your own question.
- Linked
- Related
- Hot Network Questions
- Subscribe to RSS
Open folder as admin windows
Question
I am trying to open the folder Documents and Settings on my local machine. I am the administrator, the computer is not on a network, and it is a standalone machine.
Answers
Which operating system is used currently, Windows 7, Windows XP or other operating system?
The «Documents and Settings» folder only exists in Windows XP and previous operating systems. It does not exist in Windows 7 and the folder is replaced. The folder is named «Users» now. You can double click the folder directly via the administrator permission.
All replies
Which operating system is used currently, Windows 7, Windows XP or other operating system?
The «Documents and Settings» folder only exists in Windows XP and previous operating systems. It does not exist in Windows 7 and the folder is replaced. The folder is named «Users» now. You can double click the folder directly via the administrator permission.
I have a problem related to the subject question. I had given some folders on my previous PC limited accessibility. I have then backed them up on an external drive, and are now trying to access them on a new PC under Windows 7. But I cannot access them because «user does not have access privileges».
Can anyone help me out?
in windows 7, i couldn’t access my «documents and settings» folder. to fix this (and actually all of these pesky folder access problems) i did this:
1) went to «my computer»
2) right-click and press «properties»
3) go to the «security» tab and press «advanced»
4) go to the «owner» tab. here you’ll see the current owner and other names in the change owner box. your user should be there if it has administrator rights.
5) click on «Edit».
6) in the new window find your user and select it, check the checkbox for «Replace Owner on subcontainers and objects»
7) Click Apply. this will take a couple of minutes for it to go over each folder and file and change its ownership to your user.
voila, you can access all the folders
hope this helps
in windows 7, i couldn’t access my «documents and settings» folder. to fix this (and actually all of these pesky folder access problems) i did this:
«documents and settings» is NO folder! It is a junction point:
The files are now stored here:
C:\Users
«A programmer is just a tool which converts caffeine into code» CLIP- Stellvertreter http://www.winvistaside.de/
When I attempt this solution for my current problem, (I denied access to a folder to by wrongly selecting to deny access to «Users» instead of a specific user so I now can not open the folder myself as the administrator) it tells me after number 7 that I do not have the correct access.
Noob mistake here.
If you are using windows 7 use the command line «icacls» it should give you access to the said folder you want.
icacls «C:\folder you want to open & access \» /grant administrators:F
CEH.ECSA.MVP Windows Security
- Edited by MILO MVP Saturday, April 2, 2011 6:50 AM added
Thanks for the reply, I was just able to try your response today for the first time.
I will type in exactly what I put in the command line
icacls «D:\saved shit\» /grant administrators:F
D:\saved shit» /grant administrators:F: The filename, directory name, or volume label syntax is incorrect.
Successfully processed 0 files; Failed processing 1 files
After this I enabled the «hidden admin» account and logged on that account to find I was able to edit the folder’s permissions and I can now go into that folder. The problem remains though that every folder and file within D:\saved shit is now inaccessible to either the administrator account or my original account with administrator privileges.
When I attempt the icacls solution you posted for the subfolder D:\saved shit\My Documents it gives me the same message I wrote earlier.
Sorry for the wall of text and I really do appreciate your help. My end goal is just to have the default permissions set for all the files and subfolders so I can access them again.
Open folder as admin windows
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I am trying to open the folder Documents and Settings on my local machine. I am the administrator, the computer is not on a network, and it is a standalone machine.
Answers
Which operating system is used currently, Windows 7, Windows XP or other operating system?
The «Documents and Settings» folder only exists in Windows XP and previous operating systems. It does not exist in Windows 7 and the folder is replaced. The folder is named «Users» now. You can double click the folder directly via the administrator permission.
All replies
Which operating system is used currently, Windows 7, Windows XP or other operating system?
The «Documents and Settings» folder only exists in Windows XP and previous operating systems. It does not exist in Windows 7 and the folder is replaced. The folder is named «Users» now. You can double click the folder directly via the administrator permission.
I have a problem related to the subject question. I had given some folders on my previous PC limited accessibility. I have then backed them up on an external drive, and are now trying to access them on a new PC under Windows 7. But I cannot access them because «user does not have access privileges».
Can anyone help me out?
in windows 7, i couldn’t access my «documents and settings» folder. to fix this (and actually all of these pesky folder access problems) i did this:
1) went to «my computer»
2) right-click and press «properties»
3) go to the «security» tab and press «advanced»
4) go to the «owner» tab. here you’ll see the current owner and other names in the change owner box. your user should be there if it has administrator rights.
5) click on «Edit».
6) in the new window find your user and select it, check the checkbox for «Replace Owner on subcontainers and objects»
7) Click Apply. this will take a couple of minutes for it to go over each folder and file and change its ownership to your user.
voila, you can access all the folders
hope this helps
in windows 7, i couldn’t access my «documents and settings» folder. to fix this (and actually all of these pesky folder access problems) i did this:
«documents and settings» is NO folder! It is a junction point:
The files are now stored here:
C:\Users
«A programmer is just a tool which converts caffeine into code» CLIP- Stellvertreter http://www.winvistaside.de/
When I attempt this solution for my current problem, (I denied access to a folder to by wrongly selecting to deny access to «Users» instead of a specific user so I now can not open the folder myself as the administrator) it tells me after number 7 that I do not have the correct access.
Noob mistake here.
If you are using windows 7 use the command line «icacls» it should give you access to the said folder you want.
icacls «C:\folder you want to open & access \» /grant administrators:F
CEH.ECSA.MVP Windows Security
- Edited by MILO MVP Saturday, April 2, 2011 6:50 AM added
Thanks for the reply, I was just able to try your response today for the first time.
I will type in exactly what I put in the command line
icacls «D:\saved shit\» /grant administrators:F
D:\saved shit» /grant administrators:F: The filename, directory name, or volume label syntax is incorrect.
Successfully processed 0 files; Failed processing 1 files
After this I enabled the «hidden admin» account and logged on that account to find I was able to edit the folder’s permissions and I can now go into that folder. The problem remains though that every folder and file within D:\saved shit is now inaccessible to either the administrator account or my original account with administrator privileges.
When I attempt the icacls solution you posted for the subfolder D:\saved shit\My Documents it gives me the same message I wrote earlier.
Sorry for the wall of text and I really do appreciate your help. My end goal is just to have the default permissions set for all the files and subfolders so I can access them again.
How to open a file for editing in Administrator mode?
I have .config files set to open in Notepad++. The files I edit are typically in protected locations (e.g. c:\windows\, c:\program files. etc..) thus requiring administrator access.
I’d like to be able to double click on a .config file and have Notepad++ open with Administrator privileges. It’s fine if the UAC prompt comes up.
Is there a way to do that?
11 Answers 11
The best way to is to go straight to the folder in which Notepad++ is installed (Program Files for 32 bit Windows and Program Files(x86) for 64 bit Windows), there, find the Notepad++ executable, right-click on it, and select Compatibility, and at the bottom check the box for Run as administrator.
This WILL make your application always pop up with a UAC warning, but you’ll always have the ability to edit as administrator.
EDIT: Found this article which allows you to create the shortcut without launching the UAC prompt. It’s technically for Windows 10, but should work the same way on Win7+.
I have found that searching for the editor program (e.g. Notepad++) in the Start menu and then typing Ctrl + Shift + Enter lets you run the program as an administrator.
You should then be able to open and edit the file that requires elevated priviledges.
As an improvement over @Askeli’s answer, you can first make a copy of the notepad++ executable (Name it something like NotepadUAC). Then set the compatibility mode in the properties of your copy to require administrator mode as suggested by Askeli. Now you should also be able to set your .config files to open up using the copy rather than the original.
The advantage here is that you won’t see the UAC prompt when opening files with the original (default) Notepad++ .exe file. The disadvantage is that this copy isn’t necessarily going to keep itself up to date in the same way as the original, and might eventually cause problems with mismatched .dll or config versions. But it’s always easy enough to uninstall/reinstall if that happens.
My solution was to pin Notepad++ to the taskbar. When I need it for system files editing I right click on it, click on «Notepad++», and click on «Run as administrator».
The other solutions modifying the shortcut or making copies of it are fine if you are editing system files all the time. I use Notepad++ on a daily basis but I don’t mess with protected files every day.
This wasn’t available when the original question was posted in 2010, but as of 2012 — the best answer (at least as I consider it):
Install nppSaveAsAdmin:
This plugin allows you to save any file as administrator. Just press «Save» in Notepad++ and if you are not allowed to change this file as user, Notepad++ will save it as administrator. Windows XP, Windows Vista, Windows 7, Windows 8 are supported.
The «Save as admin» plugin is available for quick and easy installation from the Notepad++ Plugin Manager. (Plugins / Plugin Manager / Show Plugin Manager / Available. Check «Save as admin», click «Install».)
Notepad++ will continue to run as usual, and without needing to run with full administrative UAC tokens. However, if Notepad++ sees that you’re trying to save a file that you are otherwise not allowed access to, it will fork to NppAdminAccess.exe (displaying a UAC prompt). Simply click «Yes», and your file will be saved with administrative privileges.
- Make a copy of the .exe of your text editor into the same program files folder and append «Admin» or similar to the name.
- Right click the new exe -> Properties -> Compatibility -> Privilege Level -> Check «Run this program as administrator»
- Create a shortcut to this exe on your desktop / task bar / start menu
- Drag a txt file you want to edit as Administrator (or shortcut to one) into this shortcut
Is the easiest / most flexible way I’ve found to do this when I have to edit the hosts file for web development. Of course if you just want to open all files of one extension as admin, per Joel’s suggestion, you can just use the «open with. » -> «Choose default program» on the copy you created.
Uninstall the plugins (except plugin manager). This fixed the problem for me. You can install one plugin at time to see which plugin(s) causes problems.
The following solution doesn’t really allow for the double click scenario but it gives you the power of choice (and technically it’s also two clicks):
You can add a ‘Run as administrator’ menu item to the shell context menu on a per file type (or rather per program) basis. See this article for details on the registry tweak.
The best way is to set Notepad++ to run as administrator. The problem with that is it breaks the Right Click option. So I made a replacement to the right click option that removes the old one. The nice part of my fix is I added it to the Directory setting in the Registry. So now you can right click on a folder and pick Edit with Notepad++ and it will open all the files in Notepad++ :). I do a lot of VBScript programming. That makes it easy for me to edit all my files making global changes when I come up with a new method of doing something or change an object.
My VBScript backs up the registry keys before it changes them. It does not set Notepad++ as administrator so you have to do that by right clicking on the Notepad++ executable and changing it to run as administrator. I’m starting to research on how to make this a Run as Administrator. When I come up with that I’ll edit my post so it gives you the option to edit as Admin or edit normally.
just a simple and effective method:
- create a shortcut on the desktop (c:\program files\notepad++\notpad++.exe -> right click -> sendto -> desktop)
- create a copy of that shortcut and add _ADMIN to the shortcut
- right click the _ADMIN shortcut — properties — shortcut — button advanced — tick «run as administrator»
- open a file explorer and type «shell:sendto»
- drag and drop both shortcuts to the opened folder
now you have both notepad++ and notepad++_ADMIN in your «SendTo» list for any file.
Another solution is to open the «Start Menu», search for the Notepad application and right click it. Then click on «Run as Administrator».
You are now able to browse the file system (through «Notepad/File/Open. «) for the file you want to edit.
Not the answer you’re looking for? Browse other questions tagged windows-7 64-bit notepad++ administrator uac or ask your own question.
Linked
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.4.16.39093
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.