From Walke at demogr.mpg.de  Fri Aug 13 11:29:25 2004
From: Walke at demogr.mpg.de (Walke, Rainer)
Date: Fri Aug 13 11:29:28 2004
Subject: [Rd] (PR#7163) Install packages does not work on Win2003 serv er
Message-ID: <3699CDBC4ED5D511BE6400306E1C0D81074CBBFF@hermes.demogr.mpg.de>


	>Why don't *you* know?  It is install.packages, surprisingly enough,
in its
	>internal function unpackPkg, and running that under debug would
show you
	>what is going on.  Once again, remember only you can do this as we
cannot 
	>reproduce your claims.

	>Do remember you have already been told that you are using an
unsupported 
	>OS, and quite possible a file system that has never been tested and
is not 
	>supported by the compilers we use to build R.

	>One possible issue is that code uses

>  >               file.rename(file.path(tmpDir, curPkg), instPath)
> 
	>Internally that boils down to

	>int Rwin_rename(char *from, char *to)
	>{
	>    int res = 0;
	>   OSVERSIONINFO verinfo;

	>    verinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
	>    GetVersionEx(&verinfo);
	>    switch(verinfo.dwPlatformId) {
	>    case VER_PLATFORM_WIN32_NT:
	>	res = (MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING) ==
0);
	>	break;
	>    default:
	>	if (!DeleteFile(to) && GetLastError() !=
ERROR_FILE_NOT_FOUND)
	>	    return 1;
	>	res = (MoveFile(from, to) == 0);
	>   }
	>    return res;
	>}

	>Now, what your unsupported OS reports for dwPlatformId is
undocumented in 
	>the MinGW header files (and in the VC6 docs), and your OS did not
exist 
	>when that was written.  Given the choices

	>#define VER_PLATFORM_WIN32s 0
	>#define VER_PLATFORM_WIN32_WINDOWS 1
	>#define VER_PLATFORM_WIN32_NT 2

	>it is the third according the Microsoft's current Platform SDK, but
is 
	>that correct (it seems to predate the release of your OS)?  Please
check 
	>it for us.

	>BDR

	
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/bas
e/osversioninfo_str.asp
	says that VER_PLATFORM_WIN32_NT denotes
	WinNT, Win2000, WinXP and Win2003 Server

	dwMinorVersion is different 
	Windows Server 2003	2
	Windows XP			1
	Windows 2000			0
	Windows NT 4.0			0

	dwMajorVersion
	Windows Server 2003	5
	Windows XP			5
	Windows 2000			5
	Windows NT 4.0			4

	Further I checked
	
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base
/movefileex.asp
	about the movefileex command:
	Client: Requires Windows XP, Windows 2000 Professional, or Windows
NT Workstation.
	Server: Requires Windows Server 2003, Windows 2000 Server, or
Windows NT Server.
	Unicode: Implemented as Unicode and ANSI versions.
	Header: Declared in Winbase.h; include Windows.h.
	Library: Use Kernel32.lib.
	It seems that MoveFileEx should work without any change on NT, W2000
WinXP and Windows 2003.
      Now I think it is more a Windows than a R problem.
	Rainer Walke



+++++
This mail has been sent through the MPI for Demographic Rese...{{dropped}}


[Rd] (PR#7163) Install packages does not work on Win2003 serv er
Walke, Rainer