views:

116

answers:

2

Hi, I do the following:

  1. I create a .js file containing print("Hello World!");
  2. I save it as hello.js
  3. I open the Visual Studio 2008 Command Prompt
  4. jsc + Enter
  5. jsc \out:hello.exe C:\path\to\my\file.js + Enter

I get an E_ACCESSDENIED error: what could it be?

Thanks!

+1  A: 

Sounds like you're running Vista or Windows 2008. The VS2008 command prompt is probably opening in C:\Program Files\Microsoft Visual Studio 9.0\VC>.

Your /out:hello.exe switch doesn't specify a path so the compiler is trying to write the compiled exe to the current working folder C:\Program Files\Microsoft Visual Studio 9.0\VC> which isn't permitted with out elevated rights (i.e. Run As Administrator).

The solution would be to specify the same path as your source file which is writable:

jsc /out:C:\path\to\my\hello.exe C:\path\to\my\file.js

HTH
Kev ps: if you're running 64 bit windows then the working folder path for the command prompt would be: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

Kev
A: 

Hi Kev, it is exact! The path is the one you specified! Thank you very much! :-)

Glad to be of assistance :)
Kev