locked
VB.NET Click Once Deployment - Error

    Question

  •  

    I have a vb.net 2005 application that I am deploying via Click Once deployment.  On one particular user's laptop, the application install is failing and giving a "Application cannot be started.  Contact application vendor." error message.  The message box has a "Details..." button, but it is not enabled...so it's pretty much useless.  The only prereqs for this application are the .NET Framework 2.0 and MDAC 2.8 and I have verified that both are installed on this particular machine.  I tried installing it on my laptop and everything worked fine.

     

    I've also tried clearing out the "cache" (under the /Docs and Settings/{username}/Local Settings/Apps/2.0/ folder) but this is a new laptop and the /Apps/2.0/ folder does not exist.

    I've also tried installing the application with an account with Admin rights, but it still failed with the same error (and no details).

    Tuesday, September 25, 2007 3:31 PM

Answers

  • RJoub,

     

    Based on your post, you have some questions on ClickOnce deployment. I would like to provide you the suggetions according to each of your problems:

     

    1. "Application cannot be started. Contact application vendor" error message: These are generic error messages that occur when the application cannot be started, and no other specific reason can be found. Frequently this means that the application is somehow corrupted, or that the ClickOnce store is corrupted. " For further information, please take a look at the following article:

     

    Troubleshooting Specific Errors in ClickOnce Deployments 

     

    2. Folder rights issue. Actually this is a common issue. You can take a look at the related threads on the issue with the solutions. I would like to provide you two of the threads:

     

    Smart Client Install/Uninstall broken

     

    The shortcut folder on your start menu may be locked in some way preventing ClickOnce from creating new shortcuts. You can try deleting the shorcut folder manually and then trying the install again. To delete the shortcut folder navigate to "%userprofile%\Start Menu\Programs" and delete the folder corresponding to your Publisher Name.

    If you're not sure of this name open your .application file and look for: <description publisher="XYZ" />, you want to delete "XYZ" folder to make sure it's not locked.

    If you get Access Denied error trying to delete this folder most likely some other process is holding on to it. Kill the process that's locked this folder and try again. To determine which process is holding the lock you can use procexp.exe tool available at sysinternals.com. Or reboot the machine to reset any locks, that should fix it as well.

     

    ClickOnce Application cannot be Started, help

     

    The access denied error in our case was definitely in the registry entry that ClickOnce needs to access. The user could not even open the key HKCU\Software\Classes

    After creating a new domain user and trying that one, then trying the old domain user on a different computer and having both of those work we checked at the file level what was actually different in the users Local Settings between the machines that worked and those that did not. We have found (at least for our case) the corruption.

    It is:
    %userprofile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat

    Deleting this file (with a different, sufficiently privileged user otherwise the file will be locked) causes it to be recreated on the next login. After that the ClickOnce install works just fine thanks.

    (disclaimer: I have no idea what other effects re-creating that file may have, but it looks like that file controls access to the users Software\Classes registry key and don't think any application could access that registry key as it was anyway...)


    3. The ClickOnce deployment application update issue. Please take a look at the following article:

     

    Choosing a ClickOnce Update Strategy

     

    ClickOnce can provide automatic application updates. A ClickOnce application periodically reads its deployment manifest file to see if updates to the application are available. If available, the new version of the application is downloaded and run. For efficiency, only those files that have changed are downloaded.

     

    When designing a ClickOnce application, you need to determine which strategy the application will use to check for available updates. There are three basic strategies that you can use: checking for updates on application startup, checking for updates after application startup (running in a background thread), or providing a user interface for updates.

     

    Hope that can help you.

    Saturday, September 29, 2007 10:44 AM

All replies

  • I ended up creating a setup and deployment project for this application, and was able to successfully install it on this particular user's laptop.  The only downside to installing it this way is that it won't go out and check for application udpates, so I'll need to revisit this user when an update is put out.  I also noticed that even though I specified a folder under Program Files for the installation location, it dropped all of the files to the root of the C drive.  I'm guessing this points to some folder rights issues.

     

    Thursday, September 27, 2007 1:13 PM
  • RJoub,

     

    Based on your post, you have some questions on ClickOnce deployment. I would like to provide you the suggetions according to each of your problems:

     

    1. "Application cannot be started. Contact application vendor" error message: These are generic error messages that occur when the application cannot be started, and no other specific reason can be found. Frequently this means that the application is somehow corrupted, or that the ClickOnce store is corrupted. " For further information, please take a look at the following article:

     

    Troubleshooting Specific Errors in ClickOnce Deployments 

     

    2. Folder rights issue. Actually this is a common issue. You can take a look at the related threads on the issue with the solutions. I would like to provide you two of the threads:

     

    Smart Client Install/Uninstall broken

     

    The shortcut folder on your start menu may be locked in some way preventing ClickOnce from creating new shortcuts. You can try deleting the shorcut folder manually and then trying the install again. To delete the shortcut folder navigate to "%userprofile%\Start Menu\Programs" and delete the folder corresponding to your Publisher Name.

    If you're not sure of this name open your .application file and look for: <description publisher="XYZ" />, you want to delete "XYZ" folder to make sure it's not locked.

    If you get Access Denied error trying to delete this folder most likely some other process is holding on to it. Kill the process that's locked this folder and try again. To determine which process is holding the lock you can use procexp.exe tool available at sysinternals.com. Or reboot the machine to reset any locks, that should fix it as well.

     

    ClickOnce Application cannot be Started, help

     

    The access denied error in our case was definitely in the registry entry that ClickOnce needs to access. The user could not even open the key HKCU\Software\Classes

    After creating a new domain user and trying that one, then trying the old domain user on a different computer and having both of those work we checked at the file level what was actually different in the users Local Settings between the machines that worked and those that did not. We have found (at least for our case) the corruption.

    It is:
    %userprofile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat

    Deleting this file (with a different, sufficiently privileged user otherwise the file will be locked) causes it to be recreated on the next login. After that the ClickOnce install works just fine thanks.

    (disclaimer: I have no idea what other effects re-creating that file may have, but it looks like that file controls access to the users Software\Classes registry key and don't think any application could access that registry key as it was anyway...)


    3. The ClickOnce deployment application update issue. Please take a look at the following article:

     

    Choosing a ClickOnce Update Strategy

     

    ClickOnce can provide automatic application updates. A ClickOnce application periodically reads its deployment manifest file to see if updates to the application are available. If available, the new version of the application is downloaded and run. For efficiency, only those files that have changed are downloaded.

     

    When designing a ClickOnce application, you need to determine which strategy the application will use to check for available updates. There are three basic strategies that you can use: checking for updates on application startup, checking for updates after application startup (running in a background thread), or providing a user interface for updates.

     

    Hope that can help you.

    Saturday, September 29, 2007 10:44 AM