Here you go. If you need an action, add it below the echo for if/else.

Hope this helps.

' Shutdown.vbs' Example VBScript to check if computer is laptop or workstation' Author Lance Dobbs' Version 1.1 - July 2009' --------------------------------------If IsLaptop( "." ) Then WScript.Echo "Laptop"Else WScript.Echo "Desktop or server"End IfFunction IsLaptop( myComputer )' This Function checks if a computer has a battery pack.' One can assume that a computer with a battery pack is a laptop.'' Argument:' myComputer [string] name of the computer to check,' or "." for the local computer' Return value:' True if a battery is detected, otherwise False'' Written by Rob van der Woude' http://www.robvanderwoude.com On Error Resume Next Set objWMIService = GetObject( "winmgmts://" & myComputer & "/root/cimv2" ) Set colItems = objWMIService.ExecQuery( "Select * from Win32_Battery", , 48 ) IsLaptop = False For Each objItem in colItems IsLaptop = True Next If Err Then Err.Clear On Error Goto 0End Function

Public Function IsLaptop() As Boolean Dim obj As Object Dim result as Boolean = False Set obj = GetObject("winmgmts://./root/cimv2").InstancesOf("Win32_Battery") For Each battery In obj result = True Next Return resultEnd Function

It’s quite interesting for me as I worked with Excel using vb.net for some time.
Here are some topics which I know want to share with others whom this might help.
First of all if you are working with Excel then you need to Download the Following
…

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash"
After Shake : http://www.videocopilot.net/presets/after_shake/
All lightning effects with instructions : http://www.mediaf…

In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…