Archive: modify path startIn Icons


modify path startIn Icons
Hi,
can you help me please,

I want to do an install of .exe, the installation wil be ok and the startin of my icons is for All Users.
i have many users to use shortcuts they copy it on her computers, i want when they start icons, the path of start in change with the current user.

can i do that please?


"I want to create a shortcut for all users, but the working directory of the shortcut must be different for each user."

Is that what you mean? If so, then you need to put an environment variable in the working directory, such as "%LOCALAPPDATA%\YourApp\WorkDir". I'm not sure if this is possible using standard NSIS commands, as the workdir is set through SetOutPath, and it might convert the variable to a path. Try it.


I try the $APPDATA and it's don't work :( .

I create my exe in a server and i have many users, they copy the shortcuts, I want to have for each user his path in the start in.

for example my Startin in the server is "\Documents and Settings\All Users\Start Menu\Programs" , and I want If XY copy the shortcut in his computer he will have startin: "\Documents and Settings\XY\Start Menu\Programs".

Thx.


You should not use an NSIS variable like $APPDATA. You should use an environment variable, such as %APPDATA%.

But again, I'm not sure if this is possible in the 'normal' NSIS way. Try it:
SetOutPath "%APPDATA%\YourApp\Workdir"


thx for your answer,

but how can I get the value of %APPDATA% for each user when he copy the icons in his work directory?

i search and i can't have a solution for that :confused:

can you help me please.
Thx.


You should NOT get the value, that's the whole point. You need to leave it as the exact string, "%APPDATA%", so that Windows can determine it by itself when the shortcut is executed.


Thx for your help, it's working, just i have a last problem i use two os xp and seven and I can't use the some path for both.

For Xp I use "%USERPROFILE%\start Menu \programs"

For Seven I use "%APPDATA%\Microsoft\Windows\Start Menu\programs"

How can I have the path for both?

Can you help me please.
Thx


Please do not set Start Menu as the working folder........


why I don 't do that ? it poses a problem to do it ?


You don't want your application to store files in the start menu, do you?


is not a problem for my application to do that.


Originally posted by hanenjom
is not a problem for my application to do that.
Yes it is a problem, you cannot let the user store files in the start menu.

If your application depends on the working dir then set it to the required folder, if not, set it to $windir, $instdir or something like that.

There is one case where it wouldn't be a problem if you set the working dir to the start menu: If the application only creates start menu shortcuts.

For anything else, it is indeed a problem. You should not store normal files in the start menu.


thx for your answers ans explications, I will change it .