More of a statement than a question but I have seen the question enough to share. Compiling Win32::AdminMisc is a pain (especially for Perl 5.10. There were a few steps to it and although posts I have seen on here are helpful they aren't complete. Here are the steps I had to take to be able to compile Win32::AdminMisc on Win32 perl 5.10 running on Windows XP SP3 (a ghetto tutorial) :

Install ActiveState Perl 5.10 installed (duh)
Install Microsoft Visual Studio 6
Install Microsoft Visual Studio 6 SP5
Install Microsoft Visual Studio C++ 6.0 Processor Pack
Install Microsoft Platform SDK for Windows XP SP2

Unzip source code for Admin::Misc unzipped somewhere (will create an include directory). I unzipped it to C: since Roth's code seems to like this for some reason. If you encounter whining about an S drive and a missing directory and you have no drive S just do a "net use s: \\%computername%\c$" so it can make whatever it needs and continue.

Change Line 87 of your Win32Perl.h to "#if PERL_VERSION >= 8" as advised in another perlmonks post (lost the link)

Copy CUString.lib and CUString.hpp (you can get them from Win32-Scheduler_v20000702.tar) to the include directory created when you unzipped your source code

Once all that is done you can compile. %PERL510% in my case c:\perl510 and %SDK% is "C:\Program Files\Microsoft Platform SDK for Windows XP SP2".

Notice you are using the Lib folder under the SDK install not the one installed with Visual Studio.

If you don't reference KERNEL32.LIB on the command line you will see GlobalMemoryStatusEx errors (which are highly annoying)

Here is my full working build line . . . second thought why not just finish it off with a batch :

REM COMPILE WIN32::ADMINMISC set BASE_DIR=c: set SDK=C:\Program Files\Microsoft Platform SDK for Windows XP SP2 set PERL510=c:\perl510 cd %BASE_DIR% cl -MT -LD -EHsc -I"%SDK%\Include" -I"%PERL510%\lib\CORE" -I"%BASE_DIR +%\include" -I"%BASE_DIR%" -DWIN32 -DPERL5008 adminmisc.cpp CDNS.cpp C +FunMap.cpp constant.cpp DNS.CPP CPUID.C Speed.c WinCPUID.c CUString.l +ib WinCPUIDlib.lib \lib\Accounts_Lite.lib %PERL510%\lib\CORE\perl510. +lib "%SDK%\Lib\USER32.LIB" "%SDK%\Lib\ADVAPI32.LIB" "%SDK%\Lib\WSOCK3 +2.LIB" "%SDK%\Lib\KERNEL32.LIB" "%SDK%\Lib\NETAPI32.LIB" "%SDK%\Lib\W +INMM.LIB" "%SDK%\Lib\VERSION.LIB" ADMINMISC.DEF /link /nodefaultlib:l +ibc echo Installing Win32::AdminMisc mkdir %PERL510%\site\lib\Win32 copy %BASE_DIR%\AdminMisc.pm %PERL510%\site\lib\Win32\ >nul mkdir %PERL510%\site\lib\auto\Win32\AdminMisc<br> copy %BASE_DIR%\AdminMisc.dll %PERL510%\site\lib\auto\Win32<br>\AdminM +isc\ >nul echo #!%PERL510%\bin\perl.exe -w > %BASE_DIR%\test.pl echo eval { use Win32::AdminMisc; }; if ($@){ print "Win32::AdminMisc +didn't load : $@\n"; } else { print "Win32::AdminMisc loaded ok\n"; } + exit 1; >> %BASE_DIR%\test.pl perl %BASE_DIR%\test.pl
Watch the line wraps. This should get anyone trying to do this to the point where they are just gathering files and not having to work hard to get back to what they had in Perl 5.8.
I'm a bit surprised that Dave Roth doesn't maintain a ppd for this module since his book which is excellent for Windows Admins uses it extensively. Hopefully this helps someone.

-Matt

In reply to Compiling Win32::AdminMisc on ActiveState 5.10 by ramtek

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.