Skip to content

Commit

Permalink
prompt admin priviliges automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
undergroundwires committed Aug 26, 2020
1 parent b789250 commit f8ba5c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/application/State/Code/Generation/UserScriptGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import { IUserScript } from './IUserScript';
export const adminRightsScript = {
name: 'Ensure admin privileges',
code: 'fltmc >nul 2>&1 || (\n' +
' echo This batch script requires administrator privileges. Right-click on\n' +
' echo the script and select "Run as administrator".\n' +
' pause\n' +
' exit 1\n' +
' echo Administrator privileges are required.\n' +
' PowerShell Start -Verb RunAs \'%0\' 2> nul || (\n' +
' echo Right-click on the script and select "Run as administrator".\n' +
' pause & exit 1\n' +
' )\n' +
' exit 0\n' +
')',
};

Expand Down

0 comments on commit f8ba5c4

Please sign in to comment.