“Windows: Software Requirements
Microsoft Windows Server 2003/X64 64BIT (US English version)”
(Installation Guide TREX 7.1)
— Really?! 🙂
If you have ever tried to install TREX 7.1 on a non-English Windows, you very probably have stumbled over the annoying installation error saying
SetupException: >>>ERROR:Can only install with administrator/root priviliges
This error can be seen in the install.log, which is the first point to check in case of installation errors, as the sapinst.log is, hm, “a bit more abstract” in such a case:\tx_trex_content\TX_WINDOWS_X86_64
Let’s see… (lines 333 & 334):
if not options.currentuser.isadmin():
("Can only install with administrator/root priviliges (current: %s)"
Here we go: Obviously the method isadmin returned false – where in fact I, the currentuser, was an admin. So we look out for this funny method isadmin, that is we are looking for some python file with “def isadmin” in it.
And here we go again: Searching with a tool of your choice (I prefer WinRAR for it’s flexibility to search especially in JAR files – normally I’m looking out for Java stuff) brings up exactly two files: cloneInst.py and setuplib.py.
The first one is well know for having the task to clone one existing TREX installation in case of installing a TREX cluster on different hosts. This was not the case during the initial installation trial. Looking into the second brings up these two lines:
self.logger.log('checking local administrators',silent=1)
Ahhh! It checks if my, the current user’s, name can be found within the group “Administrators“. And no, on a German Windows (and I expect on all or at least almost all non-English versions) this group does not exist. On a German Windows, it is named “Administratoren“. Before just changing this line, let’s go and see if this “Administrators” string literal occurs more often.
Again, we’ll find the same two suspects as before, and within setuplib.py there are six references all together. One of them has an adjoining line with some other suspicious string literal:
self.hostusergroup = self._Group('Users')
Also this group name is unknown on a German Windows; there it is called “Benutzer“. At least, this is the only reference to this group name.
And – that’s all. Changing these string literals is sufficient to install TREX on a non-English Windows! In case of cluster installations, one also has to care about the “Administrators” string literals in cloneInst.py, but that’s it.
And that this is also running on a German Windows 7 x64 (Ultimate, at least) – who will be surprised by that?! 🙂
PS: I may quote Microsoft: “Well-behaved globalized applications should not have a problem, as they should refer to these well-known groups or accounts in a language-independent fashion using well-known SIDs.” For example, the “Administrators” group’s SID is always “S-1-5-32-544″…