I'm working with an application that needs advertised shortcut/selfheal to propogate per-user settings. I have repackaged the application and the self-healing works as it should from both it's shortcut and file association.

The issue I'm having is that i need the application to launch with the arguments -data %APPDATA%\Xmind. This works fine from the advertised shortcut. It doesn't work from the file association. The application launches, but the %APPDATA% environment variable doesn't resolve. If i make the file association manually via registry entries (no self-heal for this entry point), it works. Can anyone help me understand why this isn't working?


Answer Summary:
Never found out why it didn't work, but i worked around it by making a script that sets the settings in all the systems profiles and the default profile during installation.
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



Try importing that registry you created for file association in your project either through the registry table or file association tables and see.

Answered 08/02/2012 by: dj_xest
Fifth Degree Black Belt

Please log in to comment

have you tried a reboot after the self heal. The file association might work after that.

Answered 08/02/2012 by: piyushnasa
Red Belt

  • The association works either way. The application opens the file. The issue is in resolving the %APPDATA% environment variable when it's launched through an advertised file association. If i set the same parameter in a regular advertised shortcut, it resolves, no problem. This is what bums me out.
  • what if you remove the advertisement for your file association?
    • Exactly how do you do that?
  • Then it resolves %APPDATA% and launches, but the self-heal functionality will ofcourse be disabled. If a user starts the application for the first time from it's filetype instead of the start-menu entry the user won't get the predefined settings.

    I've worked around this now by writing a script that goes through every logged on user and the default on the system and sets the settings where they should be during install.
Please log in to comment

Why don't you add this Arguments in "Argument" column of "Verb" table for that particular extension

Note that the resolution of properties in the Argument field is limited. A property formatted as [Property] in this field can only be resolved if the property already has the intended value when the component owning the verb is installed. For example, for the argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the component that owns the verb.


Answered 08/02/2012 by: jagadeish
Red Belt

  • Thanks for the info.
    That's what i did (i think). Installshield made the file association entry automatically. I added the argument to redirect the application data to appdata. It works if the file association is made through registry entries (so it doesn't use advertised entry point). I just can't see how that should affect how environment variables resolve. I have also tried using properties, but no go (as you said).
    I'm not at work right now, but if i get the time i'll check if it out.

    Do you know if the file association entry have to be in the same component as the application shortcut?

    The real issue here is that the application is made with eclipse and is Java-based. Java has a bad way of determining a users profile path. It gets the users desktop path, and goes up one level. We have redirected our users desktops to a different drive, where we don't want application specific data. A workaround for that is using the -data switch and pointing to where you want it manually.
Please log in to comment

Actually this may not be the answer for your question but related to your application, I deployed the same application using silent switches

"%~dp0Xming-6-9-0-31-setup.exe" /verysilent /norestart /LOG="%systemdrive%\install\logs\Xming_6_9_0_31.log"

del /S /Q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Xming\Uninstall Xming.lnk"

del /S /Q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Xming\Xming on the Web.lnk"

REM Return exit code to SCCM

exit /B %EXIT_CODE%

So Jus incase if your CurrenUser settings not applied you can deploy in the above manner

Answered 08/02/2012 by: ontari.ontari
Black Belt

  • Hehe, I'm packaging Xmind 3.2.1, not Xming ;)
Please log in to comment