Solved

Active Directory Users - How to activate a program/script

Posted on 2006-10-29
9
377 Views
Last Modified: 2013-11-20
Hi,

1. I am using:
      DWORD dwResult = ssl_net::CNetInfo::GetUserInfo (pUsers, computerName); // computer);

on my XP to enumerate the users (See source below).
and I do get all the users.
But I tried it on server with "Active Directory" and I did not receive the "Active Directory" users.

2. How can I see the computers and users in the Active Directory"?

3. Is there a way to Activate (launch) a program in a remote PC (using the Active-Directory or in any other way).?

Thanks,
Shlomo;

      USER_LIST* pUsers = new USER_LIST;
      DWORD dwResult = ssl_net::CNetInfo::GetUserInfo (pUsers, computerName); // computer);
      if (ERROR_SUCCESS == dwResult)
      {
            // Process the results
            POSITION pos = pUsers->GetHeadPosition ();
            while (NULL != pos) {
                  NET_DISPLAY_USER ndu = pUsers->GetNext (pos);
                  CString szName, szComment, szFlags, szFullName, szUserID;

                  szName.Format ("%S", ndu.usri1_name);
                  szComment.Format ("%S", ndu.usri1_comment);
                  szFlags.Format ("%d", ndu.usri1_flags);
                  szFullName.Format ("%S", ndu.usri1_full_name);
                  //szUserID.Format ("%d", ndu.usri1_user_id);

                  if (ndu.usri1_flags != 66049) continue;

                  if (pUsersDlg)
                  {
         int i=pUsersDlg->list.InsertItem  (0, szName);
                   pUsersDlg->list.SetItemText (i, 1, szFullName);
                   pUsersDlg->list.SetItemText (i, 2, szComment);
   }
}
0
Comment
Question by:VapiSoft
  • 4
  • 2
9 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 500 total points
ID: 17829339
>>How can I see the computers and users in the Active Directory"?

Following may be of your use :
Simple Active directory browsing / navigate : http://www.codeproject.com/useritems/activedirbrowsing.asp

An easy to use class to list Active Directory Users : http://www.codeproject.com/internet/ADUsers.asp

Using the Active Directory Object Selection Dialog :
http://www.codeguru.com/cpp/i-n/network/activedirectory/article.php/c5445/

Following will be simple sample to retrieve users list : http://www.codersource.net/active_directory_programming_IADSUSER.html

-MAHESH
0
 

Author Comment

by:VapiSoft
ID: 17829384
Thank you.
I will check it tomoroow or on Tuesday on a server, and get back to you.
0
 

Author Comment

by:VapiSoft
ID: 17835079
Hi MAHESH,

In all four samples, I did not see any that enables me to execute a program or a script in the selected computer.
Did I miss anything?

Also, I tried to compile
Using the Active Directory Object Selection Dialog :
http://www.codeguru.com/cpp/i-n/network/activedirectory/article.php/c5445/

and received the following link error:
mfc42ud.lib : fatal error LNK1113: invalid machine type

To clarify what I need is to install a pice of program in each computer in the network and execute it (somthing like MSI).


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:VapiSoft
ID: 17875770
Hi MAHESH,

I managed to compile  http://www.codeproject.com/useritems/activedirbrowsing.asp
and it works greate - thank you.
But I still don't understand how to activate (launch) an application in the remote computer (using the AD)?

0
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17876303
I think you need something like Remote Desktop to execute an application to remote PC.. how ever I dont have idea its possible with AD or how to do that using AD...

You may check remote desktop http://www.microsoft.com/windowsxp/pro/downloads/rdclientdl.asp
http://www.microsoft.com/windowsxp/using/mobility/getstarted/remoteintro.mspx

Or

Other thirdpary remote application launching utilities like :http://remote-launch.qarchive.org/

-MAHESH
0
 

Author Comment

by:VapiSoft
ID: 17876371
Hi MAHESH,

I know that it can be done view AD.
Remote Desktop is not what I need.
In any case thaks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Generic progress indicator 6 113
Detect CR LF to each line 12 152
Prevent this page from creating additional dialogs. 3 388
zeroMAx challenge 20 86
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now