GPG4Win Executes through Personal (having admin rights ) account only
Closed, InvalidPublic

Description

Hi,

I have installed gpg4win on windows server. I have admin rights and when i installed, i run exe as administrator.
i created keys in kleopatra. When i run batch files by double clicking on it, it works fine. If same batch file execute by other user then it does not work. It seems exe search for public or private key here => C:\Users\dharav\AppData\Roaming\gnupg
If any user import this public keys through kleopatra then it works for that user as well.

Is there a way that we can install ones and system account (service runs on system account) and other user can access this?

I export both public and private keys and stored in the E:\Test\ folder.
My gpg exe file stored in E:\Software\PGPWin\GnuPG\bin\ location

code in batch file:

set path=%path%;"E:\Software\PGPWin\GnuPG\bin\"
gpg --logger-file "D:\gpglog.log" --pinentry-mode loopback --batch --no --force-mdc --passphrase-file "D:\PassCode.txt" -d -o "D:\ERP_Export.txt" "D:\Encrypt_ERP.txt"

Being a new bee, i am not able to understand the workflow of the GPG4WIN and its set up.

Please Advise.

Thank You
Dharav

Dharav9 created this task.Oct 14 2020, 6:58 PM
Dharav9 created this object in space S1 Public.
werner added a subscriber: werner.Oct 14 2020, 7:32 PM

Please understand that this is a bug tracker and not a support line.

If you need support you may

  • Write to the public mailing list gnupg-users at gnupg dot org (if you have some patience you don't need to subscribe)
  • Choose a service company (see https://gnupg.org/service.html)
glr added a subscriber: glr.Oct 16 2020, 2:32 PM

@werner , if you would like some help moderating this bug tracker, I don't mind volunteering to do it.

werner added a comment.Tue, Jan 5, 9:42 AM

@glr thanks for the offer. Right now the number of support requests is low enough that we can handle them during the normal triage.

werner closed this task as Invalid.

I think the option you are looking for is "--homedir" with that option on the command line you can redirect where GnuPG looks for options and keys.

Usually the gnupg data is stored under %APPDATA%/gnupg

So if you add something like "gpg --homedir c:\users\yourusername\appdata\roaming\gnupg" to your command line call from the scheduler or system execution then it should work. But there might be permission problems of course if you try to write into that so maybe better set up a shared homedir outside the users folder.