Solved

How to delete Server files/folders from LAN user (JavaScript)

Posted on 2008-06-21
4
583 Views
Last Modified: 2008-07-04
Prgram runs successfully, using user disk partition as server emulation.  When LAN connected, files/folders are sucessfully copied to sever.  However, the following code returns an error when interacting with server (but not with files on user PC):

GLOBALS:
gpath='';  // this is given value prior to calling "DeleteFile()
fso = new ActiveXObject("Scripting.FileSystemObject");
 
function DeleteFile() {
      if (fso.FileExists(gpath)) {var afile = fso.GetFile(gpath); afile.Delete();}
}

Even when full administrator rights are given, the error still occurs.
Your input will be valued.
0
Comment
Question by:nyoka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 7

Expert Comment

by:kGenius
ID: 21837413
what's the exact error?
Karl
0
 

Author Comment

by:nyoka
ID: 21837456
Regret, unknown.  However line number refers to the above code.   Will only be able to check on Monday.  "Permission denied" is probable.
Keith
0
 

Author Comment

by:nyoka
ID: 21844632
Karl, Tested using Kingston flash disk in user PC, acting as server drive.  With Vista Home Basic and Vista Home premium, IE7, all works OK.  With XP SP2, fails: "could not read the size property".  Retry="permission denied".  Inspection with Windows Explorer shows file not deleted from Kingston.  Seems to be XP-related.  XP IE 6  Intranet & Local set to 'Low'.
Are there any XP tweaks one requires?
0
 

Accepted Solution

by:
nyoka earned 0 total points
ID: 21880931
Karl,  No reply from you.

Anyway, after much experimentation, an XP/Windows 2003 server bug was found:  Cannot change read-only settings on files, using Windows Explorer.  One can set them once, and then they revert to Read-only.  Using the "Start-up, Run, Cmd, attrib -r +s path\folder" routine enabled permanent Read-only Clear on the required folders on User & Server.  Problem solved.

Refer Microsoft support article No 326549, which provides a work-around.  They admit nothing - say this behaviour is by design.  However, they appear to have eliminated the problem in the two versions of Vista I tested!

Suggest this thread be closed.  Awarding of points does not seem appropriate in this case.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question