555
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

win32.js 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. module.exports = {
  2. verifyAndInstall(){
  3. return getTaskCheckExists(this.shellcmd, { ignorefailures: true })().then((exists) => {
  4. if(exists) {
  5. // return any(['git', ['config', '--global', '-l']].map(getshelltask))
  6. return this.postinstallsteps.bind(this)()
  7. }
  8. return this.install();
  9. });
  10. },
  11. acquireElevationState(__isElevated) {
  12. if (__isElevated === null) {
  13. return nodeShellExec("fsutil", ["dirty", "query", "C:"], {
  14. inherit: true
  15. // , shell: true
  16. , stdio: 'ignore'
  17. , env: process.env
  18. , title: `check privileged execution mode using "fsutil dirty query C:"`
  19. }).then((exitcode) => {
  20. console.log('Elevated')
  21. __isElevated = true;
  22. return true;
  23. }).catch(() => {
  24. __isElevated = false;
  25. console.log('Not Elevated');
  26. return false;
  27. });
  28. }
  29. else return Promise.resolve(__isElevated);
  30. },
  31. }