Showing posts with label Scripting. Show all posts
Showing posts with label Scripting. Show all posts
Thursday 18 January 2018
Thursday 28 September 2017
Enterprise Vault Outlook Plugin - Location is not valid. Choose a different installation location.
I was part of a project to upgrade Enterprise Vault system - my task was to ensure the Enterprise Vault Outlook plugin is properly deployed to Outlook clients. However, during my testing to install Enterprise Vault Outlook Plugin ver 12, I faced an issue as below :
No logs, just a warning.
Thererfore, I performed some troubleshoting, which leads to the resoluton.
Issue :
Unable to install Enterprise Vault Outlook Plugin version 12 - error : Location is not valid. Choose a different installation location.
Troubleshooting
|
No logs, just a warning.
Thererfore, I performed some troubleshoting, which leads to the resoluton.
Issue :
Unable to install Enterprise Vault Outlook Plugin version 12 - error : Location is not valid. Choose a different installation location.
Troubleshooting
- Normal EV Outlook plugin installation won’t produce any log. Therefore,
for troubleshooting purpose (which then be used during automation), the installer executed with MSIEXEC command :
msiexec /i "C:\temp\EVOutlookClient\Veritas Enterprise Vault Outlook Add-in (x86).msi" /qn /norestart /l* C:\temp\EV12Installation.log - Based on the log, these error (marked in yellow) captured
Action ended 12:44:38: Set_TARGETDIR. Return value 1.Action 12:44:38: DiscoverUserProfileFolders.
Action start 12:44:38: DiscoverUserProfileFolders.DiscoverUserProfileFolders: Initialized.DiscoverUserProfileFolders: GetRegKeyChildren : BEGINDiscoverUserProfileFolders: Reading Software\Microsoft\Windows NT\CurrentVersion\ProfileList\ for childrenDiscoverUserProfileFolders: GetRegKeyChildren : ENDDiscoverUserProfileFolders: ReadRegistry : BEGINDiscoverUserProfileFolders: Reading Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-18 for value ProfileImagePathDiscoverUserProfileFolders: ReadRegistry : ENDDiscoverUserProfileFolders: Found profile with SID S-1-5-18 and path %systemroot%\system32\config\systemprofileDiscoverUserProfileFolders: ReadRegistry : BEGINDiscoverUserProfileFolders: Reading Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-19 for value ProfileImagePathDiscoverUserProfileFolders: ReadRegistry : ENDDiscoverUserProfileFolders: Found profile with SID S-1-5-19 and path C:\Windows\ServiceProfiles\LocalServiceDiscoverUserProfileFolders: ReadRegistry : BEGINDiscoverUserProfileFolders: Reading Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-20 for value ProfileImagePathDiscoverUserProfileFolders: ReadRegistry : ENDDiscoverUserProfileFolders: Found profile with SID S-1-5-20 and path C:\Windows\ServiceProfiles\NetworkServiceDiscoverUserProfileFolders: ReadRegistry : BEGINDiscoverUserProfileFolders: Reading Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-2058597364-130651613-2805778835-2401 for value ProfileImagePathDiscoverUserProfileFolders: ReadRegistry : ENDDiscoverUserProfileFolders: Found profile with SID S-1-5-21-2058597364-130651613-2805778835-2401 and path C:\Users\.zHISclientDiscoverUserProfileFolders: ReadRegistry : BEGINDiscoverUserProfileFolders: Reading Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-2058597364-130651613-2805778835-26805 for value ProfileImagePathDiscoverUserProfileFolders: Error 0x2: RegQueryValueEx failed to read ProfileImagePath with error 2DiscoverUserProfileFolders: ReadRegistry : ENDDiscoverUserProfileFolders: Found profile with SID S-1-5-21-2058597364-130651613-2805778835-26805 and path
DiscoverUserProfileFolders: ReadRegistry : BEGINDiscoverUserProfileFolders: Reading Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-2058597364-130651613-2805778835-26814 for value ProfileImagePathDiscoverUserProfileFolders: Error 0x2: RegQueryValueEx failed to read ProfileImagePath with error 2DiscoverUserProfileFolders: ReadRegistry : END - Check on Registry Editor (REGEDIT) under HKLM\ Software\Microsoft\Windows
NT\CurrentVersion\ProfileList, there are some registry keys which do not point to
any profiles. It is most likely the profiles have been improperly deleted
before this.
Example of Registry Key Which Ties to User Profile :
Registry Key Which Not Ties to Any User Profile
Resolution :
- Either, look for the keys one by one and delete them, or
- Run below script
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objRegistry=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
strProfileListKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\ProfileList"
objRegistry.EnumKey HKEY_LOCAL_MACHINE, strProfileListKeyPath, arrProfileList
For intCurrentSID = 0 To UBound(arrProfileList)
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strProfileListKeyPath & "\" & arrProfileList(intCurrentSID),"ProfileImagePath",strProfileImagePath
If Not (objFSO.FolderExists (strProfileImagePath)) Then
DeleteRegEntry HKEY_LOCAL_MACHINE, strProfileListKeyPath & "\" & arrProfileList(intCurrentSID)
End If
Next
Function DeleteRegEntry(sHive, sEnumPath)
' Attempt to delete key. If it fails, start the subkey
' enumration process.
lRC = objRegistry.DeleteKey(sHive, sEnumPath)
' The deletion failed, start deleting subkeys.
If (lRC <> 0) Then
' Subkey Enumerator
On Error Resume Next
lRC = objRegistry.EnumKey(HKEY_LOCAL_MACHINE, sEnumPath, sNames)
For Each sKeyName In sNames
If Err.Number <> 0 Then Exit For
lRC = DeleteRegEntry(sHive, sEnumPath & "\" & sKeyName)
Next
On Error Goto 0
' At this point we should have looped through all subkeys, trying
' to delete the registry key again.
lRC = objRegistry.DeleteKey(sHive, sEnumPath)
End If
End Function
Thursday 17 July 2014
Error on Powershell - 0xffff0000
I am not very familiar with PowerShell, yet... really. Currently, my main scripting language is VBScript. However, I am truly believe the needs to learn PowerShell is keep increasing every single day. Server 2008 and Server 2012 are equiped with PowerShell, some advanced managements in XenDesktop 7.5 are using PowerShell, it is fun to learn PowerShell (they said), and a few other points mentioned by my colleagues (Wow, what on earth Heiry, why your introduction is longer than an episode of Dads?)
Error encountered when a scheduled task created to run PowerShell script :
Furthermore, this error reported on Task Scheduler.
Troubleshooting
Resolution :
There are 2 methods to solve this :-
Method 01 - Using Registry Editor :
Method 02 - Using GUI :
Issues :
Error encountered when a scheduled task created to run PowerShell script :
The shell cannot be started. A failure occurred during initialization: Object reference not set to an instance of an object.
Furthermore, this error reported on Task Scheduler.
Troubleshooting
- Go to Start > Run, and type regedit. Press Enter
- Registry Editor launched. Browse to My Computer > HKEY_CURRENT_USER, and look for for Environment folder. It is not there.
- Next, go to My Computer > right click and choose Properties
- Go to Advanced tab, and click at Environment Variables...
- You won't see any entry on variable, as below :
There are 2 methods to solve this :-
Method 01 - Using Registry Editor :
- Launch REGEDIT. Browse to My Computer > right click at HKEY_CURRENT USER > hover at New > Choose Key
- Change the new Key name to Environment
- Now, lets refresh Registry Editor by pressing View > Refresh
- We can see the new key is arranged accordingly.
- Next, rignt click at Environment key > go to New > choose Expandable String Value
- Right click at newly created strign entry, and choose Rename and name it as TMP
- Right click at TMP string, and choose Modify
- Configure below string to Value data box :
String : %USERPROFILE%\Local Settings\Temp - Perform step 5 until 8 with below info :
String Name : TEMP
Value Data : %USERPROFILE%\Local Settings\Temp
Method 02 - Using GUI :
- Right Click at My Computer > choose Properties > click at Advanced Tab > Click at Environment Variables
- We will add the strings from here. Choose New
- Configure the variable names and variable values accordingly, then press OK
Variable name : TMP
Variable Value : %USERPROFILE%\Local Settings\Temp
Variable name : TEMP
Variable Value : %USERPROFILE%\Local Settings\Temp - This is the outcome. Press OK, and launch the PowerShell script to test.