A new Flexera Community experience is coming on November 25th. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

%USERNAME% variable in directory path

VirtualAS
By
Level 2
Hi guys,

I'm pretty new with Admin Studio and I'm currently trying to create a custom MST install for Quicktime 7.71 with two custom user based configuration files that disable updates do all sorts of configurations on file associations etc...
However I'm having problems delivering these custom files as I don't know how to resolve %USERNAME% variable upon install:

Files should go to this location:

C:\Users\%USERNAME%\Appdata\Local\Apple Computer\Quicktime\QTPlayerSession.xml
C:\Users\%USERNAME%\Appdata\LocalLow\Apple Computer\Quicktime\QuickTime.qtp

Problem is that when I create the folder structure and give a folder name of %USERNAME% it doesn't resolve the LogonUser. Instead it creates a structure that reads:
C:\Users\%USERNAME%\....
So it never resolves to actual users ID.

Things I have tried so far:

1) I have used [LogonUser] and that didn't work

2) I Created a custom "Action Set Property" called CURRENTUSER and gave it a value of [LogonUser]. Placed the custom action in InstallExec Sequence with order of right after CostInitialize... (this didn't work, it just created a folder called C:\Users\CURRENTUSER....etc

Any advice on how to properly set up these two files to install in required folders would help me a lot.

Thank you all and sorry if this question was already answered. I searched the forums but was unable to find anything that could help me.
(3) Replies

robinholland
By
Level 2
Try using [%USERNAME] to capture the contents of the USERNAME environment variable.

Better yet, try using the folder property [AppDataFolder] which actually reperesents the appdata folder for the specific user of the machine.

slk537
By
Level 2
Hi:
I deploy Quicktime this way.

1. unzip quick time installer.
2. copy files to network share.
run this script on the workstations. The first path is all one line.
REM QuickTime 7.71
\\Path2networkShare\IEHelpers\QuickTime771\ AppleApplicationSupport.msi /qn
\\Path2networkShare\IEHelpers\QuickTime771\QuickTime.msi /qn

We also at different times block the update site with our webfilter.
Steve

VirtualAS
By
Level 2
Hi robinholland,

Thank you for your reply.

I have figured out the way to do this with built in variable called [CurrentUserFolder].

Procedure is to create a new component then add the file with path [CurrentUserFolder]\Appdata\Local\Apple Computer\QuickTime and
[CurrentUserFolder]\Appdata\LocalLow\Apple Computer\QuickTime

This worked fine.

[AppDataFolder] suggestion would not work as that variable points to Roaming folder by default, and I need Local and LocalLow.

Thank you.