File Decryption At Boot and Then Encrypt Again

Hi All,

Hope you are fine. I just have a different situation. Now i am connecting OpenVPN by autoscript at boot. It connects automatically. But as you know you need put Credentials to a TEXT file in your PC. For this reason i encrypted by credentials. My scenario is like this:

Windows → Booting → File Decryption → OpenVPN Connect → Connection Established → File Encryption

I couldn’t find a way how can i do this.

P.S: I configured OpenVPN AutoConnect with Task Scheduler (with When I log in option). With this reason, i think i need to change trigger of VPN connection.

Could you please help me about this issue?

Thanks in advance…

Hi,

this sounds more like a scripting issue. You can use GnuPG on the command line “gpg --decrypt” and “gpg --encrypt”

So to me it sounds like you want to create a script that does all your steps and then put the script into the task scheduler. You might want to pass --homedir option to gnupg so that it finds it’s data / keys when it is run from the scheduler.

Documentation about the command line interface can be found at: https://gnupg.org/documentation/manuals/gnupg/

If you want to provide a passphrase for your decryption key in the script please note:
https://wiki.gnupg.org/TroubleShooting#Passphrase_on_the_command_line

Regards,
Andre