Would someone please answer this question?

Results 1 to 4 of 4

Thread: Would someone please answer this question?

  1. #1
    Conrad Guest

    Default Would someone please answer this question?

    What is the syntax for assigning file permissions on individual files and folder on a WinNT based server?<BR>I would like to accomplish this without using third party products. Most especially without using dlls.

  2. #2
    Join Date
    Dec 1969

    Default RE: Would someone please answer this question?

    Use the asp file system objects.<BR><BR>example:<BR><BR>&#060;% <BR><BR>dim fso<BR>dim some_file<BR>dim some_folder<BR><BR>const Normal = 0<BR>const ReadOnly = 1<BR>const Hidden = 2<BR>const System = 4<BR>const Archive = 32<BR><BR>set fso = server.createobject("scripting.FileSystemObject")< BR>set some_file = fso.getfile("c:autoexec.bat")<BR>&#039Here&#039s the important line of code <BR>some_file.attributes = (Normal + ReadOnly + Hidden + System + Archive)<BR><BR>set some_folder = fso.getfolder("c:windows")<BR>... <BR>

  3. #3
    SPG Guest

    Default Bad news about permissions

    It can&#039t be done (and if it can, it really shouldn&#039t -- I saw some VB code for this on MSDN that was nothing short of horrid. I don&#039t think it would port to VBScript. But it&#039s in the support knowledge base if you&#039re that desperate).<BR><BR>If you can convince your ISP to use a 3rd party COM object, my frequently-made suggestion is Software Artisans SA-FileManager. (afaik, it&#039s a free download from www.softwareartisans.com) It does (probably) anything you could want to do to a file on a single machine. It also contains the .LogonUser capability which you&#039ll want to use when you&#039re changing security settings on files.<BR><BR>Not what you wanted to hear, but just think of how many permissions-changing email viruii haven&#039t been written because VBScript can&#039t do it!

  4. #4
    Conard Guest

    Default RE: Bad news about permissions

    Thank you both for answering my question. Both posts are very useful to me.<BR><BR>I suppose I will have to give that third party dll a chance.<BR><BR>Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts