Delete files in Windows Vista

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Qm9iRg==?=

    #1

    Delete files in Windows Vista

    I need to move files between folders. I am using VB.Net 2005. First I check
    the target folder to see if the files exist, and if so, delete them. Then I
    move the replacements, one at a time using:
    If File.Exists(str FileName) then
    File.Delete(str FileName)
    End If
    File.Move(strFi leOldName, strNewFileName)

    This works just fine in Windows XP. It works in Windows Vista (Release
    version) with UAC turned off. With UAC turned on it fails. I don't even get
    the UAC prompt.

    I was logged on to Vista as a member of the Domain Administrators group when
    this occured. Any ideas?

    Bob Flenniken
  • Stephany Young

    #2
    Re: Delete files in Windows Vista

    Well, you answered your own question haven't you.

    It's obvious that it's the UAC, so, if I were you, I'd be researching the
    ins and outs of the UAC.


    "BobF" <BobF@discussio ns.microsoft.co mwrote in message
    news:E7CB23B8-19AB-4F18-959E-D519D03B88C3@mi crosoft.com...
    >I need to move files between folders. I am using VB.Net 2005. First I check
    the target folder to see if the files exist, and if so, delete them. Then
    I
    move the replacements, one at a time using:
    If File.Exists(str FileName) then
    File.Delete(str FileName)
    End If
    File.Move(strFi leOldName, strNewFileName)
    >
    This works just fine in Windows XP. It works in Windows Vista (Release
    version) with UAC turned off. With UAC turned on it fails. I don't even
    get
    the UAC prompt.
    >
    I was logged on to Vista as a member of the Domain Administrators group
    when
    this occured. Any ideas?
    >
    Bob Flenniken

    Comment

    • Jay B. Harlow

      #3
      Re: Delete files in Windows Vista

      Bob,
      In addition to the other comments, this is a good starting article to learn
      about programming with the UAC.

      "Least Privilege - Teach Your Apps To Play Nicely With Windows Vista User
      Account Control"
      http://msdn.microsoft.com/msdnmag/issues/07/01/UAC/

      --
      Hope this helps
      Jay B. Harlow
      ..NET Application Architect, Enthusiast, & Evangelist
      T.S. Bradley - http://www.tsbradley.net


      "BobF" <BobF@discussio ns.microsoft.co mwrote in message
      news:E7CB23B8-19AB-4F18-959E-D519D03B88C3@mi crosoft.com...
      >I need to move files between folders. I am using VB.Net 2005. First I check
      the target folder to see if the files exist, and if so, delete them. Then
      I
      move the replacements, one at a time using:
      If File.Exists(str FileName) then
      File.Delete(str FileName)
      End If
      File.Move(strFi leOldName, strNewFileName)
      >
      This works just fine in Windows XP. It works in Windows Vista (Release
      version) with UAC turned off. With UAC turned on it fails. I don't even
      get
      the UAC prompt.
      >
      I was logged on to Vista as a member of the Domain Administrators group
      when
      this occured. Any ideas?
      >
      Bob Flenniken

      Comment

      • =?Utf-8?B?Qm9iRg==?=

        #4
        Re: Delete files in Windows Vista

        Well, that's what I was asking - if anyone know about the UAC and where I
        could go to find out. Thankfully, someone else gave me some useful info.

        "Stephany Young" wrote:
        Well, you answered your own question haven't you.
        >
        It's obvious that it's the UAC, so, if I were you, I'd be researching the
        ins and outs of the UAC.
        >
        >
        "BobF" <BobF@discussio ns.microsoft.co mwrote in message
        news:E7CB23B8-19AB-4F18-959E-D519D03B88C3@mi crosoft.com...
        I need to move files between folders. I am using VB.Net 2005. First I check
        the target folder to see if the files exist, and if so, delete them. Then
        I
        move the replacements, one at a time using:
        If File.Exists(str FileName) then
        File.Delete(str FileName)
        End If
        File.Move(strFi leOldName, strNewFileName)

        This works just fine in Windows XP. It works in Windows Vista (Release
        version) with UAC turned off. With UAC turned on it fails. I don't even
        get
        the UAC prompt.

        I was logged on to Vista as a member of the Domain Administrators group
        when
        this occured. Any ideas?

        Bob Flenniken
        >
        >
        >

        Comment

        Working...