Re: How to set permission for Shell.Application when using BrowseForFo

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Martin Honnen (mahotrash_at_yahoo.de)
Date: 08/12/04


Date: Thu, 12 Aug 2004 13:05:29 +0200


James wrote:

> I tried to use Shell.Application BrowseForFolder to allow myself to
> browse the windows folders from within a script block in HTML web page. I
> can fully control the server and can setup the permission whatever I want.
>
> I am using the following code but when I invoked it, it always says
> "Permission Denied" at this step "objFolder = objShell.BrowseForFolder(0,
> "Example", 0, ssfWINDOWS);". I don't know what permission I need to grant to
> whom... Help...
>
> <script language="JScript">
> function fnShellBrowseForFolderJ()
> {
> var objShell = new ActiveXObject("Shell.Application");
> var ssfWINDOWS = 36;
> var objFolder;
>
> objFolder = objShell.BrowseForFolder(0, "Example", 0, ssfWINDOWS);
> if (objFolder != null)
> {
> // Add code here.
> }
> }
> </script>

If that is script in a HTML page loaded from a HTTP server then the
permission denied is not suprising as otherwise any script could gain
access to the location file system.
Try to use a HTA (HTML application).

-- 
	Martin Honnen
	http://JavaScript.FAQTs.com/


Relevant Pages

  • Cant make this page work
    ... I can't make this script work properly. ... The script at the bottom of the html page ... Does someone have a perl ... sub output_trace_headers { ...
    (comp.lang.javascript)
  • Form / CGI error
    ... I'm getting an error when I submit the following html ... form to a CGI script. ... The following script is supposed to print out the ... Internal Server Error ...
    (perl.beginners)
  • Re: Calling a perl script from an html doc
    ... How can I call a perl script from an html document when I have no web server ...
    (comp.lang.perl.misc)
  • Re: Hiding personal data in source code viewable on the internet
    ... > Re-create the form in pure HTML (do not use the FP Web components to ... In Script: grab the data submitted by the form. ... > I HTML view you enclose ASP script like this ... > component supported for your server. ...
    (microsoft.public.frontpage.programming)
  • Re: Hiding personal data in source code viewable on the internet
    ... >> Re-create the form in pure HTML (do not use the FP Web components to ... In Script: grab the data submitted by the form. ... >> component supported for your server. ... >> combination of HTML and ASP script. ...
    (microsoft.public.frontpage.programming)