Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C VB COM scripting script
Greetings all,
 
First of all, let me apologize for newbingly not knowing where to address this question properly, as I'm somewhat "green" behind the ears when it comes to coding. I have a feeling that the answer to my question is very easy, but I'm tired of fighting it. A friend gave me a few basic batch/VB scripts a year ago, and I've been hooked on it ever since.  
 
The issue I'm having revolves around a batch I've written to collect User profile data on retired workstations in our organization. These are all WinXP SP2 or SP#.   I use it to copy over their data from: My Documents, Favorites, Microsoft/Signatures, Outlook profiles, and a few other locations to a backup server location.
 
The issue; How can I go about creating a variable list from the local C:\Documents and Settings\%Username% dir?   I have it setup to run manually (as a SET /P %var%= ), which is fine, but some of these PC's have a lot (25+ profiles) on them. I'd like to create the list and loop the command to run the batch for each User profile.
 
My experience with Command-line is far greater than my VB experience, but I'm open to using/calling any script to accomplish this task.
 
Any help or advice is greatly appreciated, and if I need to elaborate more I will.
 
Thanks,
Posted 26-Jun-11 5:15am
SCraw28551.5K
Edited 26-Jun-11 5:30am
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You need to create script like this one.[^]. Go to section: Enumerating User Accounts on the Local Computer or Using WMI to Enumerate Local User Accounts
 
Running this script on local machine you'll get local accounts names. Changing piece of code, you'll will get full functionality of script.
  Permalink  
v3
Comments
SCraw2855 at 16-Oct-11 9:59am
   
Sorry I didn't accept this sooner.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Afzaal Ahmad Zeeshan 256
1 OriginalGriff 251
2 BillWoodruff 240
3 Maciej Los 230
4 Sergey Alexandrovich Kryukov 195
0 OriginalGriff 6,419
1 Sergey Alexandrovich Kryukov 6,008
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,070


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 26 Jun 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100