Jump to content

Mit VB Outlook Profil anlegen


Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Empfohlene Beiträge

Geschrieben

Hi,

 

ich möchte, wenn Sie ein User das erste mal an der Domain anmeldet,

das Outlook Profil automatisch angelegt wird.

Hierfür möchte ich den Registryeintrag setzen der die *.prf dann importiert.

Habe mir einige ansätze dazu im Netz mal angeschaut aber das ganze funktioniert noch nicht 100%.

 

Option Explicit
On error resume next

Dim WshShell
Dim onet
Dim strUser
Dim strGroup
Dim objOLK  'Object to hold instance of Outlook
Dim OLKVer  'First digit of Outlook Version number
Dim OLPath  'Path to Outlook.exe
strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")
Set oNet =  WScript.CreateObject("WScript.Network") 
Set WshShell = WScript.CreateObject("WScript.Shell")

'Create an instance of Outlook so that it can be queried for it's version
Set objOLK = CreateObject("Outlook.Application")
'Extract the first digit from the version number (this is the major version number)
OLKVer = left(objOLK.Version,inStr(1,objOLK.Version,".")-1)
'Close the instance of Outlook
objOLK.Quit

MSOKey = WshShell.RegRead ("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\DefaultProfile")
'if err.number <> 0 then

' determine if a profile has already been setup if not import variables according
If MSOKey = "" Then

WshShell.RegWrite "HKCU\Software\Microsoft\Office\" & OLKVer & ".0\Outlook\UserData","1","REG_DWORD"
WshShell.RegDelete "HKCU\Software\Microsoft\Office\" & OLKVer & ".0\Outlook\Setup\First-Run"
WshShell.RegWrite "HKCU\Software\Microsoft\Office\" & OLKVer & ".0\Outlook\Setup\ImportPRF","\\10.10.129.2\netlogon\sbsdefault.prf","REG_SZ"

end if

 

Starte ich das Script nun das erstemal fängt die Office installationsroutine an und er will dann das ich alle Outlookeinstellungen per hand eingebe.

Führe ich das Script dann nochmals aus wird das Profil richtig anglegt.

Starte ich das Script jetzt nochmal legt er jedesmal ein Backupprofil an.

 

Wo liegt mein Fehler ?

 

Gruß

Conti

Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Du musst ein Benutzerkonto haben, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen. Es ist einfach!

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...