Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Create super hidden folder


  • Please log in to reply
6 replies to this topic
Landvermesser
  • Members
  • 51 posts
  • Last active: Aug 12 2008 09:02 AM
  • Joined: 03 Nov 2004
The script creates the "super hidden" folder and connect it as a drive. This folder is invisible for Windows Explorer and the content can not be searched, archived and so on. By locking of the folder it is as the "Item of Control Panel" represented and is inaccessible for Windows Explorer.

Note that some other file managers and search engines can listen the content of this folder. It is only "super hidden" and not encrypted. With Linux Live CD or with BartPE you can find the folder and get full access.

Compile it with "quasi system" file name (svchost.exe or other) - it makes the process more "stealth" in the Process Manager (but not really invisible).

#NoTrayIcon
#SingleInstance force
#Persistent

; Null the choice of viewing of super hidden files from folder view
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SuperHidden, UncheckedValue, 0
; Don't show hidden files and folders
RegWrite, REG_DWORD, HKEY_CURRENT_USER, SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
; Hide protected operating system files
RegWrite, REG_DWORD, HKEY_CURRENT_USER, SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 0
; Don't use simple file sharing
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\Lsa, forceguest, 0

; Complex long path (it is too simply now, make it more complex)
Path = %A_WinDir%\System32
LockedFolderName = %Path%\Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}
UnlockedFolderName = %Path%\System

; Run once to create super hidden folder
IfNotExist, %LockedFolderName%
	{
		IfNotExist, %UnlockedFolderName%
			{
				FileCreateDir, %UnlockedFolderName%
				FileSetAttrib, +RASH, %UnlockedFolderName%, 2 ; +RASH makes the folder "super hidden"
				Gosub, Unlock
			}
	}
OnExit, ExitSub
; Complex hotkey
Hotkey, #+^!h, Trigger
Return
	
Trigger:
	IfExist, %UnlockedFolderName%
		Gosub, Lock
	Else
		Gosub, Unlock
	Return
	
Unlock:
	FileMoveDir, %LockedFolderName%, %UnlockedFolderName%
	; Maping as a drive H: to easy access
	CommandIn = /c subst h: "%UnlockedFolderName%"
	RunWait, %comspec% %CommandIn%, , hide, UseErrorLevel
	If ErrorLevel <> ERROR
		MsgBox, 64, System message, Access granted, 2
	Return	
	
Lock:
	; Removing of mapped drive
	CommandIn = /c subst h: /d
	RunWait, %comspec% %CommandIn%, , hide, UseErrorLevel
	If ErrorLevel <> ERROR
		{
			FileMoveDir, %UnlockedFolderName%, %LockedFolderName%
			MsgBox, 64, System message, Connection terminated, 2
		}
	Return

ExitSub:
	Gosub, Lock
	ExitApp


Grumpy
  • Guests
  • Last active:
  • Joined: --
I would hate to see a program changing settings like the visibility of system files! I would see it as spyware...

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

I would hate to see a program changing settings like the visibility of system files! I would see it as spyware...

...even if you ran a script to do it yourself... :?: :?

Landvermesser
  • Members
  • 51 posts
  • Last active: Aug 12 2008 09:02 AM
  • Joined: 03 Nov 2004
Really all RegWrite are not necessary. Only the first RegWrite is necessary only by first run. You can delete others and return old values.

I don't think, that to hide personal files is an espionage. I think, that it is realism.

Grumpy
  • Guests
  • Last active:
  • Joined: --
Well, I thought it was used for software protection or stuff like that...
I still don't like much the idea (ie. if I have set these settings, I won't want to change them back for "security" reason) and although I didn't explored the field, I think there are more reliable ways to protect access to some data/folders (freewares).
Now, if that can be useful to somebody, knowing the gotchas, all the better!

Hansol
  • Members
  • 36 posts
  • Last active: Aug 02 2011 07:31 PM
  • Joined: 27 Dec 2005
; Don't use simple file sharing
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\Lsa, forceguest, 0
Does this affect all folders? If it does, is it possible for it to only affect one folder?

What I would like is to unshare a specific folder. Now I use net share, but is it possible to do that with a regwrite?

run, net share C:\Folder /delete, ,Hide UseErrorLevel


woshichuanqilz
  • Members
  • 9 posts
  • Last active: Jan 11 2017 12:26 PM
  • Joined: 04 Sep 2015

I don't know what's the meaning of the dos cmd subst for? It turn a folder to a drive. But I think it's not related to hide the folder.

 

After exe the subst cmd, the folder still there.