Re: User id of a running Windows form app

From: Nicole Calinoiu (calinoiu)
Date: 05/19/05

  • Next message: Nicole Calinoiu: "Re: Private member access."
    Date: Thu, 19 May 2005 14:59:25 -0400
    
    

    Sorry, but you did say "when my program tries to find a folder with a
    certain name". <g>

    What happens when you try to find the target file via Windows Explorer when
    running under the same account as the application? Can you open every
    parent folder in the folder hierarchy above the target file? Can you open
    the target file itself for reading?

    "RD" <nospam@nospam.net> wrote in message
    news:u84cM7HXFHA.2996@TK2MSFTNGP10.phx.gbl...
    >I need to test the existence of a particular file. Thats why I did not use
    > Directory.exists. I can try it and add some loging to the functions to see
    > what I get back when they execute.
    >
    > RD
    >
    > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
    > news:OV8XPh9WFHA.3532@TK2MSFTNGP10.phx.gbl...
    >> What happens when you use Directory.Exists rather than File.Exists to
    >> test
    >> the existence of the folder?
    >>
    >>
    >> "RD" <nospam@nospam.net> wrote in message
    >> news:%23XIAxN8WFHA.3864@tk2msftngp13.phx.gbl...
    >> > Computer A is running an application that needs to find a certain file
    > in
    >> > an
    >> > FTP site folder that is also on computer A.
    >> > The user that is logged on to computer A is the domain administrator
    > (the
    >> > computer runs 24-7 without user interaction)
    >> > The FTP site folder the program looks at is restricted access. Only
    > users
    >> > with the username and password given them and part of the local users
    >> > group
    >> > can see its contents and download from it or upload to it.
    >> > In addition the domain administrators and authenticated users have full
    >> > access to the FTP folder.
    >> > However when my program tries to find a folder with a certain name, and
    > I
    >> > can see that it is there and the name and location are correct, the
    >> > program
    >> > returns false.
    >> >
    >> > The code is
    >> > Private Function FileExists(ByVal fileName As String) As Boolean
    >> >
    >> > 'Arguments : fileName - Name & Location of the file to check
    >> >
    >> > 'Returns : True if the caller has the required permissions
    >> >
    >> > ' and path contains the name of an existing file;
    >> >
    >> > ' otherwise, False. This method also returns false
    >> >
    >> > ' if path is a null reference (Nothing in Visual
    >> >
    >> > ' Basic) or a zero-length string.
    >> >
    >> > Return System.IO.File.Exists(fileName)
    >> >
    >> > End Function
    >> >
    >> > Since this function returns True in my test environment where I do not
    >> > have
    >> > the same restrictions on the FTP test folder My suspicion is that the
    >> > caller
    >> > does not have appropriate permissions to view the folder's contents.
    >> > Question is what permission do I have to set to allow this access to
    >> > the
    >> > FTP
    >> > folder for my application?
    >> >
    >> > Any help would be greatly appreciated.
    >> >
    >> > RD
    >> >
    >> >
    >>
    >>
    >
    >


  • Next message: Nicole Calinoiu: "Re: Private member access."

    Relevant Pages

    • Re: Difference between "Junction points" and "Hard Links" ?
      ... Junction Points and Hard Links can both point to files AND folders ... "second" reference unusable Deleting the target file or folder of a Hard ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: Difference between "Junction points" and "Hard Links" ?
      ... Deleting the target file or folder of a Junction Point makes the "second" reference unusable ... Deleting the target file or folder of a Hard Link let the "second" reference still full alive/exist ... attributes for Hard Links and originals are always the same ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: Difference between "Junction points" and "Hard Links" ?
      ... Deleting the target file or folder of a Junction Point ... attributes for Hard Links and originals are ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: Unable to Move/Copy All Files
      ... check the target folder and make sure that you ... > share permissions on the target file. ... Chuck, ... computers, this seemed to do the trick, I can now Copy from both w/o any ...
      (microsoft.public.windowsxp.network_web)
    • Re: Parse shortcuts (LNK files)?
      ... Dim OS, Link, User, fso, folder ... Set fso = CreateObject ... Target file, Icon file... ... So what I want is the sourse code for a shortcut parser, ...
      (microsoft.public.dotnet.languages.vb)