Batch File that call out to Active Directory - TechRepublic
General discussion
August 26, 2011 at 11:20 AM
vonmoltke

Batch File that call out to Active Directory

by vonmoltke . Updated 14 years, 9 months ago

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

This discussion is locked

All Comments