none
wrong version of default app RRS feed

  • Question

  • ho2.exe is a c# program I wrote (VS 2017 Community), at the moment installed in version 1.6 . Months ago, when it was version 1.1, I associated the extension .ho2pro with this program. Now, when I double click a file *.ho2pro, ho2.exe starts, but with the old version 1.1 . Installed program is only the new version, dont know where he gets the old one. I tried several times in several ways to change the association, but without success. The system offers only a generic ho2.exe as default app. What can I do?

    Friday, March 15, 2019 2:14 PM

Answers

  • Windows isn't going to auto-find and use a program based upon the file extension. It has to be wrong in the registry and evidently fixing it under HKCU didn't solve the issue so I wonder if it is registered globally.

    1. Open the registry.

    2. Search for `.ho2pro' in the entire registry. (HKCR is where it should reside but lets be thorough).

    3. When found look at the file type that was created for it (the default value).

    4. Delete the `.ho2pro' key.

    5. Go to the file type key in the same registry subkey. Check to see what program it is starting.

    6. Delete the file type key.

    7. Repeat until there are no more references to these keys.

    8. Double click one of your `.ho2pro` files in Windows Explorer.

    9. If it auto-starts a program you missed an entry otherwise the `Open With` dialog should appear so you can select the correct version of your program.


    Michael Taylor http://www.michaeltaylorp3.net

    • Marked as answer by Hornebom Tuesday, March 26, 2019 8:34 AM
    Saturday, March 23, 2019 3:38 PM
    Moderator

