I am new to GnuPG, I want to change my gpg keyring location from Home: C:/Users/Rohan/AppData/Roaming/gnupg to C:\Program Files (x86)\GnuPG\bin, on internet there is some method to do it but I am not getting it because there are some solution based on older gpg version.


I want to place my keyring(pubring.kbx file which contains both public key and private key) to gpg.exe path like C:\Program Files (x86)\GnuPG\bin
My gpg command string is like:
--homedir "C:\Program Files (x86)\GnuPG\bin" --pinentry-mode loopback --passphrase-fd 0 --output E:\sample.txt --decrypt E:\sample.txt.gpg
So when I run gpg decryption process from C# program it will fetch the secret key from gpg.exe location C:\Program Files (x86)\GnuPG\bin

What I tried to do but I got gpg:decryption failed:No secret key
tried to copy all files from the location C:/Users/Rohan/AppData/Roaming/gnupg to C:\Program Files (x86)\GnuPG\bin
Any suggestion will be helpful to me.