Tag Archives: Windows

Change Computer Name to Serial

Little Windows VBS script to pull Dell BIOS serial tags into Computer Names. I pulled this from an old backup, since it got removed a long time ago for whatever reason.

strUser = "Administrator"
strPassword = "P@ssw0rd"

Set objNetwork = CreateObject("WScript.Network")
	strComputer = objNetwork.ComputerName

Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _
	strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" & _
		strComputer & "'")

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
For Each objItem in colItems
	strMsg = objItem.Caption
	If strMsg = "Microsoft Windows XP Professional" Then

		winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//."
		'WScript.Echo winmgmt1
			Set SNSet = GetObject( winmgmt1 ).InstancesOf ("Win32_BIOS")
			for each SN in SNSet

				If SN.SerialNumber = strComputer Then
					MsgBox "Computer name already set! Name is: "& strComputer
					Wscript.Quit
				End If

				If SN.SerialNumber = "" Then
					MsgBox "Problem with computer naming!"
					Wscript.Quit
				End If

				ErrCode = objComputer.Rename(SN.SerialNumber, strPassword, strUser)

				If ErrCode = 0 Then
					MsgBox "Computer renamed successfully to: "& SN.SerialNumber
				End If

			Next

	End If
Next

BBSLink Client

If you have heard of or came across http://bbslink.net/ and wanted to add the services door games to your BBS but find that they only offer a javascript file for Synchronet BBSes then this might help you out.

I recently joined and not having a Synchronet BBS I had to make my own client to work with their service. It is written in C# against .NET 2.0 and *might* work in mono on Linux. You will have to test.

Local Binary: BBSLink Door Binaries
Local Source: BBSLink Door Source Code

Windows 8.1 KB2919355 Failed

I got an error installing KB2919355 on a Windows 8.1 Pro clean install.

Most people can fix this error by doing the following in the console:

First

64bit: DISM /online /remove-package /packagename:Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14
32bit: DISM /online /remove-package /packagename:Package_for_KB2919355~31bf3856ad364e35~x86~~6.3.1.14
RT: DISM /online /remove-package /packagename:Package_for_KB2919355~31bf3856ad364e35~arm~~6.3.1.14

Second

DISM /online /cleanup-image /startcomponentcleanup

Third

DISM /online /cleanup-Image /restorehealth

After searching up the error and running through log files, running all of the commands Microsoft suggests, and all of the tools they suggest I run, I found the log file this update creates.

After digging through it, I found the line saying that the folder “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools” was missing. Well I remember that I removed this empty folder while cleaning up the Start Menu.

I recreated this empty folder and the update installed instantly. I believe this should re-create the folder automatically, but if your having this issue, check the folders.

Maintain SSH Tunnel Linux & Windows

“With SSH an encrypted tunnel through an open port in the private network’s firewall can be established. This tunnel forwards network traffic from a specified local port to a port on the remote machine, securely.”

Just a reference to help some others. Create a persistant port forwarding tunnel between a Linux (server) machine and a Windows (server) machine.

Full site here, lots of information: http://pdw.weinstein.org/2011/07/establish-and-maintain-an-ssh-tunnel-between-linux-and-windows.html.

WDS Mixed Mode DHCP Config

Update: I found that my core switch was the problem. Replaced, and it’s working.

Problem:
Switch is a generic 24-Port Gigabit network switch, no routers between hosts, no gateways except to exit my subnet and to the Internet.

I currently have a physical machine running Windows 2003 R2 Standard, running as a small DHCP, DNS, and AD Server.

I have two pysical machines running ESXi Hypervisor. On one of the ESXi servers I am running four virtual machines. They work fine. On the other I just setup a single virtual machine for now, and it is running Windows 2003 R2 and RIS+WDS (WDS Mixed Mode).

I then boot a laptop on the same network, hit F12 for network boot menu in the BIOS choose Network and hit enter, the laptop gets a DHCP address and then tries to Forward me to the ProxyDHCP running on the WDS server. It fails, “WDS Service could not be found.” Then it prompts me to hit F12 to actually start the RIS+WDS Menu, hit that, and it crashes, cannot find \Boot\BDE.

I then setup a VM on the same ESXi host as the WDS server, boot up a new VM and hit F12, instant gets DHCP, no forward to ProxyDHCP bullshit and hit F12 again to start menu. Works great.

I then setup a VM on the opposite ESXi host as the RIS+WDS server. Same results as the laptop.

Seems to only work within the same vSwitch. So I changed out network cards as it was easy, and no huge configuration changes. Same results.

I then did the following on the Windows 2003 R2 DHCP server:

“Running WDS in a mixed mode configuration, and after reading everything needed to add PXEClient to a domain controller running the DHCP service in Windows 2003 R2.”

This post helped out quite a bit: http://felixyon.blogspot.com/2010/12/remote-installation-service.html

Did nothing, and I have since removed the option.

I then decided to take ten minutes and swap out the core switch that I am using, dropped in a Cisco I have lying around and cleared the config, setup as a flat switch same as the other, tried the laptop, instant DHCP, no ProxyDHCP loads menu, done.

Tried the VM that was not working, instant done. Tried the VM that was working, still is.

It seems that this switch is blocking DHCP requests after the first has passed and will not allow clients that just got a DHCP address to hit another DHCP server to get PXE details.

Post Navigation