So What Do I Do?

Work With Computers Of Course...

Adam

At work, I strive for continuous self-improvement and make a study of each new subject my job touches. My entire professional life has been focused on technology.

Something that gives me great joy is sharing some of the knowledge I've stumbled upon over the course of my life. Below are a few Tips and Tricks I have recently learned on the job (or maybe at home - I can't get enough).

 

Tech Tricks and Tips

Nice SharePoint Walk Through

Author: Adam T. Anthony

Performance Testing For SQL Server - Free

Author: Adam T. Anthony

Save The Day With NTFSRESIZE

Author: Adam T. Anthony

If you have an NTFS partition you’d like to shrink or grow, then ‘ntfsresize’ can help.  I won’t write a how to – there’s plenty out there, including the man page.

http://en.wikipedia.org/wiki/Ntfsresize

 

It’s on the default ubuntu bootable CD – download that and you have everything you need, including the the unix style fdisk  for adjusting the partition table after you’ve resized the file system.

http://www.ubuntu.com/

 

Don't Get Pounded by the #

Author: Adam T. Anthony

 

It’s the # in your username!  : : http://blogs.msdn.com/astebner/archive/2009/03/06/9463700.aspx

 

 

Event Type:        Error

Event Source:    MsiInstaller

Event Category:                None

Event ID:              11406

Date:                     10/12/2009

Time:                    1:32:38 PM

User:                     BKST#aanthony

Computer:          DEMANDDEVSRVR

Description:

Product: Microsoft .NET Framework 3.5 SP1 -- Error 1406.Could not write value InstalledBy to key SOFTWAREMicrosoftUpdatesMicrosoft .NET Framework 3.5 SP1KB953595.  System error .  Verify that you have sufficient access to that key, or contact your support personnel.

 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Data:

0000: 7b 43 45 32 43 44 44 36   {CE2CDD6

0008: 32 2d 30 31 32 34 2d 33   2-0124-3

0010: 36 43 41 2d 38 34 44 33   6CA-84D3

0018: 2d 39 46 34 44 43 46 35   -9F4DCF5

0020: 43 35 42 44 39 7d         C5BD9} 

 

Tomorrow

Author: Adam T. Anthony

set yy=%DATE:~10,4%

set mm=%DATE:~4,2%

set dd=%DATE:~7,2%

set /a "yy=10000%yy% %%10000,mm=100%mm% %% 100,dd=100%dd% %% 100"

if %yy% LSS 100 set /a yy+=2000 &rem Adds 2000 to two digit years

set /a JD=dd-32075+1461*(yy+4800+(mm-14)/12)/4+367*(mm-2-(mm-14)/12*12)/12-3*((yy+4900+(mm-14)/12)/100)/4

set /a JD=%JD%+1

set /a L= %JD%+68569,     N= 4*L/146097, L= L-(146097*N+3)/4, I= 4000*(L+1)/1461001

set /a L= L-1461*I/4+31, J= 80*L/2447,  K= L-2447*J/80,      L= J/11

set /a J= J+2-12*L,      I= 100*(N-49)+I+L

set /a YYYY= I,  MM=100+J,  DD=100+K

set MM=%MM:~-2%

set DD=%DD:~-2%

set TOMORROW=%MM%/%DD%/%YYYY%

echo %TOMORROW%

 

Network Access Protection

Author: Adam T. Anthony

Access Corrupt or Damaged Windows Event Log Files

Author: Adam T. Anthony

Microsoft’s tools failed where FSPRO’s Event Log Explorer succeeded!

Thanks!

 

http://www.eventlogxp.com/

 

Install the Latest Adobe 9 Reader By GPO

Author: Adam T. Anthony

It is not as easy as it sounds…

 

Go to http://kb2.adobe.com/cps/404/kb404146.html - it gives you some of the information you need.

 

Follow the link there to sign up and agree to the distribution agreement. 

 

Adobe will send you an email to confirm you are who you say you are.

 

Then, they send you an email with links to ‘special’ copies of the software.  Their site says this can take up to 3 days, but it took 10 minutes for me.

 

When you get the email with the links to the software, scroll down to the “updates” link.

 

