/build/static/layout/Breadcrumb_cap_w.png

%USERPROFILE% in Registry

Hi
I'm trying to package Photoshop Elements 3.0 and thera are two "database" files stored in "C:\Program Files\Adobe\Photoshop Elements 3.0\shared_assets\database\odbc"
I would like to move these and redirect them to:
"%userprofile%\Application Data\Adobe\Photoshop Elements\3.0\Organizer"
Ny problem is that I don't know how to use the variable %USERPROFILE% in registry. When I use the full path to the users profile it works but when I use the string above it don't.
Does anyone know how to solve this?
Best Regards Henrik

0 Comments   [ + ] Show comments

Answers (10)

Posted by: brenthunter2005 14 years ago
Fifth Degree Brown Belt
0
Hello,

When you want to specifiy an environment variable in the registry table, you need to leave off the trailing percentage sign.

eg: %USERPROFILE
Posted by: knight 14 years ago
Orange Senior Belt
0
the best way to insert this on reg is like this:
[USERPROFILE]Application Data\Adobe\Photoshop Elements\3.0\Organizer

Hope this help.


knight
Posted by: brenthunter2005 14 years ago
Fifth Degree Brown Belt
0
I don't want to sound pedantic, but it would be better to use:

[AppDataFolder]Adobe\Photoshop Elements\3.0\Organizer
Posted by: alstersjo 14 years ago
Senior Yellow Belt
0
Thanks for your answers. I have run in to other problems, so I will try them later.
Brenthunter, I want the files on the server where our Roaming profiles are stored, therefore the %Profile% var.
The users don't have write permissions under there and are moving around the computers, so I want as much as possible build away dependensies of a specific computer.
Regards Henrik
Posted by: brenthunter2005 14 years ago
Fifth Degree Brown Belt
0
The Application Data folder is part of the users profile and will be saved to the server when a user logs off.

As for the "users don't have write permissions", I don't understand that as users always have write permissions to their profile, otherwise they can't update them.

Are you talking about the "All Users" profile?
Posted by: alstersjo 14 years ago
Senior Yellow Belt
0
Ok, my bad. I figured the variable you specified where to C:\program files\...
Sorry for that
I will check that var out. Thanks
//Henrik
Posted by: brenthunter2005 14 years ago
Fifth Degree Brown Belt
0
[AppDataFolder]Adobe\Photoshop Elements\3.0\Organizer

=

C:\Documents and Settings\username\Application Data\Adobe\Photoshop Elements\3.0\Organizer


Ensure that this registry key value is stored in the Current User registry. If it is stored in the Local Machine hive your MSI package set the registry key to the first user that installs the package.
Posted by: WiseUser 14 years ago
Fourth Degree Brown Belt
0
If it is an HKLM key, you could try writing "%UserProfile%" and using the "REG_EXPAND_SZ" registry type.

This may or may not work. Depending on the code used within the application, it could return a string or an expanded string.
Posted by: alstersjo 14 years ago
Senior Yellow Belt
0
Thanks for your input everyone. I went with the [Appdata] approach and got it to work just fine.
//Henrik
Posted by: Thegunner 14 years ago
Second Degree Green Belt
0
Hi all,

A questions simlair to this.

We have a application on some users pc's which stores files in the users profiles in a folder called "Windows". These are roaming profiles as well.

There is a new INI file which I need to push out to all the users, so it replaces an old INI file.

What is the best way to go about this, as all I was going to do is to add the file in a msi and push the msi file out. Will that replace the file or will the MSI realise its exist and not replace it?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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