I am working in SyncDocs and have most of it worked out, my questions is that I know (from reading) that NSIS supports $Desktop as a known environmental variable I do not see this listed in the PA Launcher manual. Is it a hidden feature or does it recognize Desktop or do I need custom code?
Basically I need to on launch of program move a shortcut from the Data folder to the desktop then back again on program close. The Desktop feature of NSIS seems the one to use but it just does not seem to want to work.
Edited appears that %USERPROFILE%\desktop will work for me just curious now if maybe the variable for desktop could be added to PA Launcher?
What you have will work on English systems only. Put the following in Pre custom code instead:
SetShellVarContext current
${SetEnvironmentVariablesPath} DESKTOP $DESKTOP
Then you can use %DESKTOP% in launcher.ini
Things like that belong in Init, not Pre.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I wasn't sure if it would work in Init, and I'm not at my computer to test it, so I put it in Pre to be safe, since the default variables have already been set at that point. If it'll work in Init, I agree, that is the best place for it.
Seems to not be recognized as a variable it moves the info to the Apps root in a folder called %Desktop% not sure if I implemented it correctly? No worries was just a thought
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
Could you post the contents of your launcher.ini, and Custom.nsh, please?
The one that works or the one that doesn't?
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
Whatever you're using that moves it to app's root, as you indicated.
http://pastebin.com/KniBr2cR custom.nsh
http://pastebin.com/F3DQi5Ei launcher.ini
This is for the DESKTOP move you suggested
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
Get rid of the backslash after %DESKTOP% in launcher.ini, then it should work.
tried it without slash and got same results so I tried it with
Neither way seemed to work
OK here is what I did apparently I need to rebuild the launcher because after I did that and without the backslash it worked
Thanks
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
Glad to have helped.
I will use it next month on the new release, since I just uploaded a dev 2 don't want to scare anyone off with a dev 3 right off lol
They update the base app every month or so.
BTW no more emails from me lol for now on I will be on my own lol
Still think it should be imported into launcher though IMHO
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
As this is a legitimate reason to put out dev 3, and fairly simple to do so, I strongly encourage you to do so, as opposed to holding off.
Also, there are very few cases in which anything should be put on a user's desktop, so not having it directly supported is not a bad thing, in my opinion, anyway.
Currently it is being handled via the UserProfile setting, also It is basically only an English program But you know best. The only reason why I needed it is that by default the folder link goes to desktop, if not there it creates one. So by moving it back and forth it "fixes things"
Upload in progress guess there goes my credibility with base app developers
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
Unfortunately there are a couple of ways to place things on the desktop, making it hard to add a single environment variable to cover it.
Wouldn't it be more worth petitioning for a [FilesRemove] (or [FilesDelete] to differentiate the name for readability), or maybe a modification to [FilesMove] where -=Place\Where\The\File\Is\filename would delete instead of copy to the Data directory?
in this case it would recreate the shortcut each time it is launched. My original question was more to do with why NSIS used the variable and PA Launcher did not. No biggie though as Gord and Chris resolved it for me. And actually it is an option in the base app to not create a desktop icon but it is a PITA to find and I can not use a default xml since the xml has many other options that are set up per account. I am happy with what there is, was just wondering why it was not part of it
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss