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