View Full Version : Users listing for a windows machine
Arun2
10-17-2011, 08:59 AM
I would like to get a "list" of all users who can login to the machine (that I am installing my software at).
For example: a typical list would be on a Windows machine might be:
Administrator
arun.shah
kathy.bates
This list could be seen by running Start->Run->Control->User Accounts
Can this list be obtained in Setupbuilder? (I am using 7.1)
Is this available in the registry?
I know that you are supporting 7.5 currently...but would like to know if its available in 7.1 also.
I would ultimately like to use this list and construct paths to these users' folders (using string appending by calling Handle String Operation) and do some cleanup operations there...
Thanks for your help,
-Arun
linder
10-17-2011, 09:18 AM
Arun,
Here is an interesting link to a TechNet article on how to list all the User Profiles on a computer:
http://blogs.technet.com/b/heyscriptingguy/archive/2005/06/03/hey-scripting-guy-how-can-i-list-all-the-user-profiles-on-a-computer.aspx
You can use this technique in SetupBuilder to retrieve the ProfileImagePath.
Hope this helps.
Friedrich
linder
10-17-2011, 09:39 AM
BTW, just a quick note: the "profile folders" might be hidden and write protected. I am not sure what you are trying to do but it is not a good idea <g>.
Hope this helps.
Friedrich
Arun2
10-17-2011, 12:00 PM
HI,
The situation is as follows:
1. Our application creates a specific folder "X" in the C:\Documents and Settings\[user_profile_name]\App_Name folder
during its launch and uses it for caching etc.
That means any user who launches the app would find folder X created in the above mentioned location
2. Application will always be installed with Admin privileges, thats a guarantee.
3. During a re-installation, I would like to dispose the folder tree App_Name\X
from every user's profile directory who has ever used my application on this system
4. The reason we want to dispose the folder tree in step 3 is because the old cache interferes with the cache files that will be created by the newly installed version of the application
5. This allows the newly installed application to re-create the cache and start afresh
6. Thats why I would like to include finding all user profiles and doing the job of deleting cache folders inside Setupbuilder
Given the link that you have suggested, it looks easier to write a custom DLL to get this job done...a dll that reads the C:\Documents and Settings dir and deletes App_Name\X whereever it finds it...what is your opinion?
That way I can keep my sb7 script clean and leave all the dirty work to the dll....
please let me know your suggestions/thoughts!
Thanks,
-Arun
linder
10-17-2011, 12:43 PM
Arun,
In three words: DON'T DO THIS!
This is not how Windows works and will definitely result in a complete support nightmare.
Friedrich
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.