We have an in-house Windows application that I have been requested to package. Now the application will have to be captured using the snapshot method because they used a custom installer instead of MSI. During the current install it prompts for the Active Directory user name of the user that is going to be running the application and the creates a local group on the system and then adds that user to it. Now during the snapshot it's going to capture my information or whatever I enter. How do I get that information from each user when they run the installer on their machine? I imagine I use a vbscript to prompt the user for their user name and then add it to the group? Is this how something like this is usually handled?


By the way I'm using AdminStudio. I went to a training a course this past year, but they didn't cover anything even close to this scenerio. Course was very basic and was more about the AdminStudio interface then application packaging itself.



0 Comments   [ + ] Show Comments


Please log in to comment



Good grief! Rely on a user to correctly type in their log-in name? Pah!

Use the environment variable %USERNAME% in its specially formatted form for Windows Installer properties, viz. [%USERNAME]. And yes, there is only one '%' symbol.

If you decide to go the scripted route, there are plenty of examples around on how to use environment variables (which is different to Windows Installer, obviously!) and creating groups. This route will obviously give you more robust error-handling e.g. aborting the installation if the group creation failed.

If it was *me*, I would create a script to create a local group which contains a domain group as its only member. You can then administer that group - and therefore the local group - using ADUC. Easy.

Answered 12/07/2012 by: VBScab
Red Belt

Please log in to comment

Thanks for the reply. Yea I thought about the environment variable but what if they're logged in with a local account? This application has to run with an AD account and you only have one shot to get the user name into the new group it creates.

I hear you about the entering the name in incorrectly. The original installer must check AD because if you enter a name that is incorrect it will error.

Answered 12/07/2012 by: notta
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity