Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read subsequent lines of TXT file via script.

Status
Not open for further replies.

GordonPrice67

IS-IT--Management
Mar 12, 2012
5
US
I have a piece of software (Autodesk Revit) that requires a user install component, where the individual user must be logged in the do the initial launch of the software, and then customize the data that is seeded. Commonly a firm may be installing the software on tens to hundreds of machines, so automating the user side of the install is a huge time saver.
The approach I am looking at is to leverage Roaming Profiles, AutoAdminLogon & RunOnce reg keys to log in to the machine as each user, launch the software and modify the user data, then log out and log in as the next user. I plan to use the DeleteRoamingCache reg key to keep the local machine from getting swamped in roaming profiles.
The VBScript piece I am struggling with is automating the constantly changing username for the auto login. My thought is to have a comma delimited txt file with username, password pairs, and as each user finishes, it looks at the list, finds it's own name, then seeds AutoAdminLogon with the name and password that comes next. I am just wondering if this is the most elegant approach?

The plan is to do this on a VM where all users have rights to change AutoAdminLogon, and the VM will have nothing installed but Windows and Revit, so there SHOULDN'T be any extraneous stuff getting into the roaming profiles. ;)

Thanks for any insights!
Gordon
 
Just curious if he have tried digging deeper to see what this tool is actually changing on the system that even requires user intervention. Can't you enumerate the HKLM\Software\microsoft\Windows NT\ProfileList to get all the user SIDs and then script connections to HKCU to set the needed keys and totally bypass user intervention?

I hope that helps.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
The thing is, it isn't just registry stuff that is customized to the user. Revit will create folders in the Roaming Profile, and then dynamically create files in those folders. The files are not copied from somewhere, where I could customize the seed files. The customization can only happen after Revit creates the files, and it only creates the files when run in user context. It is, to be blunt, a really stupid way to do it, but this is Autodesk after all.
As for the registry stuff, Revit creates literally many hundreds of reg keys, of which I need to modify 10 or so after the fact, and if only some of those keys are present when Revit runs for the first time, it will overwrite those that are there with default values, so the only real option is to wait until Revit has done its thing, then modify the results, at which point Revit will leave it alone. Again, a really poor mechanism, but the cards we are dealt when dealing with Autodesk products.
That said, I never knew you could mine HKLM for the profile list and modify non current users. THAT will come in handy in other ways I am sure.

Thanks!
Gordon
 
Bummer that you can't reverse engineer it via the registry. I thought that would be the best opportunity for automation for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top