From the “updates” page, select “Adobe Reader – Windows” from the drop down, and click “Go”.  (Adobe Reader For – Macintosh is the default – pahsssss)

 

Download the following: 

                Adobe Reader 9.1 - multiple languages

                Adobe Reader 9.1.3 update - Multiple Languages

Adobe Reader 9.1.2 Update - Multiple Languages

Adobe Reader 9.1.1 Update - Multiple Languages

+ any other updates that are available when you read this

(The updates are incremental)


Follow the instructions at http://kb2.adobe.com/cps/404/kb404146.html to get the MSI and CAB files. 

 

Put the MSI, CAB and the three MSPs (or as many as were available) in a directory together.  Important:  make sure the user group ‘everyone’ has full security rights on that directory.

 

Go to the command line, and change to that directory.  Execute the following commands – accept all defaults for the GUIs that pop up:

 

C:someDirectory>msiexec /a AcroRead.msi /p AdbeRdrUpd911_all_incr.msp

C:someDirectory >msiexec /a AcroRead.msi /p AdbeRdrUpd912_all_incr.msp

C:someDirectory >msiexec /a AcroRead.msi /p AdbeRdrUpd913_all_incr.msp

 

You will notice that the timestamp on the MSI will change with each command.

 

The resulting MSI + the original CAB file is your fully patch / fully up to date Adobe Reader package, and is GPO deployable.

 

SQL Mail With SQL 2000

Author: Adam T. Anthony

SQL Mail with SQL 2000 requires Outlook 2000, SP3 – but keep reading…

 

To patch Outlook 2000 to SP3, you must first update to Outlook 2000-SR1.

 

Microsoft no longer provides a stand-alone Office 2000 SR1 patch (that works).  But, you can get the admin pack and patch your install source with this command:

                msiexec /A "D:YOUR_OFFICE2KCD1_SRCDATA1.MSI" /p "D:YOUR_SR1_ADMIN_PATCH_SRCDATA1.MSP" SHORTFILENAMES=1

Then you can patch your actual installation from your patched source.

                msiexec /i "D:YOUR_OFFICE2KCD1_SRCDATA1.MSI" REINSTALL=ALL REINSTALLMODE=vomus

Oh, but wait… there’s more…

 

The MSSQLSERVER and SQLSERVERAGENT services must be running as an actual user (not SYSTEM).  You must login (to windows) as that user and create an Outlook (MAPI) mail profile from the user’s session.

 

AND… Outlook must be configured in the “Corporate or Workgroup” mode, or the message will end up in your inbox until Outlook is started.  Yea, they’ll just sit there.  Why do they go to your inbox?  I don’t know. (this was my final stumbling block!)

 

AND…  Make sure you have a real mail account – you can’t just push mail on your POP server, because outlook will attempt to send AND RECEIVE and will get hung up on the receive.

 

 

You can test your SQL Mail configuration with the following command (fill in your email address).

 

exec master.dbo.xp_sendmail @recipients='nobody@nowhere.com', @subject='Nothing…', @message='Oh, nevermind!'

 

 

 

Before your write to Microsoft and complain about all this, remember – you’re working with software from 10 years ago!

 

 

Autologon Trouble After GPO Change

Author: Adam T. Anthony

Auto logon (autologon, autologin, auto login) unexpectedly didn’t work on about 400 machines overnight.  Ouch!  No changes were made to the systems that related to login rights, and the autologon values were unchanged in the registry.

 

It was other changes, namely computer policies, delayed the boot process.  The delay was enough to allow the screen saver to come on during the application of computer settings.  Having the screen saver up before auto logon seems to prevent it.

 

You can reproduce the problem by setting HKEY_USERS.DEFAULTControl PanelDesktop"ScreenSaveTimeOut"="60" (1 minute) and linking in a long computer startup script.

 

HKEY_USERS.DEFAULTControl PanelDesktop applies to the console session pre-login.

 

To prevent the Screen Saver from interfering with your autologon settings, make the following Registry Changes:

 

[HKEY_USERS.DEFAULTControl PanelDesktop]

"ScreenSaverIsSecure"="0"

"ScreenSaveTimeOut"="0"

"ScreenSaveActive"="0"

 

You may also want to turn off screen savers for all other users.  That can be done with simple built in GPO settings.

 

