Thursday, October 22, 2015

Customize the Windows 7 Logon Screen

It's only been 3 years.  Perhaps I should create an update!

How about how to set your own image for your Windows 7 log on screen?  Yes.  I'm still working with Windows 7, so have no idea if this works on 8 or 10.  Sorry for any inconvenience.


Basically, this is for non-domain systems and/or systems where the group policy doesn't interfere.  Insert the following into a text file and rename it, e.g. custom_background.reg:
(omit the --- lines at the top and bottom)

----
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background]
"OEMBackground"=dword:00000001
---

That will ensure the OEMBackground value is set to '1' (as shown above) and if your theme or GP (group policy) resets it, you can easily re-run the file to update it to '1' again.

Next, navigate over to C:\Windows\System32\oobe\info\backgrounds\ (you may need to create the \info\backgrounds folder if it does not already exist) and replace your backgrounddefault.jpg file with one of your choice.  Being sure to match the resolution of your display.  Also, there are a number of naming conventions for the files contained within this folder for purposes of matching various resolutions, which is beyond the scope of this tutorial.

There are a number of small programs that will handle this task for you.  Here is one of themHere is an alternate tutorial covering Windows 7 through 10.

That's it, folks!

Wednesday, January 19, 2011

MS SQL: Updating columns to match another column (different tables)

Updating can be kind of tricky and time consuming if there are a lot of rows being affected.  The task is especially cumbersome, or seems so, when updating a particular column from one table with data in a column from another table.

The simple SQL query to accomplish this is:


update t1
set t1.c1=t2.c1,
t1.c2=t2.c2
from table1 t1
inner join table2 t2
on t1.col=t2.col

In this script example, we are updating table 1 (t1) by setting a column (t1.c1) to the value of the column of table 2's column (t2.c1) - the next line shows another column being updated with the same table two, but using a different column.


Next, we are telling it to take this information from table 1 t1 - the t1 is the alias of table 1.  Then we join table 2 (t2) into the query with the INNER JOIN statement.  The join basically says that table2 is using alias "t2" and that we want column 1 in table 1 to equal column 1 in table 2 for our equality condition to be met.  So, if column 1 in table 1 is apples and column 1 in table 2 is apples and the column we are updating is "price", then we would see something like this:


update t1
set t1.price = t2.price
from table1 t1
inner join table2 t2
on t1.apples=t2.apples

Pretty simple stuff.  Drop me a comment if you have any questions.

Sunday, July 04, 2010

DBCC INDEXDEFRAG and DBREINDEX

DBCC commands are some of the most misunderstood, yet essential to anyone maintaining a MSSQL database.

I work with MSSQL databases daily and found http://blogs.msdn.com/b/teamcenteronsql/ to be indispensable when trying to determine to use DBCC INDEXDEFRAG or DBCC DBREINDEX.

There are some main points to this MSDN blog...

DBREINDEX works to resolve "extent" or physical fragmentation
DBREINDEX uses shared locking, so only SELECT statements can be used
INDEXDEFRAG works to resolve logical fragmentation, but does nothing for physical or "extents"
Physical disk, i.e. the hard drive, defragmentation can cause "extent" fragmentation in the database, so if we are to scan a disk for fragments and decide to defragment that disk, be sure to run DBCC SHOWCONTIG afterwards to see how the "extent" fragmentation holds up and if you will then need to run DBREINDEX to resolve the issues cause by defragmenting the hard disk.

This information helped me and I hope someone else finds it equally useful.

Saturday, February 13, 2010

Rebuilding a MSSQL 2005+ Master Database

When you find yourself unable to log into your Microsoft SQL database - first check that the service is running. If the service is not running, then you might have a corrupt MASTER system database. So then you ask... How do I fix that?

In MSSQL 2000, the task is a bit different because there is a utility in the binn folder that is not present in MSSQL 2005 or greater. To fix/rebuild the master system database, one has to go through the setup process instead.

I've explained how to do this with a command-line command at my www.enkognedo.com site. Just visit there and you will find what I had to do, why most of the on-line resources miss the target a bit, and a resource link to Microsoft that gives more detail.

Here is the link: http://bit.ly/diWPv5

Friday, March 13, 2009

AOL and OpenID

I am not sure why it is so difficult to find the format for using AOL and OpenID or any OpenID for that matter. Not even Wikipedia has this information.

To sign in to a site supporting OpenID with AOL screename credentials, simply use the following format:

openid.aol.com/username

It really is just that simple. Too bad most sites talking about OpenID talk about how to setup your own OpenID - mostly developer speak, but nothing on how to actually login - unless you really dig for it.