/build/static/layout/Breadcrumb_cap_w.png

Variable Install Directory

Hello all,

First off all, disclaimer, I am a packaging noob, just getting my feet wet with this process, so bare with me. 

I am trying to package an application with 2 different directories created when installed, the first one is the core install dir, and not an issue. the second directory is where my headache is. It's a network storage folder for all of the user data generated in this application, and the kicker is the target folder name needs to be named after the logged in user, And, these folders are pre-created by a login script unrelated to the MSI I am building.

So, essentially I need the second directory to find the logged in username folder on the network drive and install to it, but it also needs to be universal so it can be deployed en mass.

I tried to be as clear as I could be, if I wasn't I will try to clarify. I am using Adminstudio to create the package, and the application in question is Accumap by IHS.

 

Thanks for any and all assistance!

 

 

 

 

 


0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
use a SetDirectory custom action, and set the new target to be: \\servername\whatever\[%USERNAME]
Posted by: darkhawktman 12 years ago
Green Belt
0

I'm assuming you are installing this while the user is logged into the computer. Here is a little VBScript that I have that can get the name of the current logged in user.

strComputer = "."
who = "winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &""
Set Users = GetObject( who ).InstancesOf ("Win32_ComputerSystem")
For each user in Users
Wscript.echo user.username
Next

Hopefully you can use this to dynamically set the install directory.

Posted by: egiberne 12 years ago
Second Degree Brown Belt
0

Hi,

I understood, you want the msi look for the directory on the network drive. It possible to do it , with System Search Menu.

 

 

Hope it helps.

 

Posted by: captain_planet 12 years ago
Black Belt
0

....you could also use a SetDirectory custom action, and set the new target to be: \\servername\whatever\[%USERNAME]


Comments:
  • That did it, I was a bit of a tool, and did not include the full path. Thanks! - ostentatiousbadger 12 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