RSSCategory: Scripts

Open Outlook 2003, 2007, 2010 or 2013 secure temp olk folder location.vbs script

A useful script, especially for those high maintenance users who insist on editing excel or word documents they open from Outlook and then frantically calling your help desk complaining they can’t locate files they saved while working in Outlook. Place the script on their desktop and have them run it first before calling your help desk.. Works with Outlook 2003, 2007, 2010 and now also with Outlook 2013.

Download Button5

' This script will open the Outlook Secure Temp folder location for Outlook
' 2003, 2007, 2010 and 2013

Dim WshShell, strValue, openlocation

Set WshShell = WScript.CreateObject(“WScript.Shell”)
const HKEY_CURRENT_USER = &H80000001
on error resume next
strComputer = “.”

Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\” &_
strComputer & “rootdefault:StdRegProv”)

strKeyPath = “SoftwareMicrosoftOffice11.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

If IsNull(dwValue) Then

Else
strKeyPath = “SoftwareMicrosoftOffice11.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
openlocation = “EXPLORER.exe /e,” & strValue
wShshell.Run openlocation
End If

strKeyPath = “SoftwareMicrosoftOffice12.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

If IsNull(dwValue) Then

Else
strKeyPath = “SoftwareMicrosoftOffice12.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
openlocation = “EXPLORER.exe /e,” & strValue
wShshell.Run openlocation
End If

strKeyPath = “SoftwareMicrosoftOffice14.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

If IsNull(dwValue) Then

Else
strKeyPath = “SoftwareMicrosoftOffice14.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
openlocation = “EXPLORER.exe /e,” & strValue
wShshell.Run openlocation
End If

strKeyPath = “SoftwareMicrosoftOffice15.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

If IsNull(dwValue) Then

Else
strKeyPath = “SoftwareMicrosoftOffice15.0OutlookSecurity”
strValueName = “OutlookSecureTempFolder”
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
openlocation = “EXPLORER.exe /e,” & strValue
wShshell.Run openlocation
End If

WScript.Quit


2011/12/16 | By | Reply More

Proxy On OFF Switch with get current state v2

A useful vbscript  for Laptop users who work in and out of the office and are behind a proxy server when in the office and are not when out of the office. For those users who have difficulty changing the settings manually through internet explorer this script can save them and your helpdesk invaluable amounts of time and headaches.
This script detects the current proxy state and depending on that sate prompts you to enable or disable it.
It also auomatically closes IE so the settings take effect immediately and then re- launches IE with the new settings.
The only variable thats needs to be changed is on line 47
Replace <Domain Proxy Server> with the IP or name of your domain proxy server without the brackets <> eg. ContosoProxy:80

Download Button5

'Proxy On OFF Switch with get current state v2
'Dec. 6, 2011
On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")

DimSetting = WshShell.RegRead ("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable")

If DimSetting = 1 Then 
'Wscript.Echo "Proxy is Currently Enabled"

returnvalue=MsgBox ("Do you want to DISABLE the Proxy?", 36, "Proxy state is Currently ENABLED")

if returnvalue = 6 then 
' BEGIN CALLOUT A
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\" & _
	"CurrentVersion\Internet Settings\ProxyEnable", _
	0, "REG_DWORD"
' END CALLOUT A

wShshell.Run "taskkill /im iexplore.exe",0,True
WScript.Sleep 500 'give kill time to take effect

'Inform User that the task is done.
Mybox = MsgBox("Proxy is now disabled" ,vbOkOnly,"Proxy is Disabled")
're-launch internet explorer
wShshell.Run "iexplore.exe"
End If
WScript.Quit

Else 
'Wscript.Echo "Proxy is Currently Disabled" 
End If

returnvalue=MsgBox ("Do you want to ENABLE the Proxy?", 36, "Proxy state is Currently DISABLED")

If returnvalue = "" Then
  WScript.Quit
End If

if returnvalue = 6 then 
' BEGIN CALLOUT A
'Replace <Domain Proxy Server> in line 47  with IP or your proxy server name without the <> eg. ContosoProxy:80
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\" & _
	"CurrentVersion\Internet Settings\ProxyEnable", _
	1, "REG_DWORD"
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\" & _
	"CurrentVersion\Internet Settings\ProxyServer","<Domain Proxy Server>:80", "REG_SZ"
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\" & _
	"CurrentVersion\Internet Settings\ProxyOverride","<local>", "REG_SZ"
' END CALLOUT A

wShshell.Run "taskkill /im iexplore.exe",0,True

WScript.Sleep 500 'give kill time to take effect

'Inform User that the task is done.
Mybox = MsgBox("Proxy is enabled and set to enter your companies proxy server",vbOkOnly,"Proxy Enabled")
're-launch internet explorer
wShshell.Run "iexplore.exe"
End If

WScript.Quit
2011/12/09 | By | Reply More