Click here to Skip to main content
15,891,423 members
Articles / Security / Encryption

Encrypting Editor Notepad Replacement

Rate me:
Please Sign up or sign in to vote.
4.85/5 (50 votes)
28 Jul 2014CPOL80 min read 178.7K   6.1K   112  
A C# .NET 3.5 (Win7) Windows Forms Application with source code
 Windows Registry Editor Version 5.00

; HKEY_CURRENT_USER does not require admin permission
; assumes program is %USERPROFILE%\Documents\CryptPad\CryptPad.exe
; Tested with Windows 7 and IE11

;_____________________________________________________________
; Register application

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AppPaths\CryptPad.exe]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe"
@=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,00,45,\
  00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,5c,00,\
  43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,00,70,\
  00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,00,00

[HKEY_CURRENT_USER\Software\Classes\Applications\CryptPad.exe\shell\Open\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,\
  25,00,31,00,22,00,00,00

[HKEY_CURRENT_USER\Software\Classes\Applications\CryptPad.exe\shell\OpenReadonly]
@="Open (Read-only)"

[HKEY_CURRENT_USER\Software\Classes\Applications\CryptPad.exe\shell\OpenReadonly\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" do readonly "%1
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,64,00,\
  6f,00,20,00,72,00,65,00,61,00,64,00,6f,00,6e,00,6c,00,79,00,20,00,22,00,25,\
  00,31,00,22,00,00,00

;_____________________________________________________________
; Open TXT

[HKEY_CURRENT_USER\Software\Classes\txtfile\shell\Open\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,\
  25,00,31,00,22,00,00,00

[HKEY_CURRENT_USER\Software\Classes\txtfile\shell\OpenReadonly]
@="Open (Read-only)"

[HKEY_CURRENT_USER\Software\Classes\txtfile\shell\OpenReadonly\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" do readonly "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,64,00,\
  6f,00,20,00,72,00,65,00,61,00,64,00,6f,00,6e,00,6c,00,79,00,20,00,22,00,25,\
  00,31,00,22,00,00,00

;_____________________________________________________________
; Open SAFE

[HKEY_CURRENT_USER\Software\Classes\.safe]
@="txtfile"
"PerceivedType"="text"
"Content Type"="text/plain"

;_____________________________________________________________
; Cryptpad script

[HKEY_CURRENT_USER\Software\Classes\.cryptpad]
@="cryptpadfile"

[HKEY_CURRENT_USER\Software\Classes\cryptpadfile\shell\Edit\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" do edit "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,20,00,\
  64,00,6f,00,20,00,65,00,64,00,69,00,74,00,20,00,22,00,25,00,31,00,22,00,00,\
  00

[HKEY_CURRENT_USER\Software\Classes\cryptpadfile\shell\Open\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" "%1" "%2"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,\
  25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,00,00,00

;_____________________________________________________________
; Edit CMD

[HKEY_CURRENT_USER\Software\Classes\cmdfile\shell\Edit\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,\
  25,00,31,00,22,00,00,00

;_____________________________________________________________
; Edit REG

[HKEY_CURRENT_USER\Software\Classes\regfile\shell\Edit\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,\
  25,00,31,00,22,00,00,00

;_____________________________________________________________
; Edit HTML

[HKEY_CURRENT_USER\Software\Classes\.htm\OpenWithList\CryptPad\shell\edit\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,\
  25,00,31,00,22,00,00,00

;_____________________________________________________________
; Edit HTML changed in IE Internet Options,
; Programs, HTML editing, HTML editor
; It changes with versions and updates

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Default HTML Editor]
"Description"="CryptPad"

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Default HTML Editor\shell\edit\command]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe" "%1"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,\
  25,00,31,00,22,00,00,00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\View Source Editor\Editor Name]
; "%USERPROFILE%\Documents\CryptPad\CryptPad.exe"
@=hex(2):22,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,\
  5c,00,43,00,72,00,79,00,70,00,74,00,50,00,61,00,64,00,5c,00,43,00,72,00,79,\
  00,70,00,74,00,50,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,00,00

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Systems Engineer IAUA End Time Ministry
United States United States
I am a retired Software Systems Design Engineer experienced with IEEE standards and the entire IEEE software development life cycle. Concept Exploration, Requirements, Design, Implementation, Test, Installation and Checkout, Operation and Maintenance. I enjoy working with people and solving customer problems.

I am currently a writer for my personal ministry: IAUA End Time Ministry

Comments and Discussions