Sunday, 15 August 2010

How can I get the current desktop path in JavaScript? (Windows 7) -



How can I get the current desktop path in JavaScript? (Windows 7) -

i sense should simple searched half hr , couldn't find it.

basically have adobe pdf file runs snippet of javascript verify input and, if deems input ok, save pdf desktop. works fine when hard code in desktop, ex.:

var mypath = "/c/users/someusernamehere/desktop/";

however, trying deploy many machines here, not want have hard code in everyone's desktop path.

is there way javascript desktop path of current user?

ps. of our machines utilize windows 7.

/edit clarify, not net thing, local. pdf stored on user's machine accessing javascript file stored in same directory. directory is:

c:\program files (x86)\adobe\reader 11.0\reader\javascripts

var objwshshell = new activexobject("wscript.shell"); var strdesktoppath = objwshshell.specialfolders("desktop");

javascript path desktop

No comments:

Post a Comment