- I create a .js file containing print("Hello World!");
- I save it as hello.js
- I open the Visual Studio 2008 Command Prompt
- jsc + Enter
- jsc \out:hello.exe C:\path\to\my\file.js + Enter
I get an E_ACCESSDENIED error: what could it be?
Thanks!
I get an E_ACCESSDENIED error: what could it be?
Thanks!
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
Finally, 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