32/64-bit detection


The Codebase of RichCopy version 4.0 is completely different from version 3.x. RichCopy 3.x consists of COM components, and the UI is a just an interface for COM components. It supports automation and shell scripting; however component registration is required, and it is not light enough on Vista because of UAC. RichCopy version 4.0 is designed to run standalone and actually without updating registries or installing multiple components. If you copy RichCopy.exe or RichCopy64.exe into your working directory, and then it should run.
32/64-bit detection: RichCopy.exe determines whether the platform is 32-bit or 64-bit. On a 64-bit platform and RichCopy64.exe is present, and then RichCopy64.exe is executed instead. Here is actual code RichCopy uses.

hKernel32  = GetModuleHandle(TEXT(“kernel32.dll”));
 if (hKernel32)
 {
  pIsWow64Process   = (LPISWOW64PROCESS)GetProcAddress(hKernel32, (LPCSTR)”IsWow64Process”);
  pGetNativeSystemInfo = (LPGETNATIVESYSTEMINFO)GetProcAddress(hKernel32, (LPCSTR)”GetNativeSystemInfo”);
  if (pIsWow64Process)
   (*pIsWow64Process)(GetCurrentProcess(), &fWow64);
  if (pGetNativeSystemInfo)
   (*pGetNativeSystemInfo)(&si);   FreeModule(hKernel32);
 }
 else
 {
  GetSystemInfo(&si);
 } …..
  if ((sizeof(LONG_PTR) == sizeof(DWORD)) &&
  (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64))
 {

Comments (4)

  1. Robert W says:

    Great to see more information on this awesome tool. I was wondering if you might cover anything on how to actually use it as a scheduled task? 🙂

  2. Anonymous says:

    I did the full install of RichCopy 4.0.217.0 onto my Windows 2008 R2 (64-bit) server.  

    I had problems using richcopy.exe from the command line on Windows 2008 R2 (64-bit).  I would see the logo, and the program would abruptly end without copying anything, and it did not log anything.  No errors or messages came up.  

    Once I started using richcopy64.exe explicitly in the command all was well.  

  3. WinTakeAll says:

    A bug in RichCopy's 64-bit support: If doesn't find and load RichCopy64.exe unless it's started with a full path (i.e. click on the Start Menu item) or run "C:Program Files (x86)Microsoft Rich ToolsRichCopy 4.0RichCopy.exe). Try CDing to the directory with RichCopy and RichCopy64 your current directory and type just RichCopy on a 64-bit machine and it will fail to launch RichCopy 64.

Skip to main content