Permission Denied error while saving xml file onto local HDD


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Permission Denied error while saving xml file onto local HDD

  1. #1
    Anil Kharra Guest

    Permission Denied error while saving xml file onto local HDD


    Hi All,
    Need help from U.
    I'm getting data into XML string format from COM component into my VBScript
    function. I load that string into xml object & try to save it into HDD with
    XML_Object.save "C:\folderName\file1.xml"
    It work successfully in most of the machines , but in some machines error
    comes "Permission Denied". Can anybody tell the reason and resolution of
    this problem.

    Thanks in adv.

    With regards,
    Anil Kharra

  2. #2
    Jaco de Villiers Guest

    Re: Permission Denied error while saving xml file onto local HDD


    Are you running the application from a webpage (htm,asp,aspx) or is the application
    a 32bit windows application?

    If it is running from a page then the reason might be that some machines
    have stricter security in their browsers. The typeof operating system the
    machines are using can also play a role.


    "Anil Kharra" <anil_kharra@hotmail.com> wrote:
    >
    >Hi All,
    > Need help from U.
    > I'm getting data into XML string format from COM component into my VBScript
    >function. I load that string into xml object & try to save it into HDD with
    >XML_Object.save "C:\folderName\file1.xml"
    >It work successfully in most of the machines , but in some machines error
    >comes "Permission Denied". Can anybody tell the reason and resolution of
    >this problem.
    >
    >Thanks in adv.
    >
    >With regards,
    >Anil Kharra



  3. #3
    Anil Kharra Guest

    Re: Permission Denied error while saving xml file onto local HDD


    Thanx Jaco, I'm trying this through asp page, but the problem is that it gives
    problems on few m/cs irrespective of theor OS .
    I tried with Browser settings also, but it doesn't work. Any clue sir...
    Bye
    AK



    "Jaco de Villiers" <jacodv_32@hotmail.com> wrote:
    >
    >Are you running the application from a webpage (htm,asp,aspx) or is the

    application
    >a 32bit windows application?
    >
    >If it is running from a page then the reason might be that some machines
    >have stricter security in their browsers. The typeof operating system the
    >machines are using can also play a role.
    >
    >
    >"Anil Kharra" <anil_kharra@hotmail.com> wrote:
    >>
    >>Hi All,
    >> Need help from U.
    >> I'm getting data into XML string format from COM component into my VBScript
    >>function. I load that string into xml object & try to save it into HDD

    with
    >>XML_Object.save "C:\folderName\file1.xml"
    >>It work successfully in most of the machines , but in some machines error
    >>comes "Permission Denied". Can anybody tell the reason and resolution of
    >>this problem.
    >>
    >>Thanks in adv.
    >>
    >>With regards,
    >>Anil Kharra

    >



  4. #4
    Jaco de Villiers Guest

    Re: Permission Denied error while saving xml file onto local HDD


    Hi Anil,

    You try using the following instead of your code:

    Dim oSys '///--->As Scripting.FileSystemObject
    Dim oFile '///--->As Scripting.TextStream

    On Error Resume Next

    Set oSys = CreateObject("scripting.filesystemobject")


    If oSys Is Nothing Then

    MsgBox "Failed to create the filesystem object"
    Exit Sub

    End If

    Set oFile = oSys.CreateTextFile("C:\folderName\file1.xml", True)

    oFile.Write (XML_Object.xml)

    oFile.Close

    If Not Err.Number = 0 Then

    MsgBox Err.Description
    On Error GoTo 0

    End If

    Set oFile = Nothing
    Set oSys = Nothing





    "Anil Kharra" <anil_kharra@hotmail.com> wrote:
    >
    >Thanx Jaco, I'm trying this through asp page, but the problem is that it

    gives
    >problems on few m/cs irrespective of theor OS .
    >I tried with Browser settings also, but it doesn't work. Any clue sir...
    >Bye
    >AK
    >
    >
    >
    >"Jaco de Villiers" <jacodv_32@hotmail.com> wrote:
    >>
    >>Are you running the application from a webpage (htm,asp,aspx) or is the

    >application
    >>a 32bit windows application?
    >>
    >>If it is running from a page then the reason might be that some machines
    >>have stricter security in their browsers. The typeof operating system

    the
    >>machines are using can also play a role.
    >>
    >>
    >>"Anil Kharra" <anil_kharra@hotmail.com> wrote:
    >>>
    >>>Hi All,
    >>> Need help from U.
    >>> I'm getting data into XML string format from COM component into my

    VBScript
    >>>function. I load that string into xml object & try to save it into HDD

    >with
    >>>XML_Object.save "C:\folderName\file1.xml"
    >>>It work successfully in most of the machines , but in some machines error
    >>>comes "Permission Denied". Can anybody tell the reason and resolution

    of
    >>>this problem.
    >>>
    >>>Thanks in adv.
    >>>
    >>>With regards,
    >>>Anil Kharra

    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center