Using Environment variable %USERPROFILE%


#1

Hi
I am evaluating Paquet Builder for building a self extracting exe and find it supports most of what I need. I have run into one issue though.

Our Software is going to be used by a few users running windows using Parallels on Mac. For such user the Desktop, Downloads, MyDocuments etc is mapped to a network path to mac. This is done by parallels so that Mac OS and Windows are both sharing the same desktop etc.

I want to give the default location of extraction to users Desktop but then because of the above its getting installed on the network path. I want it to physically get installed to C:/Users/Desktop

To be able to do that is I tried using a variable like %USERPROFILE% thinking that it would resolve to the environment variable but that does not seem to work.

I tried %APPDATADIR%…\Desktop for this and it worked but will be confusing to the end user.

My question is is there a way I can add a custom variable that resolved to environment variable like %USERPROFILE%

I think it will be a good addition to the software to pick any environment variable not just whats listed on the global variables.

Thanks
Mohit Mathew.


#2

Fortunately, the feature you requested already exist. It’s the “Perform operation on a variable” custom action that can read environment variables:
image

The resulting variable is set to the value read from the Windows environment variable specified by Value. For instance “TEMP” will return the default temporary folder.


#3

Thanks for the quick response… I was able to create a custom variable
during the initialization and use it.

Regards,
Mohit


#4

Now available in Paquet Builder 2018