3

For a very specific case, I need to install PostgreSQL under Wine to run a Windows application that packs it's own installation of PostgreSQL even if PostgreSQL is already installed, for security reasons.

The installation goes smoothly until it needs to install PostgreSQL. During its installation, PostgreSQL throws an error saying that it does not allow to be installed as Administrator (again, for security reasons).

So my only problem is that Wine reports to the applications it runs as if they were being run by Administrator.

Two possible solutions are:

  1. Make Wine report it's running its applications by another user than Administrator, but still with admin privileges, or;

  2. Force PostgreSQL to be installed and run by Administrator, but as I'm not sure if I really can change any option or argument in this PostgreSQL installation specifically, the solution above is the best choice.

I can't figure out a way to make it. Is it possible?

I would go as far as patching Wine's source code, if necessary.

4
  • Under Windows an installation always runs as TrustedInstaller which has admin privileges. Do you mean to say that you have found a way of installing PostgreSQL under Windows not as admin?
    – harrymc
    Commented Mar 11, 2015 at 15:15
  • I guess the case is different. Under Windows, it installs as a privileged user, yes. In fact it needs those privileges to make changes in folders other than the user's home folder. But I think PostgreSQL checks whether it is being run by the user Administrator itself or not. And that's the problem under Wine, it reports being user Administrator, not only a privileged user, probably as an easy way to bypass TrustedInstaller's needs for admin privileges, as you mentioned. Commented Mar 11, 2015 at 15:23
  • is the app able connect to postgresql using tcp protocol? Commented Mar 11, 2015 at 23:43
  • I'm not sure, but I tried installing PostgreSQL on Linux and try to connect to it from Wine using ODBC, with no luck. But I might have configured it wrong. Commented Mar 12, 2015 at 10:32

1 Answer 1

0

you can try to perform the installation on windows then copy the postgresql database, files and registry to wine.

http://wine-wiki.org/index.php/Advanced_Wine_User_Information#Copying_Software_across_from_a_native_Windows_Installation

1
  • or try to change wine windows version with winecfg to win98 and see if it still sees the user name as Administrator Commented Mar 12, 2015 at 17:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .