Friday, December 11, 2009

Restore Your Registry Using The Recovery Console


I. Boot to Recovery Console/ BART PE/ etc
 

II. Restore  the registry with the steps below.

1. Type: cd \
( Reminder: between "cd" and "\" there should be a "blank space" otherwise  the command won't work. These are similar to old DOS commands where spaces had to go between each command so DOS knew where one command stopped and another started.)
 
2.Type: Cd system~1\_resto~1
If it gives an error "Access Denied" while accessing the folder, follow the method below
Type: cd \ 
Then click enter
Type: cd windows\system32\config 
Then click enter
Type: ren system system.bak 
Then click enter
(note the spaces between ren and system, and then between system and system.bak)
Type: exit
Then click enter
 now the computer should restart, then follow steps 1-6 of the article.

 
3.Type: dir
Then click enter
NOTICE: When you hit enter it will list all the restore points folders like "rp1", "rp2" we have to see the last restore point to copy the file from a recent backup. If the restore points have more than one page then you have keep on hitting the key to view the last restore point folder.
NOTICE: It is a good rule of thumb to choose the files from the restore point folder which the second to the last one.
4.Type: cd rp {with the second to the last restore point no. } (Note: Example: cd rp9. if rp10 is the last restore point. where last restore point no. =10)
Then click enter
5.Type: cd snapshot
NOTICE: Now the command Prompt will look like this
c:\system~1\resto~1\rp9\snapshot
( Note : restore point 9 assumed for clarity of the content, you have to go to the last restore point folder as described in the previous lines) Now according to the error message we have to copy the appropriate file from the restore point folder.

 

III.

NOTE: The appropriate command should be used according to the error message. But often times I do both to make sure they match each other.
 
If the file "system" is corrupted

Type: copy _registry_machine_system c:\windows\system32\config\system

Then click enter

 

If the file "software" is corrupted

Type: copy _registry_machine_software c:\windows\system32\config\software

Then click enter

Type: Exit 

Then click enter to restart computer and boot to the hard drive normally.

 

If this does not work, then you should try an earlier restore point. Normally 2 or 3 more restore points back. If that does not work your drive may be corrupt. At this point you will have a couple of different options.

1: You can copy your drive to a new drive and then try again. Make sure the software you use copies the restore folder with the rest of the windows system. Some do not move the system restore folder over to save time and space, but you can manually tell the program to move the restore folder. I use Casper XP, and it has the option to move the restore folder.

NOTE: Only do step 2 if the above has failed. Step 2 will remove all system restore points from your system and as far as I can tell they will be gone forever unless you have a copy of your hard drive. Also this should remove all MS updates and service packs and you will have to do your windows updates over again.

2: Another is to start the system from the cd as described previously and then, instead of loading the command prompt by clicking "R" at the first recovery prompt, you tell it to install windows and after you click the F8 key to agree to the End User License, you then will be given a chance to recover a previous version of windows (if the installation software does not recognize a previous version of windows !!!"STOP"!!!, or you will loose everything on the drive). Carefully follow through that repair setup wizard and that may also fix your problem. 

Wednesday, November 11, 2009

Joomla redirect and URL rewriting in IIS7

Create or edit your global.config (or web.config) file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="RedirectRule" stopProcessing="true">
          <match url=".*" />
          <conditions>
            <add input="{StaticRedirects:{REQUEST_URI}}" pattern="(.+)" />
          </conditions>
          <action type="Redirect" url="http://www.elatum.com{C:1}" appendQueryString="False" redirectType="Permanent" />
        </rule>
        <rule name="Redirect to WWW" stopProcessing="true">
          <match url=".*"/>
          <conditions>
            <add input="{HTTP_HOST}" pattern="^elatum.com$"/>
          </conditions>
          <action type="Redirect" url="http://www.elatum.com/{R:0}" redirectType="Permanent"/>
        </rule>
        <rule name="Security Rule" stopProcessing="true">
          <match url="^(.*)$" ignoreCase="false" />
          <conditions logicalGrouping="MatchAny">
            <add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" />
            <add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" />
            <add input="{QUERY_STRING}" pattern="(\&lt;|%3C).*script.*(\>|%3E)" />
            <add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
            <add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
          </conditions>
          <action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
        </rule>
        <rule name="SEO Rule">
          <match url="(.*)" ignoreCase="false" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
            <add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" />
            <add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
          </conditions>
          <action type="Rewrite" url="index.php" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>


In Joomla Admin set:

SEO Url's : Yes
Apache Mod Rewrite: Yes
Add suffix : No

Friday, October 16, 2009

This is SupportProxy

Welcome to SupportProxy! SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy  SupportProxy Code Blog, Support blog from SupportProxy 

Daily Server Backup Script

'+++++daily backup script++++++

Dim sh, nw, fso
Set sh = WScript.CreateObject("WScript.Shell")
Set nw = WScript.CreateObject("WScript.Network")
Set fso = CreateObject("Scripting.FileSystemObject")

CRLF = Chr(13) & Chr(10)

On Error Resume Next

'-------------------------------------------
'determine day of the week
'-------------------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_LocalTime")

For Each objItem in colItems
    varday = objItem.DayOfWeek
Next

Select case varday
    case 7
            dayname = "sunday"
    case 1
            dayname = "monday"
    case 2
            dayname = "tuesday"
    case 3
            dayname = "wednesday"
    case 4
            dayname = "thursday"
    case 5
            dayname = "friday"
    case 6
            dayname = "saturday"

End Select
'-------------------------------------------
'set variables
'-------------------------------------------
backupjob = "C:\scripts\backup-full-ss.bks" 'location of backup selections
'sample bks file
'C:\
'C:\Program Files\Exchsrvr\MDBDATA\ /Exclude
'D:\
'D:\backup\ /Exclude
'D:\ClientApps\ /Exclude
'D:\program files\exchsrvr\mdbdata\ /Exclude
'D:\Public\Wildland\Computers\removed e-mail attachments\ /Exclude
'D:\RECYCLER\ /Exclude
'D:\softlib\ /Exclude
'D:\WUTemp\ /Exclude
'JET SERVER\Microsoft Information Store\First Storage Group\
'SystemState


logtype = "s" 'f=full, s=summary, n=none
runusername = "administrator"
If dayname = "sunday" then
    baktype = "normal"
else
    baktype = "differential"
End If

'-------------------------------------------
'Run backup
'-------------------------------------------
sh.Run "C:\WINDOWS\system32\ntbackup.exe backup " & chr(34) & "@" & backupjob & chr(34) & " /n " & chr(34) & "Backup created 10/15/2009 at 10:53 PM" & chr(34) & " /d " & chr(34) & "Set created 10/15/2009 at 10:53 PM" & chr(34) & " /v:yes /r:no /rs:no /hc:off /m " & baktype & " /j " & chr(34) & "backup-full-ss" & chr(34) & " /l:s /f " & chr(34) & "F:\backup-" & baktype & "-" & dayname & ".bkf" & chr(34) & ""

'-------------------------------------------
'wait for backup to complete
'-------------------------------------------
iniproc = 1
Do While iniproc >= 1
    set svc=getobject("winmgmts:root\cimv2")
    sQuery="select * from win32_process where name='ntbackup.exe'"
    set cproc=svc.execquery(sQuery)
    iniproc=cproc.count
    wscript.sleep 5000
Loop
set cproc=nothing
set svc=nothing

'-------------------------------------------
'determine which log file is newest
'-------------------------------------------
baklogfolder = "C:\Documents and Settings\" & runusername & "\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data"

newbaklogfolder = "C:\temp"
newbaklogfile = month(now)& day(now)& right(year(now),2) & "." & second(now) & "_" & baktype & ".log"

'101609.58_differential.log

Dim fNewest
set oFolder=createobject("scripting.filesystemobject").getfolder(baklogfolder)
For Each aFile In oFolder.Files
If lcase(RIGHT(aFile.Name,3)) = "log" then
    If fNewest = "" Then
        Set fNewest = aFile
    Else
    
        If fNewest.DateLastModified < aFile.DateLastModified Then
            Set fNewest = aFile
           End If

    End If
End If
Next

'-------------------------------------------
'do file copy
'-------------------------------------------
fso.CopyFile baklogfolder & "\" & fNewest.Name, newbaklogfolder & "\" & newbaklogfile


Wscript.quit

Tuesday, September 8, 2009

Remove Dead Tracks from iTunes VBS

' RemoveDeadTracks.vbs --------------------------------------
ITTrackKindFile = 1
deletedTracks = 0


set iTunesApp = WScript.CreateObject("iTunes.Application")
set mainLibrary = iTunesApp.LibraryPlaylist
set tracks = mainLibrary.Tracks


for each currTrack in tracks
' is this a file track?
if (currTrack.Kind = ITTrackKindFile) then
' yes, does it have an empty location?
if (currTrack.Location = "") then ' yes, delete it
currTrack.Delete()
deletedTracks = deletedTracks + 1
end if
end if
next


WScript.Echo "Removed " & deletedTracks & " dead track(s)."
' RemoveDeadTracks.vbs --------------------------------------

Monday, June 15, 2009

Vista - Only display the user name and password prompt at login

  1. Open Control Panel and select System and Maintenance
  2. Select Administrative Tools and double-click Local Security Policy (secpol.msc)
  3. Expand Local Policies to Security Options
  4. Enable Interactive logon: Do not display last user name

    This change should match the following DWORD registry setting:

    [HKEY_LOCAL_MACHINE \Software \Microsoft \Windows \CurrentVersion \Policies \System]
    DontDisplayLastUserName = 1

Thursday, June 11, 2009

Design your page to be compatible with Skype

By default, the Skype Toolbar will parse each web page and attempt to find phone numbers within the html code. You can prevent this behaviour by "telling" the Skype Toolbar that your site is compatible with Skype. This will stop it from searching for numbers and make it search only for special Skype tags.

Simply add the following meta tag to your page headers,
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />

Now the Skype Toolbar will only reformat numbers that have special Skype tags. If you have a phone number on your page and you want it to be accessible to Skype users, just code the html using this format,
<!-- sphoneid telnr="+447890123456" fileas="John Smith" -->07890 123 456<!-- sphoneid -->

Thursday, May 7, 2009

Outlook 2003 Macro - Move messages to folder, create folder, Inbox archive

Sub Archive()

    On Error Resume Next
    Dim EmailArchiveFolder As String
    'this folder, if doesnt already, will exist in the Inbox folder
    EmailArchiveFolder = "Inbox_Archive"

    Dim objFolder As Outlook.MAPIFolder, objInbox As Outlook.MAPIFolder

    Dim objNS As Outlook.NameSpace, objItem As Outlook.MailItem


    Set objNS = Application.GetNamespace("MAPI")

    Set objInbox = objNS.GetDefaultFolder(olFolderInbox)

    Set objFolder = objInbox.Folders(EmailArchiveFolder)

'Assume this is a mail folder

 
    If objFolder Is Nothing Then

        MsgBox "This folder doesn't exist! It will be created.", vbOKOnly + vbExclamation, "INVALID FOLDER"
        Set objFolder = objInbox.Folders.Add(EmailArchiveFolder)

    End If
 

    If Application.ActiveExplorer.Selection.Count = 0 Then

        'Require that this procedure be called only when a message is selected

        Exit Sub

    End If


    For Each objItem In Application.ActiveExplorer.Selection

        If objFolder.DefaultItemType = olMailItem Then

            If objItem.Class = olMail Then

                objItem.Move objFolder

            End If

        End If

    Next
 

    Set objItem = Nothing

    Set objFolder = Nothing

    Set objInbox = Nothing

    Set objNS = Nothing


End Sub

Monday, April 27, 2009

Flash Video (FLV) Editor

Limited, but useful.  Install Adobe Air first

http://richapps.de/?page_id=120


Tuesday, February 24, 2009

Putting NTBACKUP back in Vista

Windows Vista includes a whole new backup tool called "Backup Status", which doesn't support BKF-backups made with NTBackup. "Backup Status" can at the same time only make backup of certain filetypes and folders.

Microsoft has released Windows NT Backup - Restore Utility, which allows Windows Vista to restore files saved in BKF-files.

If having a Windows XP system around, then it is possible to copy certain NTBackup files into Windows Vista, which will allow Windows Vista to backup and restore files with NTBackup. Create a new folder on Windows Vista ex. C:\Program Files\NTBackup and copy the following files from Windows XP to the folder:
  • C:Windows\System32\Ntbackup.exe
  • C:Windows\System32\Ntmsapi.dll
  • C:Windows\System32\Vssapi.dll
  • C:Windows\Help\Ntbackup.chm
  • C:Windows\Help\Ntbackup.hlp
Note to run the Restore Utility or NTBackup on Windows Vista, then one has to enable Removable Storage Management, or else one will get an NTSMAPI.dll error.
  1. Open Control Panel and under "Programs and Features" click "Turn Windows Features on or off"
  2. Enable "Removable Storage Management" and press OK
Related Configure NtBackup for faster throughput

Credits www.petri.co.il

Tuesday, February 10, 2009

Reset Joomla Admin Password

You cannot recover the existing password, but you can reset it to a new password.
The passwords are stored using a one-way MD5 hash which prevents recovering the password.
But you can reset the password by editing the password field in the database.
Set the password to a known value and then you may log-in using that new password.

The password is stored in the MySQL database jos_users  table password  field. (change this for your table prefix if different)
Use a MySQL utility such as phpMyAdmin or MySQL Query Browser to edit this field.
Open the table, find your admin username, and then select that row for editing.
The password must be hashed, you cannot simply enter text into this field.

Set the password to a known value
- password = "this is the MD5 hashed password"
------------------------------------------------------
- admin = 21232f297a57a5a743894a0e4a801fc3
- secret = 5ebe2294ecd0e0f08eab7690d2a6ee69
- OU812 = 7441de5382cf4fecbaa9a8c538e76783
Paste the hashed password into the field, save the change, and log-in using the new password.
Immediately change your password to something more secure!