5 Replies Latest reply on Sep 15, 2009 9:41 AM by SafeBoot

    Example VB.NET / SBADMCL

      Hello,

      I'm looking to create a VB.NET app that can assist my users with changing their windows domain password as well as the safeboot / etoken password all with one click.

      I believe I might be able to accomplish this with VB.NET and SBADMCL.

      To dig in, I was wondering if anyone had some sample VB code I could take a look at.

      Thanks for any assistance,

      Drew
        • 1. RE: Example VB.NET / SBADMCL
          For starters, I'm trying:

          regsvr32 "C:\Program Files\McAfee\Endpoint Encryption Manager\CUSTOM\SBAdmCL\SbAdmCom.dll"

          and getting:

          The module SBADMCOM.DLL failed to load.

          Thanks again for any help!

          Drew
          • 2. RE: Example VB.NET / SBADMCL
            thats a pretty big problem to start with. :-)

            you need to put the com object and its DLL in the same directory as EEM, EEPC, or EEFF. The one you're trying to use is just a copy moved over from the installation media. It has to be in the same directory as the product to work.
            • 3. RE: Example VB.NET / SBADMCL
              Thank you very much SafeBoot/Simon!

              DLLRegisterServer in C:\Program Files\McAfee\Endpoint Encryption Manager\SBAdmCom.dll SUCCEEDED!

              How in the world would I have figured that out on my own?

              I don't suppose you have any VB.NET sample code around do you?

              Really appreciate the help, big brownie points if I pull this one off!

              Drew
              • 4. RE: Example VB.NET / SBADMCL
                sorry, I don't do vb.net, only VBS. There are some scripts on my blog which you might find helpful though.

                and of course, don't forget the scripting manual you installed.

                my advice if you're writing something simple is don't bother with the XML p****r unless you're very familiar with it already, just throw strings about and use "replace" a lot.

                HOW funny! I can't say ..p a r s e r... on the forum! I guess the long established British football team S****horpe United might be nixed as well..
                • 5. RE: Example VB.NET / SBADMCL
                  Just in case someone else ends up here looking for this:

                  Imports SBADMCOMLib
                  Dim sbinterface As New SBADMCOMLib.SbAdmScripting
                  Dim sbxml As String
                  Dim sbxmlOut As String
                  Dim adminUser As String = ""
                  Dim adminPassword As String = ""

                  sbxml = ""
                  sbxml = sbxml & "<SafeBoot>"
                  sbxml = sbxml & " <SbAdminScripting>"
                  sbxml = sbxml & " <SbAdminConnection>"
                  sbxml = sbxml & " <ConnectionType>Persistent.New</ConnectionType>"
                  sbxml = sbxml & " <AuthType>UserNamePassword</AuthType>"
                  sbxml = sbxml & " <AdminUser>" & adminUser & "</AdminUser>"
                  sbxml = sbxml & " <AdminPwd>" & adminPassword & "</AdminPwd>"
                  sbxml = sbxml & " </SbAdminConnection>"
                  sbxml = sbxml & " </SbAdminScripting>"
                  sbxml = sbxml & "</SafeBoot>"

                  sbxmlOut = sbinterface.execute(sbxml)

                  MessageBox.Show(sbxmlOut)


                  Thanks again for your help Simon!