Hello,
I've now created a new Virtual Machine with the German language as default and I was indeed able to replicate the behavior.
After some hours of investigating this, I actually found out that this is the normal behavior. This can be seen in the
"NetworkService Account" article from Microsoft.
In the above article, it states that:
While the security subsystem localizes this account name, the SCM does not support localized names. Therefore, you will receive a localized name for this account from the LookupAccountSid function, but the name of the account must be NT AUTHORITY\NetworkService when you call CreateService or ChangeServiceConfig, regardless of the locale, or unexpected results can occur.
If you run your script manually on the machine with the German language as its' default, you will notice that it returns the name of the account localized.
Code: Select all
Set objWMI = GetObject ("winmgmts:root\cimv2")
Set objSid = objWMI.Get ("Win32_SID.SID='S-1-5-20'")
MsgBox objSid.ReferencedDomainName
MsgBox objSid.AccountName
This is the reason why this has worked on my previous test machine (where I have downloaded the language pack), because the script was returning the account name non-localized, despite the fact that I had the language pack installed.
Therefore, the solution to this would be to follow the article and simply input the
"NT AUTHORITY\NetworkService" account in the
"User" field. I have tested this and the service was started correctly.
Hope this helps!
Best regards,
Catalin