All replies

  • Go to the registry under HKCR or HKCU\Classes depending upon whether it is per user or per machine. Find your extension and it'll give you the app type. Go to the app type and it will specify the full path to the executable to run. If you then go to that folder path it should be your app.

    As for fixing the association you'll have to review your installer code.


    Michael Taylor http://www.michaeltaylorp3.net

    Friday, March 15, 2019 2:58 PM
    Moderator
  • Registry looks like that - how to change the path and what does _auto_file mean?

    Monday, March 18, 2019 6:21 AM
  • Auto means a user manually created the association by right clicking an unknown file extension and then using Open With to select the program to use. This will override any program-assigned defaults. Either go into the registry and delete the file extension and file type keys and then run the installer (or whatever) to set up the extensions or go into Windows and find the option to reset the file association back to the default programs (Set Default Programs I think, I can't remember right now).

    If your program has no installer then you'll need to use Open With to assign a new default program. Alternatively go to the ho2pro_auto_file registry key and change the program path there.


    Michael Taylor http://www.michaeltaylorp3.net

    Monday, March 18, 2019 1:42 PM
    Moderator
  • Deleting the file extension in the registry and then using "Open With" still gets me the old version 1.1
    Tuesday, March 19, 2019 3:47 PM
  • When you use Open With it will show you the "registered" apps. You also have the option to browse to the program on disk. If you browse to the program on disk then that is the version being used. If you did that and it is still 1.1 then that is the version you're pointing it to. Open the properties on the binary and confirm the version.

    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, March 19, 2019 4:00 PM
    Moderator
  • I showed him explicitly the last version, still uses a very old one.

    Wednesday, March 20, 2019 12:47 PM
  • Go to the Details tab, that shows the version # of your app. The create date is mar 14 so this is pretty recent.

    Also look at the folder you're in. How did that folder get there? Do you have an installer that runs? If so then verify your installer is installing the correct version. If that isn't the correct folder then browse to the correct folder when using Open With to associate with the newer program.

    Ultimately if you don't need the older version then uninstall it. If you uninstall it and then install the newer version but it is still the older version then your setup program is wrong.


    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, March 20, 2019 1:33 PM
    Moderator
  • I use th community version, just "publish" (in german: Projekt veröffentlichen). then search for ho2.exe with the corrrect date.

    There is no older version to uninstall that I can see. Don't know, where the system keeps that.

    Thursday, March 21, 2019 6:14 AM
  • I see. That means you're using ClickOnce. Publishing your project doesn't actually install anything, it just creates the setup program. After you've published you then need to install the app by going to the publish folder and running the setup program that was generated.

    Note that if you are creating an app for others you'll generally publish to a file share or web site. You'll also enable the option to check for updates at startup so they don't need to manually update.

    For a ClickOnce app it will install per-user so the actual program will be installed under your user profile directory.

    Run the setup that is generated by publishing and then see if the correct version of your app runs. If not then please post the version details of the exe that is being run when you run your app.


    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, March 21, 2019 1:44 PM
    Moderator
  • After installing, the correct version runs. Only double clicking the data file starts the old version.
    Thursday, March 21, 2019 5:34 PM
  • Right, your ClickOnce setup doesn't auto-associate file extensions. You need to go back through the process discussed earlier where you use Open With to select the version that you just installed. You can get the correct path of the version you installed by running it and then going into Task Manager. When you use Open With then point it to that exact binary. If that still doesn't work then please post screenshots of each of these steps.

    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, March 21, 2019 5:47 PM
    Moderator
  • Hi

    Is your problem solved? If so, please post "Mark as answer" to the appropriate answer, so that it will help other members to find the solution quickly if they face a similar issue.

    Best Regards,

    Jack

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 22, 2019 5:51 AM
    Moderator
  • No. Always the same: the path in Task Manager to the actual running version 1.6, used by "Open with", still starts only the old version.

    Friday, March 22, 2019 7:21 AM
  • The path shown in Task Manager is to 1.6. How do you know this is the "old" version of your app? Do you have an about box that shows the version #? If so then did you actually change the version # in your app? Please also show us the Details tab of the executable.

    Michael Taylor http://www.michaeltaylorp3.net

    Friday, March 22, 2019 3:51 PM
    Moderator
  • I mark the versions manually in the main view:

    Friday, March 22, 2019 5:48 PM
  • Publishing isn't going to work properly if you aren't using assembly versioning correctly. Set the assembly version (Properties tab) of your executable project to the correct version that you want (e.g. 1.6.0.0). Then republish your app and then install it again. With an updated version the installer should overwrite the original version. Then check the version that is installed via Windows Explorer's Details tab and it should be the correct version # now. If it is then use Open With to associate with this new version and it should be correct now.

    Michael Taylor http://www.michaeltaylorp3.net

    Friday, March 22, 2019 6:12 PM
    Moderator
  • No, changing the version did not help, still started v1.1 .

    BUT: I found out, where the old version resides: in a debug folder of my project - hope that helps:

    Saturday, March 23, 2019 7:44 AM
  • Windows isn't going to auto-find and use a program based upon the file extension. It has to be wrong in the registry and evidently fixing it under HKCU didn't solve the issue so I wonder if it is registered globally.

    1. Open the registry.

    2. Search for `.ho2pro' in the entire registry. (HKCR is where it should reside but lets be thorough).

    3. When found look at the file type that was created for it (the default value).

    4. Delete the `.ho2pro' key.

    5. Go to the file type key in the same registry subkey. Check to see what program it is starting.

    6. Delete the file type key.

    7. Repeat until there are no more references to these keys.

    8. Double click one of your `.ho2pro` files in Windows Explorer.

    9. If it auto-starts a program you missed an entry otherwise the `Open With` dialog should appear so you can select the correct version of your program.


    Michael Taylor http://www.michaeltaylorp3.net

    • Marked as answer by Hornebom Tuesday, March 26, 2019 8:34 AM
    Saturday, March 23, 2019 3:38 PM
    Moderator
  • Thanks for your patience, all is well now: I deleted that old debug folder with the old version of ho2.exe (actual debug is in x64 folder), used "Open With" with the last installed version of ho2.exe and it worked. (In regedit I gave up after finding 6 "ho2pro" and left them, I am a bit anxious about fumbling in the registry.)

    Long time ago, it seems, I associated that debug exe file with ".ho2pro", and the system would not let it go, until I deleted it for good.

    Thanks again for your help! 

    Sunday, March 24, 2019 5:52 AM
  • Hi

    Is your problem solved? If so, please post "Mark as answer" to the appropriate answer, so that it will help other members to find the solution quickly if they face a similar issue.

    Best Regards,

    Jack

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 25, 2019 7:59 AM
    Moderator