Archive for November, 2009

Modify Windows registry using VB script.

Here is an example of a VB script I used to set the domain suffix search list on a Windows machine. I just saved the following in a file with a vbs extension and executed the script.

SET WSHShell = CreateObject(“WScript.Shell”)

WSHShell.RegWrite “HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\SearchList”, “mydomain1.com,mydomain2.com”, “REG_SZ”

Install Windows XP on a laptop without a CD/DVD drive.

The following was done on a machine running CentOS 5.4 and Vmware Workstation 7. I used a Kingwin PATA USB enclosure for a 20GB 2.5” hard drive that came out of a Dell Insprion 4100 laptop.

Download 59874-dos71cd-26343.zip from http://www.syschat.com/download60.html&act=down.

Unzip the file, and burn the DOS71CD.ISO image to a CD. I used K3b on my CentOS 5.4 host.

Remove the laptop hard drive and put it in a USB drive enclosure.

Connect laptop hardrive in USB enclosure.

The drive should have all partitions removed, so the DOS installation can create a partition during install.

Create MS-DOS Vmware instance with the USB drive accessed via a physical drive (The only hard drive for this instance.), and the DOS71CD.ISO image file as the CD device.

Make sure that both have “Connect at power on” checked.

Boot the CD/ISO by powering on the newly created Vmware instance.

Go through the installation process and allow the installation to create the boot partition and install the MBR and install Smartdrv.

Once the installation is completed, verify that the USB drive boots by unchecking “Connect at power on” for the CD.

Boot the drive up to verify is boots DOS.

Power down the Vmware instance.

Then, copy the I386 directory from the Windows XP CD to the USB drive. I did this from my CentOS 5.4 Vmware host.

Remove the hard drive the enclosure, and put it back in the laptop.

Boot the laptop into DOS. Note: This did not work for me. I had to boot off a floppy and use “fdisk /mbr” to fix the Master Boot Record. Once, I did this things went pretty quickly.

Run smartdrv. Note: This made a huge difference.

Cd i386.

Run winnt.exe.

This will take quite a while (hours even, although not so in my case). It will even appear stuck on the copying files screen, but it will still be working.

I had to boot a few times during the XP install during the copying files stage. It looks like the install also repaired the boot loader. Nonetheless, in the end it is working fine.

Create Firefox policies in Windows Server 2008

I used the following procedure to be able to create and manage Firefox via Windows Server 2008 Group Policies. I used a solution provided by FrontMotion (http://www.frontmotion.com). I used the Firefox Community Edition which is Firefox packaged as an msi for deployment from an Active Directory. Use it for deployment, but instead wanted to manage Firefox browser setting via a Group Policy.

I started on my Windows 2008 Server, by download the firefox.adm (Administrative Template) from http://www.frontmotion.com/Firefox/firefox.adm.

Then from the Group Policy Management, clicked on “Group Policy Objects” and then “Default Domain Policy,” since I wanted to implement these policies for the entire domain. From here, click on the “Settings” tab, and right mouse click in the “Settings” windows pane and select “Edit.” This will bring up the “Group Policy Management Editor.”

Click to expand “User Configuration”/”Policies.” Note: You put this in the “Computer Configuration” as well.

Right mouse click “Administrative Templates: Policy definitions (ADMX files) retrieved from the local machine.” and select “Add/Remove Templates.”

Click “Add” and navigate to where you saved the firefox.adm you download earlier to add the adm.

This will add the Firefox policies to “User Configuration”/”Policies”/”Administrative Templates”/”Classic Administrative Templates.”

From here, you can set your policies. Such “Cache” and “Proxy Settings.”

When you are done, exit out of the “Group Policy Management Editor.”

From “Group Policy Management”, you should be able refresh (right mouse and hit “Refresh”) the “Default Domain Policy.” I closed “Group Policy Management” and re-opened it.

Once refreshed, you be able to see the new policies under “Default Domain Policy”/”User Configuration”/”Administrative Templates”/”Firefox.”

Now the policies are set.

Onto the client. As I mentioned before, I did not use the FrontMotion solution to deploy Firefox. I just installed the msi download from FrontMotion (http://www.frontmotion.com/Firefox/download.php?fileid=3652). Then, to test my policies, I logged in as a domain user. All of my policies were set.

Snow Leopard – Enable 64 bit

To enable the 64 bit kernel, hold the 6 and 4 keys while booting. Likewise, to enable the 32 bit kernel (if it is not your default), hold down the 3 and 2 keys while booting. By default, Snow Leopard has the 32bit kernel enabled to provide better application support until developers have ported their applications over to 64bit.

To permanently make the 64bit kernel your default enter the following from a Terminal session.

Update:
This didn’t work for me.
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.Boot ‘Kernel Flags’ ‘arch=x86_64’

However, this did:
nvram boot-args=”arch=x86_64″

To verify the kernel you are running, click on the Apple symbol in the top left corner and client “About this Mac.” Then, click “More Info…” and then Software. Look for the following:

64-bit Kernel and Extensions: Yes

If running the 32-bit kernel, it would read the following:

64-bit Kernel and Extensions: No

Return top

INFORMATION