CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Win32::OLE for Server 2008?

 



jhyland87
Novice

Mar 6, 2010, 10:02 AM

Post #1 of 5 (928 views)
Win32::OLE for Server 2008? Can't Post

Hey, so I work for a small hosting company, and I was trying to make a perl script that would do basic management on remote servers (restarting services, kicking idle session users off, see tasks, basic stuff).

Right now, im at home, on windows 7, testing basic scripts, and I couldnt get the Win32_LogonSession to show whos logged on (just me), the 'name' value keeps returning a blank value.

So upon googling it, I came across this: http://gallery.technet.microsoft.com/ScriptCenter/ru-RU/8a4ac7a7-e893-47cc-a829-053c3fe62301

Quote
Platforms
Windows Server 2008 R2 No
Windows Server 2008 No
Windows Server 2003 Yes
Windows 7 No
Windows Vista No
Windows XP Yes
Windows 2000 No


........ some of the win32 WMI API wont work on 2008/windows 7? What will? what can I use to complete tasks that win32 WMI cant complete on server 08/win 7?

Any ideas?


(This post was edited by jhyland87 on Mar 6, 2010, 10:03 AM)


jhyland87
Novice

Mar 6, 2010, 10:05 AM

Post #2 of 5 (923 views)
Re: [jhyland87] Win32::OLE for Server 2008? [In reply to] Can't Post

.. this can be moved to "Win32 Programming Help"

Didnt see that section, sorry Unsure


FishMonger
Veteran / Moderator

Mar 6, 2010, 1:10 PM

Post #3 of 5 (918 views)
Re: [jhyland87] Win32::OLE for Server 2008? [In reply to] Can't Post


Quote
some of the win32 WMI API wont work on 2008/windows 7? What will? what can I use to complete tasks that win32 WMI cant complete on server 08/win 7?


That depends on what level of access you're wanting and willing to use.

The first and easiest step would be to look over the available cpan modules to which ones will do what you need with the least amount of work on your end.
http://search.cpan.org/modlist/Microsoft_Windows

If you're willing to use low level access, you can use Win32::API to make direct calls to the C libraries in the dll files, which is what some of the higher level Win32::* modules do.


jhyland87
Novice

Mar 6, 2010, 2:18 PM

Post #4 of 5 (912 views)
Re: [FishMonger] Win32::OLE for Server 2008? [In reply to] Can't Post

I have just about all the access I need, so the access level doesnt matter, :)

Im looking at the win32::API, but I dont know much about the C libraries or DLL files, but im poking around.

Any other suggestions?


FishMonger
Veteran / Moderator

Mar 6, 2010, 3:35 PM

Post #5 of 5 (906 views)
Re: [jhyland87] Win32::OLE for Server 2008? [In reply to] Can't Post

That's not the access that I was referring to, but that access is important. I was referring to how much of the work to be done by modules and how much do you want to code yourself.

To use the Win32::API module, you'll want to do some searching in Microsoft's MSDN library.

http://msdn.microsoft.com/en-us/library/default.aspx

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives