Posts

Showing posts from March, 2012

VBScript Bit-wise Operators

Working with Active Directory  userAccountControl   and VBScript (.vbs files) to check for a disabled account. This is a much better alternative to checking if the account is equal to "514"or "546".  Read on to understand why! (Full VBScript included at the very bottom)  ADS_UF_ACCOUNTDISABLE = 2 UserAccountControl = 514 If (UserAccountControl AND ADS_UF_ACCOUNTDISABLE) = ADS_UF_ACCOUNTDISABLE Then MsgBox UserAccountControl & " = Is Disabled!" Else MsgBox UserAccountControl & " = Is NOT Disabled!" End If The "AND" operator has two meanings in VBScript, depending on how it's used.  "AND" is normally used for  Boolean Logic , such as True AND False; however in VBScript, when used between two numbers, "AND"/"OR" is used as a " Bit-wise Logical Operator ", which is essential for comparing 1's and 0's underlying your decimal values.   The tricky part was knowing to use

VirtualBox Guest Additions Windows 8 Consumer Preview

Image
This worked for me.  Only thing it really provides is screen re-sizing, which if using the experimental Direct3D driver, seems to break Metro.  Do this at your own risk as both Areo Desktop Effects as well as VirtualBox Pointer Integration seem to work just fine out of the box! Take a snapshot of your VM!  This will give you a restore point if anything fails!!! You already have a working 64-bit version of Windows 8 Consumer Preview installed on a 64 bit Host, with Hardware Virtualization Enabled. In the Virtual Machine Settings, make sure the VM is configured with 2D and 3D support, 128MB Video RAM or higher (Machine needs to be powered off to make these changes) Some report that adding a second virtual processor is recommended for performance reasons. Power on Virtual Machine running Windows 8 Consumer Preview 64-bit. Type MSCONFIG from the "Start" home screen, when it lists, run it. If you are not at the home screen, hit CTRL + ESC at the same time. Click the