-1

I am using a google apps script and writing a script for my google spreadsheet. I need to take the windows login id so that I can know who is filling up the spreadsheet. All my searches in the web yield the code that looks like this:

var wshell = new ActiveXObject("WScript.Shell");
alert(wshell.ExpandEnvironmentStrings("%USERNAME%"));

But google apps throws an error saying ActiveX not found. I am new to JavaScript and Google Apps.

Thanks a lot.

Yurii
  • 4,811
  • 7
  • 32
  • 41

1 Answers1

0

This is not possible nor should it be as it would be a huge security issue.

Explains more: JavaScript - How to get the name of the current user

Reason it doesn't work on windows in explorer is because your google-apps-script code get sanitized by google-caja.

Community
  • 1
  • 1