Disable Restart Button While Desktops are Restarting

Disable Restart Button While Desktops are Restarting

book

Article ID: CTX139855

calendar_today

Updated On:

Description

This article describes how to configure the StoreFront to ignore clicks on “Restart” while desktop is powering off and while it is powering on again.

Background

When the user’s desktop is restarting, there might be issues if they repeatedly click on the desktop.


Instructions

Complete the following steps to configure StoreFront:
  1. Backup the file c:\inetpub\wwwroot\Citrix\StoreWeb\contrib\custom.script.js.

  2. Open the file c:\inetpub\wwwroot\Citrix\StoreWeb\contrib\custom.script.js.

  3. Add the following text into the custom.script.js file and save the file:

    CTXS.origPromptForRestartDesktop = CTXS.promptForRestartDesktop;
    CTXS.promptForRestartDesktop = function (desktop) {
        var $desktopElement = $('#resources-mydesktops').find('.resource[index="' + desktop.index + '"]');
        if (!$desktopElement.hasClass('poweroff-waiting')&& !$desktopElement.hasClass('launch-waiting')) {
            CTXS.origPromptForRestartDesktop(desktop);
        }
    };
    
  1. Open command prompt and run command IISRESET.

Issue/Introduction

This article describes how to disable restart button when desktops are restarting.