Click here to Skip to main content
15,885,915 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 177.2K   6.1K   112  
A C# .NET 3.5 (Win7) Windows Forms Application with source code
@echo off
prompt $$$S
echo.
echo Executing CryptPadInstallAdmin.cmd
echo.
echo %~f0

set file=CryptPad.exe
if exist %file% goto :copy
set file=CryptPad.html
if not exist %file% goto :missing
set file=CryptPad.png
if not exist %file% goto :missing
set file=CryptPadInstall.cmd
if not exist %file% goto :missing
set file=CryptPadAdd.reg
if not exist %file% goto :missing
set file=CryptPadDelete.reg
if not exist %file% goto :missing
set file=CryptPadInstallAdmin.cmd
if not exist %file% goto :missing
set file=CryptPadAddAdmin.reg
if not exist %file% goto :missing
set file=CryptPadDeleteAdmin.reg
if not exist %file% goto :missing

:missing

echo.
echo Missing the %file% file!
echo.
echo CryptPadInstall.cmd assumes all release files:
echo CryptPad.exe, CryptPad.html, CryptPad.png,
echo CryptPadInstall.cmd, CryptPadAdd.reg, and CryptPadDelete.reg,
echo CryptPadInstallAdmin.cmd, CryptPadAddAdmin.reg, and CryptPadDeleteAdmin.reg,
echo are in the same directory to copy to the install location!

echo.
pause
goto :eof

:copy

set d=%PROGRAMFILES%\CryptPad
set p=%d%\CryptPad.exe

rem If they execute from the install directory then reg only
if %CD% == %D% goto :regonly

echo.
echo Clear any previous CryptPad release files from the Documents directory
rd /s /q "%d%"

if not exist "%p%" goto :makenew

echo.
echo Old "%p%" busy!
echo Cannot complete install!
echo.
pause
goto :eof

:makenew

echo.
echo Place new CryptPad release files in the %d% directory

echo.
echo Make new directory and add files
md "%d%"

xcopy /y *.* "%d%"

:regonly

echo.
echo Execute the CryptPadAddAdmin.reg file

regedit.exe /s CryptPadDeleteAdmin.reg
regedit.exe /s CryptPadAddAdmin.reg

echo.
echo Finished.

echo.
pause

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