Skip to content

Instantly share code, notes, and snippets.

@jespersh
Created July 12, 2019 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jespersh/bdc9f4eee964ef918d123203e87988d9 to your computer and use it in GitHub Desktop.
Save jespersh/bdc9f4eee964ef918d123203e87988d9 to your computer and use it in GitHub Desktop.

Extracted app.asar file in resources:

C:\Program Files (x86)\Test Runner (Azure Test Plans)\resources> npx asar extract app.asar app

Opened Main.js in C:\Program Files (x86)\Test Runner (Azure Test Plans)\resources\app\lib\Main

Added the lines:

        if (this.isSingleInstance()) {
+            electron_1.app.commandLine.appendSwitch('auth-server-whitelist', 'tfs.ourdomain.dk');
+            electron_1.app.commandLine.appendSwitch('auth-negotiate-delegate-whitelist', 'tfs.ourdomain.dk');
            this._uncaughtErrorHandler = inversify_config_1.inversifyContainer.get(CommonTypes_1.COMMONTYPES.IErrorHandler);
            this._ipcMainEventHandlers = inversify_config_1.inversifyContainer.get(CommonTypes_1.COMMONTYPES.IMainEventHandlers);
            this._ipcMainEventHandlers.initialize();
        }

Repacked app.asar

C:\Program Files (x86)\Test Runner (Azure Test Plans)\resources> npx asar pack app app.asar 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment