Boot to Recovery Console. Then:
cd "c:\windows\driver cache\i386"
expand sp1.cab -F:ntoskrnl.exe c:\windows\system32
Saturday, April 21, 2007
Saturday, January 6, 2007
Moo, Moo, Blue Cow
Moo, moo, blue cow,
Have you any milk?
Yes sir, yes sir,
Three buckets full.
One for the farmer,
One for the wife,
And one for the little cat
Who lives in the house.
Created by Jessica Ting, age 4.
Have you any milk?
Yes sir, yes sir,
Three buckets full.
One for the farmer,
One for the wife,
And one for the little cat
Who lives in the house.
Created by Jessica Ting, age 4.
Tuesday, January 2, 2007
Tabbed DNN menu
userootbreadcrumbarrow="false" - Ensures that the arrows do not appear.
leftseparator=" " - If you don't insert a non-breaking space here, the left side of the tab will collapse.
rightseparator=" " - If you don't insert a non-breaking space here, the right side of the tab will collapse.
leftseparatorcssclass="YourClassName" - This is the left-hand side of your tab in its "Off" state, so specifiy a height and width for the class as well as a non-repeating background image.
rightseparatorcssclass="YourClassName" - This is the right-hand side of your tab in its "Off" state, so specifiy a height and width for the class as well as a non-repeating background image.
rootmenuitemselectedcssclass="YourClassName" - This is your Mouseover state for the tabs. By creating this class, you can specify a different rollover state for the Main menu items and the Submenu items.
leftseparatorbreadcrumbcssclass="YourClassName" - This is the right-hand side of your tab in its "On" state, so specifiy a height and width for the class as well as a non-repeating background image.
rightseparatorbreadcrumbcssclass="YourClassName" - This is the right-hand side of your tab in its "On" state, so specifiy a height and width for the class as well as a non-repeating background image.
rootmenuitembreadcrumbcssclass="YourClassName" - This is the body of your tab in its "On" state, so specifiy a height and width for the class as well as a horizontally-repeating background image.
That covers the left and right-hand sides of tabs in both their "On" and "Off" states, as well as the background for a tab in its "On" state.
To achieve the background for the "Off" tabs, apply the tab's background image to the MainMenu_MenuContainer class.
leftseparator=" " - If you don't insert a non-breaking space here, the left side of the tab will collapse.
rightseparator=" " - If you don't insert a non-breaking space here, the right side of the tab will collapse.
leftseparatorcssclass="YourClassName" - This is the left-hand side of your tab in its "Off" state, so specifiy a height and width for the class as well as a non-repeating background image.
rightseparatorcssclass="YourClassName" - This is the right-hand side of your tab in its "Off" state, so specifiy a height and width for the class as well as a non-repeating background image.
rootmenuitemselectedcssclass="YourClassName" - This is your Mouseover state for the tabs. By creating this class, you can specify a different rollover state for the Main menu items and the Submenu items.
leftseparatorbreadcrumbcssclass="YourClassName" - This is the right-hand side of your tab in its "On" state, so specifiy a height and width for the class as well as a non-repeating background image.
rightseparatorbreadcrumbcssclass="YourClassName" - This is the right-hand side of your tab in its "On" state, so specifiy a height and width for the class as well as a non-repeating background image.
rootmenuitembreadcrumbcssclass="YourClassName" - This is the body of your tab in its "On" state, so specifiy a height and width for the class as well as a horizontally-repeating background image.
That covers the left and right-hand sides of tabs in both their "On" and "Off" states, as well as the background for a tab in its "On" state.
To achieve the background for the "Off" tabs, apply the tab's background image to the MainMenu_MenuContainer class.
Labels:
Code
Tuesday, November 28, 2006
Getting DNN 4.x to work on Win2K3 IIS
Download ASP.net 2.0 framework form http://msdn.microsoft.com/netframework/downloads/updates/default.aspx
Then run: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -I
In IIS go to ASP.NET tab and change the asp.net version to 2.0XXX
In IIS click on "Webservice Extensions"
Click on ASP.NET and "allow" it.
Then run: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -I
In IIS go to ASP.NET tab and change the asp.net version to 2.0XXX
In IIS click on "Webservice Extensions"
Click on ASP.NET and "allow" it.
Labels:
Code
Tuesday, November 14, 2006
Minimal Setup of W2K3 VPN with NAT
0) Disable Windows Firewall service
1) Add Remote Access Role with VPN & NAT.
2) Assign private IPs to clients eg 192.168.x.x
3) Include basic firewall.
4) Punch hole in firewall for PPTP port (1723), assign to external IP/NIC in basic firewall
5) Add remote access policy to include windows/AD group for access to VPN
6) Enable name resolution on basic firewall
7) On the VPN server IP properties tab, use the external NIC for DNS queries
1) Add Remote Access Role with VPN & NAT.
2) Assign private IPs to clients eg 192.168.x.x
3) Include basic firewall.
4) Punch hole in firewall for PPTP port (1723), assign to external IP/NIC in basic firewall
5) Add remote access policy to include windows/AD group for access to VPN
6) Enable name resolution on basic firewall
7) On the VPN server IP properties tab, use the external NIC for DNS queries
Labels:
Code
Thursday, October 5, 2006
IE6SP1 WWW_Auth logout Javascript
document.execCommand("ClearAuthenticationCache", "false");
Labels:
Code
Saturday, August 5, 2006
Hibernating/suspending from the command line on Windows XP
Enter:
rundll32 powrprof.dll,SetSuspendState
Whether it hibernates or suspends depends on Control Panel power options.
Attachments:
if (document.getElementById("idAttachmentsTable").rows.length == 0) document.getElementById("idAttachmentsRow").style.display='none';
rundll32 powrprof.dll,SetSuspendState
Whether it hibernates or suspends depends on Control Panel power options.
Attachments:
if (document.getElementById("idAttachmentsTable").rows.length == 0) document.getElementById("idAttachmentsRow").style.display='none';
Labels:
Code
Friday, April 14, 2006
Changing Linux to Text Console Login
Log in to the PC as root.
Edit /etc/inittab
Change the 5 in the line:
id:5:initdefault:
to 3.
The id:5 denotes the runlevel that Linux will boot up into. Runlevel 5 is the graphical login mode. This means that when Linux starts it will go directly into X11. The initdefault stands for the default runlevel. Change this runlevel to 3 for multiuser mode console login.
Edit /etc/inittab
Change the 5 in the line:
id:5:initdefault:
to 3.
The id:5 denotes the runlevel that Linux will boot up into. Runlevel 5 is the graphical login mode. This means that when Linux starts it will go directly into X11. The initdefault stands for the default runlevel. Change this runlevel to 3 for multiuser mode console login.
Labels:
Code
Thursday, December 8, 2005
Windows Tablet as a portable gaming device?
I reckon Microsoft is missing a trick here. They should, in my opinion, push Windows Tablet Edition as a portable gaming platform rather than the lacklustre Windows CE. The larger form factor is much more conducive to immersive gaming and the Windows platform easier to port existing games across than the crippled CE platform.
Thursday, October 27, 2005
VBScript to set all local users' passwords to non-expire
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set colAccounts = GetObject("WinNT://" & strComputer & "")
colAccounts.Filter = Array("user")
For Each objUser In colAccounts
Wscript.Echo objUser.Name objUserFlags = objUser.Get("UserFlags")
objPasswordExpirationFlag = objUserFlags OR ADS_UF_DONT_EXPIRE_PASSWD
objUser.Put "userFlags", objPasswordExpirationFlag
objUser.SetInfo
Next
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set colAccounts = GetObject("WinNT://" & strComputer & "")
colAccounts.Filter = Array("user")
For Each objUser In colAccounts
Wscript.Echo objUser.Name objUserFlags = objUser.Get("UserFlags")
objPasswordExpirationFlag = objUserFlags OR ADS_UF_DONT_EXPIRE_PASSWD
objUser.Put "userFlags", objPasswordExpirationFlag
objUser.SetInfo
Next
Labels:
Code
Sunday, October 23, 2005
Set AD user password to non-expiry
using System.DirectoryServices;using ActiveDs;
//Add reference to COM Active DS TypeLib
static void DontExpirePassword(DirectoryEntry User)
{
int val;
const int ADS_UF_DONT_EXPIRE_PASSWD =0x10000;
val = (int) User.Properties["userAccountControl"].Value;
User.Properties["userAccountControl"].Value = val ADS_UF_DONT_EXPIRE_PASSWD;
User.CommitChanges();
}
//Add reference to COM Active DS TypeLib
static void DontExpirePassword(DirectoryEntry User)
{
int val;
const int ADS_UF_DONT_EXPIRE_PASSWD =0x10000;
val = (int) User.Properties["userAccountControl"].Value;
User.Properties["userAccountControl"].Value = val ADS_UF_DONT_EXPIRE_PASSWD;
User.CommitChanges();
}
Labels:
Code
Wednesday, September 28, 2005
Shutting down remote PCs
Dim oFSO, oTS, sClient, oWindows, oLocator, oConnection, oSys
Dim sUser, sPassword
'set remote credentials
sUser = "Administrator"sPassword = "password"
'open list of client names
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTS = oFSO.OpenTextFile("C:\clients.txt")
Do Until oTS.AtEndOfStream
'get next client name
sClient = oTS.ReadLine
'get WMI locator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
'Connect to remote WMI
Set oConnection = oLocator.ConnectServer(sClient, "root\cimv2", sUser, sPassword)
'issue shutdown to OS ' 4 = force logoff ' 5 = force shutdown ' 6 = force rebooot ' 12 = force power off
Set oWindows = oConnection.ExecQuery("Select " & "Name From Win32_OperatingSystem")
For Each oSys In oWindows
oSys.Win32ShutDown(5)
Next
Loop
'close the text fileoTS.CloseWScript.Echo "All done!"
You should know a couple of things about this script. First, you need to have a text file named C:\Clients.txt on the machine where the script runs. That file should contain the list of client names you want to shut down. Instead of using a text file, you can modify this script to use ADSI, enabling it to query computer names from Active Directory or an NT domain. However, as you probably don’t want to run this script against every computer on your network (shutting down all of your servers might be bad), the text file provides you with complete control over which computers the script will affect.
Dim sUser, sPassword
'set remote credentials
sUser = "Administrator"sPassword = "password"
'open list of client names
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTS = oFSO.OpenTextFile("C:\clients.txt")
Do Until oTS.AtEndOfStream
'get next client name
sClient = oTS.ReadLine
'get WMI locator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
'Connect to remote WMI
Set oConnection = oLocator.ConnectServer(sClient, "root\cimv2", sUser, sPassword)
'issue shutdown to OS ' 4 = force logoff ' 5 = force shutdown ' 6 = force rebooot ' 12 = force power off
Set oWindows = oConnection.ExecQuery("Select " & "Name From Win32_OperatingSystem")
For Each oSys In oWindows
oSys.Win32ShutDown(5)
Next
Loop
'close the text fileoTS.CloseWScript.Echo "All done!"
You should know a couple of things about this script. First, you need to have a text file named C:\Clients.txt on the machine where the script runs. That file should contain the list of client names you want to shut down. Instead of using a text file, you can modify this script to use ADSI, enabling it to query computer names from Active Directory or an NT domain. However, as you probably don’t want to run this script against every computer on your network (shutting down all of your servers might be bad), the text file provides you with complete control over which computers the script will affect.
Labels:
Code
Wednesday, August 24, 2005
Setting a User Account Expiration
Type type = usr.NativeObject.GetType();
Object adsNative = usr.NativeObject;
type.InvokeMember("AccountExpirationDate", BindingFlags.SetProperty, null, adsNative, new object[]{"21/01/2006"});
usr.CommitChanges();
Object adsNative = usr.NativeObject;
type.InvokeMember("AccountExpirationDate", BindingFlags.SetProperty, null, adsNative, new object[]{"21/01/2006"});
usr.CommitChanges();
Labels:
Code
Tuesday, August 16, 2005
Getting PHP to work with MySQL on IIS/W2k3
Make sure that the PHP directory is in the System PATH variable. Only version 5.1.5 works with 64bit W2K3.
Labels:
Code
Subscribe to:
Posts (Atom)


