No announcement yet.

The window pops up twice when I cancel the SW installation

  • Filter
  • Time
  • Show
Clear All
new posts

  • The window pops up twice when I cancel the SW installation

    I found a phenomena and would like to find a solution.

    I made a project for the USB flash drive. And one of the software in the project is set to be installed with the administrator permission(Windows OS).
    When I run autorun.exe and click the install button which linked to the SW, the User Account Control(UAC) window pops up as intended.
    However, when I click the [Cancel] button on UAC window to abort the installation, the UAC window pops up again and I have to click [Cancel] once again to cancel it.

    I do not suspect it was the SW's problem because the window appears only once when I run the SW installation file alone.

    Does anybody experience similar issue above or know the solution for that?
    It would be so much appreciated if you suggest me a solution.

    BTW, I use File.Open script to activate the SW installation. Is it bcz of the wrong choice? Here's my script.

    File.Open("Autoplay\\Setup\\EXAMPLE_Setup.exe", "", SW_SHOWNORMAL);
    Thank you and have nice day:yes

  • #2
    If you manifested your AutoPlay project to be run as administrator, you can use File.Run() to start the setup, because the new process would inherit the administrative rights already granted. If your AutoPlay project was manifested to be run as invoker (default), then use Shell.Execute() instead to start the setup.



    • #3
      Dear Ulrich,

      I use Shell.Execute() as you replied and it works w/o problem!

      Thank you so much for your help.