This is a simple Ai assisted generated encryption utility, it used .NET 8.
Once compiled, you run it FileEncrypt.exe "fullpathoffile"
Or, better approach, right click shell integration, see below REG section. Note on windows 11, you'll need to hit the 'more' at the bottom of the right click.
How to Compile and Place the .exe
- Compile: Open a developer command prompt, navigate to your project's folder, and run:
dotnet publish -c Release -r win-x64 --self-contained true- This creates a self-contained
.exethat doesn't require .NET to be installed.
- This creates a self-contained
- Find the
.exe: Look in your project folder underbin\Release\net8.0\win-x64\publish\. You will findYourProjectName.exe. - Place it: Create a permanent folder on your PC, for example
C:\Tools\FileEncrypt\. Copy the.exeinto this folder and rename it toFileEncrypt.exe.
Your final path will be C:\Tools\FileEncrypt\FileEncrypt.exe. This path is critical for the next step.
This will add the "Encrypt/Decrypt File" option to the context menu for all files.
- Open Notepad.
- Copy and paste the text below.
- IMPORTANT: You must replace the two instances of
C:\\Tools\\FileEncrypt\\FileEncrypt.exewith the actual path where you saved your.exe. Note the required double backslashes (\\). - Save the file as
install.reg(make sure to select "All Files" in the "Save as type" dropdown, not ".txt"). - Double-click the
install.regfile to add it to your registry.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\FileEncrypt]
@="Encrypt/Decrypt File"
"Icon"="C:\\Tools\\FileEncrypt\\FileEncrypt.exe,0"
[HKEY_CLASSES_ROOT\*\shell\FileEncrypt\command]
@="\"C:\\Tools\\FileEncrypt\\FileEncrypt.exe\" \"%1\""Save this file the same way. It's good to keep it in case you want to remove the context menu item.
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shell\FileEncrypt]That's it! After running the install.reg file, you should be able to right-click any file (like a .txt file) and see the "Encrypt/Decrypt File" option.