Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Error: You cannot call a method on a null-valued expression. #158

Closed
lkleist opened this issue Sep 7, 2016 · 5 comments
Closed

Error: You cannot call a method on a null-valued expression. #158

lkleist opened this issue Sep 7, 2016 · 5 comments

Comments

@lkleist
Copy link

lkleist commented Sep 7, 2016

I’m getting an error on a test machine that has more than just a single version of Office. Office 2010 is installed along with Project 2010 or Visio 2010 and when the script is executed I get the following error:.
You cannot call a method on a null-valued expression.
At C:\temp\Generate-ODTConfigurationXML.ps1:1305 char:54

  •     $OfficeVersion = $OfficeVersion.Version.Split <<<< (".")[0]
    
    • CategoryInfo : InvalidOperation: (Split:String) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : InvokeMethodOnNull

If I uninstall either Project or Visio it works just fine.

@AStigall
Copy link
Collaborator

AStigall commented Oct 7, 2016

@lkleist we've made some changes to the Generate-ODTConfigurationXML.ps1 script. Can you download the latest version and let us know if it's still an issue?

@AStigall
Copy link
Collaborator

@lkleist if this is still an issue for you please let us know and we'll take another look. Thank you for your involvement and letting us know about the issue.

@BGleasonGH
Copy link

I am getting this failure as well... Mine was:
You cannot call a method on a null-valued expression.
At C:\Users\Desktop\Office-ProPlus-Deployment\Deploy-OfficeClickToRun
\Generate-ODTConfigurationXML.ps1:1312 char:54

  •     $OfficeVersion = $OfficeVersion.Version.Split <<<< (".")[0]
    
    • CategoryInfo : InvalidOperation: (Split:String) [], ParentConta
      insErrorRecordException
    • FullyQualifiedErrorId : InvokeMethodOnNull

I went as far to see the data in $OfficeVersion and it returned this (mind you all compact)...:
@{ComputerName=WIN7X64;
InstallPath=C:\Program Files (x86)\Microsoft Office;
ClientCulture=;
Bitness=32-Bit;
DisplayName=Microsoft Office Professional Plus 2007;
ClickToRunUpdateUrl=;
Version=12.0.6612.1000;
ClickToRunUpdatesEnabled=;
ClickToRun=False}

@{ComputerName=WIN7X64;
InstallPath=C:\Program Files (x86)\Microsoft Office;
ClientCulture=;
Bitness=32-Bit;
DisplayName=Microsoft Office Visio Standard 2007;
ClickToRunUpdateUrl=;
Version=12.0.6425.1000;
ClickToRunUpdatesEnabled=;
ClickToRun=False}

@{ComputerName=WIN7X64;
InstallPath=C:\Program Files (x86)\Microsoft Office;
ClientCulture=;
Bitness=32-Bit;
DisplayName=Microsoft Office Project Standard 2010;
ClickToRunUpdateUrl=;
Version=14.0.6029.1000;
ClickToRunUpdatesEnabled=;
ClickToRun=False}

So looks like get-officeversion is returning too much information/all office apps installed... Just prelim.. This issue should be reopened...

@SamSmit
Copy link

SamSmit commented Oct 24, 2016

We are hitting the same problem with Generate-ODTConfigurationXML. In our case we are seeing it on Office 2010 machines, and one initial finding is that failing machines also have the "Microsoft Office Proofing Tools Kit Compilation 2010" installed.

Our Error:
You cannot call a method on a null-valued expression.
At C:\O365\Generate-ODTConfigurationXML.ps1:1311 char:54

  •     $OfficeVersion = $OfficeVersion.Version.Split <<<< (".")[0]
    
    • CategoryInfo : InvalidOperation: (Split:String) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : InvokeMethodOnNull

If I uninstall "Microsoft Office Proofing Tools Kit Compilation 2010" Generate-ODTConfigurationXML runs as expected.

I am actively testing various scenarios including multiple products from multiple versions of office (e.g. Office 2010 Professional + Visio 2013 Standard + Lync 2013) Other than this bug I am optimistic that these scripts will be a huge time saver on our deployment of O365 ProPlus v2016

@johnskydiver
Copy link
Collaborator

Closing this ticket since it's referenced in ticket #171. Will continue troubleshooting on that ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants