Windows

Windows XP – Windows 2003 2008 Server R2 – SQL 2008 Server
MS Office Tips – Applications – Registry Secrets – Browsers

The very first Tech Forum here is Windows

Read Registry value into a batch variable

2017/07/06
By
Modified: 2017/06/25
Rue-Sainte-Catherine--2015-

Before I forget, let me share with you a fantastic way to read values from Registry into a batch file variable. Say you need to determine, what is the date format of this machine.  Normally you would read a value from HKEY_CURRENT_USER\Control Panel\International like this: REG QUERY "HKCU\Control Panel\International" /v sShortDate   That command will produce an output similar to this: HKEY_CURRENT_USER\Control Panel\International sShortDate    REG_SZ    M/d/yyyy But you do not need all that.  All you need is the string  “M/d/yyyy” (or “yyyy-MM-dd”).  To get just that string you need to skip to a second line and read third field on the last line.  How you can do that in a batch…

Read more »


SQL DB2: Concatenate TEXT from multiple records

2017/06/30
By
Modified: 2017/06/25
Concatenation Road in Winter

    Scenario   Here is a recipe on how to concatenate a field from multiple records into one field. There are two pre-conditions for this method to work: First. Your source file needs to have an equivalent of a line number field.  This should be a numeric field indicating the sequence in which to concatenate the records.  This field doesn’t not need to be  consecutive. Second. The difference between lowest and highest line numbers should be a reasonably low number.  In this example the max difference is 11, and it means that at the very maximum we would need to concatenate 11 text fields together.   Step One Generate a driver file with MIN…

Read more »

Block PC Outbound Connections on Router Level (All but RDP)

2017/06/27
By
Modified: 2017/06/25
Router-Open-Ports-for-RDP-3389

This article applies to a scenario, when you already can establish RDP to a machine on your internal network from a remote network.  Now you’ve decided to tighten security screws and close all external access to and from that machine except for RDP on the router level. Inbound connections to a server you can block easily using firewall on the machine itself.  This article deals with a situation, when you need to block access for any process or application running on your server to the external resources.  Other machines on your network still would be able to make external connections through the router. Note: It is good a practice to change…

Read more »

Properly Validate TextArea Length (IE vs. Firefox)

2017/06/26
By
Modified: 2017/06/25
Properly Validate TextArea Length (IE vs. Firefox)

Let’s consider this example, where HTML page has a TEXTAREA and an INBOX.  When user types inside TextArea, Inbox should show the length of TextArea string. <script type="text/javascript"> function TTLength(objTT){ var tt= document.getElementById('TXT1'); tt.value = objTT.value.length; } </script> <textarea onKeyDown="TTLength(this);" onKeyUp="TTLength(this);" rows="10"> This Text Area Contains a string With Newline Characters </textarea>  <input type="text" id="TXT1" value="TT Length"/> Let’s see how this page behaves in IE8 and in Firefox 3.6.11. IE8 Firefox As you can see that IE and FF return two different values for the length of an identical  string in TextArea and that could be a serious problem, if you are trying to validate the string length before updating the…

Read more »

How to Reset Win XP Admin Password

2017/06/21
By
Modified: 2017/04/30

There are two ways to reset forgotten Administrator password. Method one – Reset During Repair Reinstall: Use Win XP installation disk Run Recovery (not Recovery Console) Press Shift+F10 during GIU portion of repair / install Run LUSRMGR.MSC to reset any user password to whatever you want During my tests, this method always ended up in freeze  during a late install stage on “Deleting Temp Files” Method Two – Use LUNIX bootable CD: Download free boot CD software from http://pogostick.net/~pnh/ntpasswd/ It might be called Offline Registry Editor, but this utility main purpose is to reset Administrator passwords to blank. Burn a bootable disk (only 4MB) Boot from this CD. Blank Administrator password…

Read more »

Moving Win XP from RAID to RAID Machine

2017/06/18
By
Modified: 2017/04/30

After several days of heavy exhausting battles and sleepless nights, after testing dozens of options, after browsing many proposed Internet solutions, I finally was able to move an old instance of Windows XP on a new machine with new RAID drivers. That happened at 13:23 on December 12, 2010.  I moved Win XP from old RAID machine to a new RAID machine. O boy! I found  a clear and clean way to do this task.  I will also use the same technique to move any Microsoft operating system from a Single drive to a RAID machine.  And this also works great, if you simply switching your PC controller from IDE to…

Read more »

Count Number of Cell with Errors in Excel

2017/06/17
By
Modified: 2017/06/15

This problem occurs, when you have a column with a formula that sometimes returns an error.  That is very typical for all kind of look-up situations .  Let’s say, you have a column E with formula that returns good values and errors.  You need to count how many errors are in that column. Enter formula =SUM(IF(ISERROR(E2:E10),1)) and press Ctrl+Shift+Enter while still in editing mode. You should see two things.  First, your formula turns into {=SUM(IF(ISERROR(E2:E10),1))} with square brackets around it, and second, you got you a correct cells with errors count.  This is it. If you need to count cell without errors, you can use this formula: =SUM(IF( NOT( ISERROR(E2:E10)),1 ))…

Read more »

Update Field Based on a Field in Another Table

2017/06/02
By
Modified: 2017/04/30

This article contains 3 examples: - T-SQL; – MS Access; – AS/400.   This example shows a standard T-SQL syntax tested on MS SQL 2005 server: update P set P.CertMemberLevelID = Z.CertLevelTo from   UPM_MemberPermissionMask P INNER JOIN zzzCertRegistryUpdate Z ON P.MemberID = Z. Cert2ID Here we are updating one filed CertMemberLevelID in table UPM_MemberPermissionMask based on field Cert2ID in table zzzCertRegistryUpdate. This next example was generated using MS Access 2007 syntax: UPDATE CRPDTA_F1201 INNER JOIN CatCode7 ON CRPDTA_F1201.FANUMB = CatCode7.XXNUMB SET CRPDTA_F1201.FAFA7 = [CatCode7].[XXFA7] A field FAFA7 in CRPDTA_F1201 is being updated. Table  CatCode7 contains 2 fields: – ID Link field XXNUMB and – Update values field XXFA7 SQL statement JOINs two…

Read more »

Process **\MCSHIELD.EXE contains signed but untrusted code …

2017/05/25
By
Modified: 2017/04/30
mfehidk-EventID-516

This fix was tested with Windows XP Pro SP3 with Office 2003 SP3 and McAfee AntiVirus Plus. Finally.   Finally I found a solution for this really scary-looking error message that was bugging me since 12/24.  Marry Christmas! Description of a Problem Every time you restart you PC you see a very unpleasant Warning Event ID 516 in your system event log from mfehidk. This is the very last system message before computer reboots or goes to sleep. Process **\MCSHIELD.EXE pid (864) contains signed but untrusted code, but was allowed to perform a privileged operation with a McAfee driver. What is Causing it? It appears that most people (and I join them) …

Read more »

Cisco VPN Client Error 51 – Open Your Firewall

2017/05/23
By
Modified: 2017/04/30
Cisco Error 51

Annoying!  How Annoying! This very simple, very typical error message, but it is so hard to find a quick solution. Symptoms: You are starting a Cisco VPN Client and immediately you are getting this error message: Error 51: Unable to communicate with the VPN subsystem. Please make sure that you have at least one network interface that is currently active and has an IP address and start this application again.     Most of Internet discussions on this error message revolve around MAC OS.  But this error I was able to fix on Windows XP. Quickly – What to Do? Quickly – Open your firewall.  Each firewall solution is different, but…

Read more »