Connect With VNC Quickly

Author: Adam T. Anthony

 

If you need to connect many machines with VNC, write a batch file with the following command.

 

start c:PATH_TO_VNCvncviewer.exe /shared /password VNCPASSWORD /scale 1/2 192.168.1.1

 

 

( /scale 1/2 make the window 1/2 size)

 

(THANKS K.M.)

 

How To Fix It

Author: Adam T. Anthony

…reboot.

 

 

Install Windows Vista or Windows 7 From USB

Author: Adam T. Anthony

Here’s a step-by-step:

 

http://www.intowindows.com/how-to-install-windows-7vista-from-usb-drive-detailed-100-working-guide/

 

I haven’t tried booting the USB stick yet, but I’m on the final step – copying from DVD to USB.  The only gotcha that I hit was that my work station is Vista 32, and my Windows 7 source was 64; BOOTSECT.EXE was not compatible.

 

 

Test SYSTEM User Account

Author: Adam T. Anthony

If you want to do some test runs as the built-in SYSTEM user, you can get a command prompt to run under the system context by using the AT scheduler.

 

at 12:03 /interactive “cmd.exe”

 

 (the cmd.exe window, running in the SYSTEM user context, will appear on the console of the target machine at the time specified)

 

RUNAS Without a Password

Author: Adam T. Anthony

runas /savecred /USER:DOMAINusername "cmd.exe 1"

/savedcred – first run attempt as user will prompt for password, but saves the password. Subsequent attempts use stored password.

You can check what passwords are saved in your current login context with the command:

rundll32.exe keymgr.dll, KRShowKeyMgr

How to Tell What SQL Version You're Running

Author: Adam T. Anthony

Convert an Index.dat File to Text

Author: Adam T. Anthony

If you want to export your index.dat file to text for analysis, try “pasco” from the ODESSA project.

 

There are a lot of index.dat browsers out there, but this is the only tool I could find that lets you convert the index.dat file to a TXT file.  All from the command line too.

 

http://sourceforge.net/projects/odessa

 

PSEXEC Won't Run as SYSTEM

Author: Adam T. Anthony

The problem is, psexec requires you to accept a license / eula.  If you run it as a regular user, you get a pop-up.  You can also accept the license using the /accepteula parameter.  I got the SYSTEM user to accept the eula by scheduling a task with the AT command:

 

at 05:00 /interactive /every:m,t,w,th,f,s,su "c:yourdirectorypsexec.exe" /accepteula

 

After that, I went to the task scheduler, right-clicked the new task and selected run.  PSEXEC can then be run by the system user.

 

(I deleted the temporary task after that)

 

Transaction Logs Are Too Big To Backup

Author: Adam T. Anthony

Oh no, you forgot to backup your transaction logs and now you don’t have enough space to do it.  No worries, just execute this query:

 

dbcc shrinkfile(YOURDATABASE_log,1)

BACKUP LOG YOURDATABASE WITH TRUNCATE_ONLY

DBCC SHRINKFILE(YOURDATABASE_log, 1)

 

(Thanks Rick B.)

 

How to Move Event Viewer Log Files to Another Location

Author: Adam T. Anthony

To move Event Viewer log files to another location on the hard disk, follow these steps:

  1. Click Start, and then click Run.
  2. In the Open box, type regedit, and then click OK.
  3. Locate and click the following registry key:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEventlog

  1. Click the subkey that represents the event log that you want to move, for example, click Application.
  2. In the right pane, double-click File.
  3. Type the complete path to the new location (including the log file name) in the Value data box, and then click OK.

    For example, if you want to move the application log (Appevent.evt) to the Eventlogs folder on the E drive, type e:eventlogsappevent.evt.
  4. Repeat steps 4 through 6 for each log file that you want to move.
  5. Click Exit on the Registry menu.
  6. Restart the computer.

