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(strFileName) then
File.Delete(strFileName)
End If
File.Move(strFileOldName, 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 3 1607
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" <Bo**@discussions.microsoft.comwrote in message
news:E7**********************************@microsof t.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(strFileName) then
File.Delete(strFileName)
End If
File.Move(strFileOldName, 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
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" <Bo**@discussions.microsoft.comwrote in message
news:E7**********************************@microsof t.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(strFileName) then
File.Delete(strFileName)
End If
File.Move(strFileOldName, 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
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" <Bo**@discussions.microsoft.comwrote in message
news:E7**********************************@microsof t.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(strFileName) then
File.Delete(strFileName)
End If
File.Move(strFileOldName, 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: yxq |
last post by:
Hello,
The function File.Delete will not work in Windows Vista 5365, why?
And the API SHFileOperation also not work in Vista, how to delete a file in
Vista?
Thank you
|
by: j2ee.singh |
last post by:
Hi,
I'm looking to buy a new laptop primarily to learn & practice .NET and
C#.
My Question is:
Is there any requirement for .NET and C# in terms of the following
Operating Systems:
-...
|
by: =?Utf-8?B?S2Fyc3RlbiBMdW5kc2dhYXJk?= |
last post by:
Hi, I have made an application in C#, where I use the statement
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
to get the name of the "Program Files" folder.
It works fine in...
|
by: Sin Jeong-hun |
last post by:
Since Windows 2000, all user setting files should be stored separately
in the user's application settings directory. But some users still
want all the files to be created in the application folder,...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |