reconf service using only cmd

Fixing Zabbix on a bunch of Windows machines with local accounts for /F “tokens=1-3 delims=,” %%A in (zz.list) do ( echo %%A %%B %%C net use “\\\C$” %%C /user:%%A\%%B xcopy /q /y “\\\C$\Program Files (x86)\Zabbix Agent\zabbix_agentd.conf” net use “\\\C$” /delete net use “\\\IPC$” %%C /user:%%A\%%B sc \\ stop “Zabbix Agent” sc \\ start “Zabbix […]

SaltStack for Windows updates

Set up WSUS to automatically approve security patches (because it’s the right thing to do), [void][reflection.assembly]::LoadWithPartialName(“Microsoft.UpdateServices.Administration”) $wsus = Get-WSUSServer $class = $wsus.GetUpdateClassifications() | ? {$_.Title -In (‘Critical Updates’,’Security Updates’)} $rule = $wsus.GetInstallApprovalRules() | Where {$_.Name -eq “Default Automatic Approval Rule”} $class_coll = New-Object Microsoft.UpdateServices.Administration.UpdateClassificationCollection $class_coll.AddRange($class); $rule.SetUpdateClassifications($class_coll); $rule.Enabled = $True; $rule.Save() $config = $wsus.GetConfiguration(); $config.TargetingMode = […]

convert DHCP IP to static

ESXi %pre –interpreter=busybox # extract network info from bootup VMK_INT=”vmk0″ VMK_LINE=$(localcli network ip interface ipv4 get | grep “${VMK_INT}”) IPADDR=$(echo “${VMK_LINE}” | awk ‘{print $2}’) NETMASK=$(echo “${VMK_LINE}” | awk ‘{print $3}’) GATEWAY=$(esxcfg-route | awk ‘{print $5}’) DNS=”″ HOSTNAME=$(nslookup “${IPADDR}” “${DNS}” | grep Address | grep “${IPADDR}” | awk ‘{print $4}’) echo “network –bootproto=static –addvmportgroup=true –device=vmnic0 […]

CPU throttling on an Acer Aspire 3000

When running the default (retail) XP SP3 OS, this laptop runs at full CPU speed, and becomes worryingly hot in the process. Since Acer’s e* Management package doesn’t seem to actually do anything, the solution so far is to: Download RMClock Keep only two profiles, 4.0@0.975V and 8.0@1.175V Set profile to “Performance on demand” and […]

Windows 7 updated last night and now it won’t boot!

Start with F8->disable restart on failure, if the bluscreen error is 0x7b then switch your hard drives to IDE mode in BIOS, then edit these two registry keys: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\IastorV “Start” must have a value of 0 (loaded by kernel), it is probably 3 (manual) More details here

Install PHP as FastCGI on XP

1. Do not use the web platform installer. If you already have, uninstall PHP and FastCGI using the Control Panel 2. Download the Non Thread Safe ZIP version from, unpack it in C:\PHP5 3. Download FastCGI from (already included in Windows 7) 4. Add the .php file extension mapping using the IIS manager […]

Schedule a background task in ASP.Net

private static CacheItemRemovedCallback OnCacheRemove = null; protected void Application_Start(object sender, EventArgs e) { AddTask(“DoStuff”, 60); } private void AddTask(string name, int seconds) { OnCacheRemove = new CacheItemRemovedCallback(CacheItemRemoved); HttpRuntime.Cache.Insert(name, seconds, null, DateTime.Now.AddSeconds(seconds), Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, OnCacheRemove); } public void CacheItemRemoved(string k, object v, CacheItemRemovedReason r) { // do stuff here if it matches our taskname, like WebRequest […]

Bad Behavior has blocked 122 access attempts in the last 7 days.