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!

 

 

 

 

 

Answer Summary:
use a SetDirectory custom action, and set the new target to be: \\servername\whatever\[%USERNAME]
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

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.

Answered 11/02/2012 by: darkhawktman
Green Belt

Please log in to comment
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.

 

Answered 11/05/2012 by: egiberne
Second Degree Brown Belt

Please log in to comment
0

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

Answered 11/05/2012 by: captain_planet
Second Degree Brown Belt

  • That did it, I was a bit of a tool, and did not include the full path. Thanks!
Please log in to comment
Answer this question or Comment on this question for clarity