Re: How to set permission for Shell.Application when using BrowseForFo
From: Martin Honnen (mahotrash_at_yahoo.de)
Date: 08/12/04
- Next message: vikram lagu: "Re: Accessing out parameters sent by COM component in jscript"
- Previous message: Rene Ruppert: "Cannot turn off status bar in modal dialogs"
- In reply to: James: "How to set permission for Shell.Application when using BrowseForFo"
- Messages sorted by: [ date ] [ thread ]
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/
- Next message: vikram lagu: "Re: Accessing out parameters sent by COM component in jscript"
- Previous message: Rene Ruppert: "Cannot turn off status bar in modal dialogs"
- In reply to: James: "How to set permission for Shell.Application when using BrowseForFo"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|