Discussions

Batch File that call out to Active Directory

+
0 Votes
Locked

Batch File that call out to Active Directory

vonmoltke
Hello everybody -

My assignment is to develop a batch file that our logon script can call on to satisfy the following condition:

If the User Information for Office 2010 ( HKCU\Software\Microsoft\Office\Common\UserInfo ) equals
the local admin default "UserInfo"

then

go to ldap/active directory and, using the client's "logon name", find the client in ldap and use their "Display Name" as the value for the String "UserName" in HKCU\Software\Microsoft\Office\Common\UserInfo

I found this bit of code to get me started... but this code doesn't "call out to active directory"

reg add HKCU\Software\Microsoft\Office\Common\UserInfo /v UserName /d %username% /f

Would greatly appreciate any suggestions, pointers etc... to help me out

Thank you very much and have a great Friday

Adrian