![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Location of personal folder in Outlook with VBS Hello, how can I check the location, size etc. of the ost and pst-files of the personal folders of the current Outlook profile (script)? Please help, thanks in advance Bye Tora |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Location of personal folder in Outlook with VBS "Tora" <alpha74@xxxxxx> wrote in message news:%23UgSGAeKJHA.5704@xxxxxx Quote: > Hello, > > how can I check the location, size etc. of the ost and pst-files of the > personal folders of the current Outlook profile (script)? location for OST. Perhaps an Outlook expert will come along with this information. If you have Outlook installed and want to use it to reveal the paths, you can use the code in this message (watch for wrapping): http://groups.google.com/group/micro...935637cdfa765e '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Option Explicit Const HKCU = &H80000001 Dim oFSO, oReg, sWMSS, sDefProf, aKeys Dim sKey, aVal, sPSTPath, sPSTSize '<*> Create WMI Registry Object Set oReg = GetObject("winmgmts:\\.\root\default:StdRegProv") Set oFSO = CreateObject("Scripting.FileSystemObject") '<*> Find current user's default profile sWMSS = "Software\Microsoft\Windows NT\Current" _ & "Version\Windows Messaging Subsystem\Profiles" oReg.GetStringValue HKCU, sWMSS, "DefaultProfile", sDefProf sDefProf = sWMSS & "\" & sDefProf 'Enumerate the default profile registry folder oReg.EnumKey HKCU, sDefProf, aKeys '<*> Walk the array of keys looking for 'Personal Folders' For Each sKey in aKeys oReg.GetBinaryValue HKCU,sDefProf & "\" & sKey, "001f3006", aVal If VarType(aVal) And 8192 Then If Bin2Str(aVal) = "Personal Folders" Then oReg.GetBinaryValue HKCU,sDefProf & "\" & sKey, "001f6700", aVal sPSTPath = Bin2Str(aVal) '<*> If the PST file exists, get it's size If oFSO.FileExists(sPSTPath) Then sPSTSize = oFSO.GetFile(sPSTPath).Size Else sPSTSize = 0 End If MsgBox "Path: " & sPSTPath & vbCr & "Size: " & sPSTSize End If End If Next Function Bin2Str(ByVal aBin) Dim iChr For Each iChr in aBin If iChr Then Bin2Str = Bin2Str & Chr(iChr) Next End Function '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Outlook 2003 - Outlook personal Folders Backup | Vista mail | |||
| Personal User Shell Folders - Move Location | Tutorials | |||
| Moving personal folder from Outlook to WLM? | Live Mail | |||
| Adding 'Location' tab to new folders in personal folder? | Vista file management | |||
| Can You Move User Personal Folders to a Network Location | Vista networking & sharing | |||