none
Clickonce: after publishing, running Setup.exe from shared folder freezes computer RRS feed

  • Question

  • Hi,

    During last years I have been successfully using ClickOnce, publishing an application from Visual Studio 2017. Signed it and published it in a local folder (which it is shared as network share). So the users can install it given this shared folder location. Then application gets the updates automatically from that shared folder.

    Well, this is not working anymore.

    Now when the user clicks the setup.exe from the shared folder, e.g. \minky\test, then the system becomes irresponsive. IT shows a wait cursor, it can be like this for one hour, I don't really know but it's more than 15 min or half hour.

    Other applications using explorer services are affected, the system becomes a bit unusable. This is unprecedented. I mean how can a setup.exe cause this trouble? The app is nothing special.

    Currently I'm using Visual Studio 2019 but I tested the old application in 2017 and it doesn't work either, so there has been some changes in Windows.

    Some information:

    • The .application file (this does not consider prerequisites) works partially. If I click on the .application file it start installation. However when it's finalizing the install, it hangs too. I think because it interacts with the setup.exe (I say this because the setup.exe gets locked, even I didn't do anything with it).
    • If I publish the app without prerequisites, then there is no setup.exe, and the .application file works well. This is my only option.
    • I think the problems are related to what the setup is doing, and considering that long timeout. I guess it might be a popup message informing of the prerequisites install, which is not shown and the process stops forever. This anyway should explain (or not) why the system becomes irresponsive.
    • If the setup.exe is executed locally, then it works! so it's related to the fact that runs from the network. Perhaps is trying to access the other files (.application and the Application folder) and could not access them.
    • I have given permissions to folder and share to 'everyone' The application could be very simple. I replaced my application with a default winforms (as it is created by VS) and it happens the same.
    • I used Bit Defender and I removed it and left Windows Defender. It didn't change much.

    Please help. I need to install this for some customers as I did in the past, and this problem is blocking everything.

    Thanks a lot

    Ray.


    • Edited by Ray Nogue Friday, May 8, 2020 1:49 PM improve grammar
    Friday, May 8, 2020 12:39 PM

All replies

  • Hi Ray Nogue,
    >>If I publish the app without prerequisites, then there is no setup.exe, and the .application file works well.
    What are included in your prerequisites? And it is recommended that you check whether the log contains some error information.
    >>If the setup.exe is executed locally, then it works! so it's related to the fact that runs from the network.
    As you said , it is mostly caused by the network. And I have some suggestions you can refer to.
    1.Check if the permissions are set correctly on the share. Try to allow "domain users" and "domain computers" to access the share.
    2.You can try to start a command prompt as administrator first. From there enter the following command:
    For example: net use c: \\server\share
    3.You can add the network location to your Trusted Sites list in IE.
    4.It may also be related to UAC, more details you can refer to this document.
    Best Regards,
    Daniel Zhang


    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, May 11, 2020 3:01 AM
  • HI Daniel,

    Thanks for your reply, I will answer your suggestions:

    • Prerequisites are just .NET Framework 4.8,  I tried with others like 4.7.1.  In fact I tried to activate prerequisites but do not select any prerequisite. It doesn't change the problem. The setup.exe hangs.
    • Permission on the share are for "everyone" full access, also for the disk folder.  (I still need to try adding domain users and computers...)
    • The command net use works well, I can see the contents for the folder but when I run setup.exe it will hang forever. I cannot even stop it with control-c or whatever I can do.
    • I added the network share to the Trusted sites. But how?  adding something like \\computer  becomes  file://computer
    • I looked to your link about UAC and implemented that, I think it was for Windows 7,  I also look somewhere else about disabling UAC in windows 10.  Nothing worked.

    So the situation is that I'm still the same.  You mentioned about Logs, which Logs? I would love to find some logs, but nothing that I know. Do you mean windows events?  There are clickonce logs, but they are filled a bit later,  so when the setup.exe or .application is launched, it comes the first screen then is when some logs records are created for clickonce. In my case the setup.exe is not reaching the first screen.

    It's really frustrating, I don't even have a process that I can close. I think the process is still explorer.exe or those.

    Thanks again.

    Ray.


    Tuesday, May 12, 2020 2:46 PM
  • Hi Ray Nogue,
    Have you selected the two check boxes shown in the picture below?
    And  AndyD273's answer may be helpful to you
    Best Regards,
    Daniel Zhang


    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.

    Wednesday, May 13, 2020 8:29 AM
  • Hi

    Yes those were selected. I tried all possible combinations, even with prerequisites in the same location or by not selection any prerequisite. It didn't work.  There is something about the setup.exe, I guess it is trying to find the .application file but it can't.  (I am just throwing ideas).

    Another aspect, is that let's imaging that i could tweak the UAC and all this stuff by working on the registry and other parts. Well that would be good, so to find a solution, however this needs to work for all the users. And I can't start manipulating users machines.  Before it was working for everybody so it needs to be something else. Something related to how the setup.exe is created. Perhaps it needs a post processing, with the Mage.exe (Manifest Generation and Editing Tool). Do you have experience with it or you think it may be a solution?

    I definitely miss logs, so I appreciate if you can tell me how to find any logs. I was even considering performing a "debug" of the exe file, but this is something crazy because I have no sources.

    Regards.

    Ray.

    Friday, May 15, 2020 1:28 PM
  • Hi Ray Nogue,
    I'm sorry to reply so late. And I suggest you use Regedit.exe to create a file to store the log.
    Then check the log file to get the failed information. Here is a related document.
    Best Regards,
    Daniel Zhang


    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.

    Thursday, May 21, 2020 8:25 AM
  • No problem same here. 

    I already set up those logs.

    Well the logs can show something but not yet at that moment. I mean, when the setup.exe is clicked, it takes some time until starts filling some data in that log.  I think first needs to find the file .application, check prerequisites and run then run the application, and I have the impression that the problem lies there. So it freezes trying to know where is the file or dealing with the prerequisites or with some hidden popup or something that will block partially the explorer.exe for an hour, until there is a timeout.

    Thanks

    R.

    Wednesday, May 27, 2020 11:27 AM
  • Hi Ray Nogue,
    I'm so glad you found the cause of the problem, we suggest that you mark it as the answer. So it can help other people who have the same problem find a solution quickly.
    Best Regards,
    Daniel Zhang


    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.

    Thursday, May 28, 2020 2:15 AM