(From http://support.microsoft.com/kb/315417)

WSE032: There was an error loading the microsoft.web.services2 configuration section

Author: Adam T. Anthony

Oh no – you’re getting “WSE032: There was an error loading the microsoft.web.services2 configuration section”!!!

 

No worries.  Just install “Web Services Enhancements (WSE) 2.0 SP2 for Microsoft .NET”

 

Download it here:

 

http://www.microsoft.com/DownLoads/thankyou.aspx?familyId=fc5f06c5-821f-41d3-a4fe-6c7b56423841&displayLang=en

 

I’ve also seen that adding the local host name to the host file works.  I can’t see how, but this is what I read was suggested:

 

Before:

          127.0.0.1       localhost

After:

          127.0.0.1       localhost     actuallocalhostname

See How Fast the Internet Is Today

Author: Adam T. Anthony

Folders Open In New Window - XP

Author: Adam T. Anthony

From an XP Explorer window, if you double click a file folder, the default behavior is that the folder will open in the current window.

 

From Tools-> Options, General Tab you can change this behavior.

 

However, I was having the non-default behavior even though the General Tab setting was set to “Open each folder in the same window”.

 

My problem related to the file type actions associated with file folders.  I could not correct the behavior from the GUI.

 

The cure was setting the registry value “(Default)” to “none” under "HKEY_CLASSES_ROOTDirectoryshell".

 

Hot Imaging with "DriveImage XML"

Author: Adam T. Anthony

“DriveImage XML” is made by a company called Runtime Software.  DriveImage XML uses Microsoft’s Volume Shadow Services (VSS) to capture copies of files, even if they are locked by another process.  I have found it is easy to use, and I have found it to be non-impacting on in-service machines.

 

Compression:  In one of my tests, I compared the size of two images of the same disk – one with no compression and one with ‘fast’ compression, and found that the compression ratio is around 20%.  Of course, the compression is highly dependant on the nature of the data on the volume.

 

Only Windows XP, Windows Server 2003 and Windows Vista are supported.  This is because VSS support in not available in NT/2000.

                                                                                                    

By default, DriveImageXML breaks the image into files that will fix on CD ROM.

 

Symantec Ghost does have a hot/live imaging feature, but from what I had read, it is used to maintain the images – not initially create them.

 

Get it here:  http://www.runtime.org/driveimage-xml.htm

 

Live Imaging / Hot Imaging / Ghost Alternative

 

DOS Command Line Date Math

Author: Adam T. Anthony

There are no built in commands to do date math in DOS.  But, it can be done with a series of built in commands.  I used the snippets below to calculate the difference, in days, between the current date and another date.  To do that, I had to first convert the current date to a Julian date.  Once the dates are converted to Julian date, the math is easy – simple integer subtraction.

 

(the Gregorian Calendar is the one you probably use, Julian calendar is based on the number of days since 1/1/4713BC) 

 

:: :: Split Current Date

FOR /F "TOKENS=2-4 DELIMS=/ " %%A IN ('ECHO.%DATE%') DO (

            SET YY=%%C

            SET MM=%%A

            SET DD=%%B

)

 

:: :: Convert Current Date from Gregorian to Julian

IF 1%MM% LSS 110 SET MM=%MM:~1%

IF 1%DD% LSS 110 SET DD=%DD:~1%

SET /A Month1 = ( %MM% - 14 ) / 12

SET /A Year1  = %YY% + 4800

SET /A JDate1  = 1461 * ( %Year1% + %Month1% ) / 4 + 367 * ( %MM% - 2 -12 * %Month1% ) / 12 - ( 3 * ( ( %Year1% + %Month1% + 100 ) / 100 ) ) / 4 + %DD% - 32075

 

 

The difference in “JDate1” and the other Julian date is the absolute number of days difference in the dates.

 

 

Work Related Writings On the Web

Below are some of my articles from EzineArticles


Putting Electronic Document Distribution to Work For Your Business
"Putting Electronic Document Distribution To Work For Your Business" is a guide for business administrators that want to automate the way documents are distributed inside or by their business. The article defines the scope of EDD, describes its benefits, details the features to look for in such a system, and touches on where to find this type of solution.

Moving Toward A Paperless Office
So you want to go paperless? Not sure where to start? The answer is literally right under your nose. If you have plans to eliminate or reduce your business's paper consumption and records storage, the best place to start looking is on your desk. The typical desk is loaded with paper - mail, file folders, notebooks - you name it. Chances are the paper that is filling your file cabinet, the file room or the third floor - whatever the case may be - passed over your desk or the desks of your colleagues.

February 8, 2010
7:22 pm