473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

best way to do this

hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority issue?
what's the best way to do this?

thanks,
rodchar
Nov 21 '05 #1
8 1093
rodchar,
The "best" way to resolve this is to stop creating files in the root folder!
:-|

I would recommend you create the file's in the user's profile, You can use
Environment.GetFolderPath to find the path to any number well known folders.

Normally I use SpecialFolder.Personal, which is the "My Documents" folder.

However! If the data needs to be shared among users within the application I
would recommend one of the SpecialFolder ApplicationData folders instead...

Be certain to read the online help on Environment.GetFolderPath & the
Environment.SpecialFolder enumeration.
Other ways to resolve this include, but are not limited to, giving users
authority to create files in the root folder... Of course giving users this
authority, *gives* users this authority to do it outside your program also!

Hope this helps
Jay

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority
issue?
what's the best way to do this?

thanks,
rodchar

Nov 21 '05 #2

Don't put the data in a directory off root. Put it in
Application.UserAppDataPath or Application.CommonAppDataPath.

HTH,

Sam
On Tue, 25 Jan 2005 08:13:02 -0800, "rodchar"
<ro*****@discussions.microsoft.com> wrote:
hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority issue?
what's the best way to do this?

thanks,
rodchar


Nov 21 '05 #3
It is not advisable to create your file in root. If you login as
Administrator you should not have any problem to create the file there.

chanmm

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority
issue?
what's the best way to do this?

thanks,
rodchar

Nov 21 '05 #4
but isn't there a way to temporarily grant a program to write where it's told?

"rodchar" wrote:
hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority issue?
what's the best way to do this?

thanks,
rodchar

Nov 21 '05 #5

"rodchar" <ro*****@discussions.microsoft.com> wrote
but isn't there a way to temporarily grant a program to write where it's told?


Require your user to run the program as an Administrator.

LFS
Nov 21 '05 #6
rodchar,
but isn't there a way to temporarily grant a program to write where it's
told? Yes there are!

There was a discussion earlier this week titled "File.copy as another user"
in this newsgroup that talked about it, and discussed a couple of possible
options.

However I question even the Administrator creating files in the C:\ (the
root) directory! Hence my answer. Or is "root" a specific folder in C:\?

Hope this helps
Jay

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com... but isn't there a way to temporarily grant a program to write where it's
told?

"rodchar" wrote:
hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority
issue?
what's the best way to do this?

thanks,
rodchar

Nov 21 '05 #7
no root is not a special folder. thanks for the help.

"Jay B. Harlow [MVP - Outlook]" wrote:
rodchar,
but isn't there a way to temporarily grant a program to write where it's
told?

Yes there are!

There was a discussion earlier this week titled "File.copy as another user"
in this newsgroup that talked about it, and discussed a couple of possible
options.

However I question even the Administrator creating files in the C:\ (the
root) directory! Hence my answer. Or is "root" a specific folder in C:\?

Hope this helps
Jay

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
but isn't there a way to temporarily grant a program to write where it's
told?

"rodchar" wrote:
hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority
issue?
what's the best way to do this?

thanks,
rodchar


Nov 21 '05 #8
no root is not a special folder. thanks for the help.

"Jay B. Harlow [MVP - Outlook]" wrote:
rodchar,
but isn't there a way to temporarily grant a program to write where it's
told?

Yes there are!

There was a discussion earlier this week titled "File.copy as another user"
in this newsgroup that talked about it, and discussed a couple of possible
options.

However I question even the Administrator creating files in the C:\ (the
root) directory! Hence my answer. Or is "root" a specific folder in C:\?

Hope this helps
Jay

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
but isn't there a way to temporarily grant a program to write where it's
told?

"rodchar" wrote:
hey all,

my vb.net program creates a file a the c:\root but when the users run it
they get denied. what are some different ways to resolve this authority
issue?
what's the best way to do this?

thanks,
rodchar


Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Gemini | last post by:
Hello I am looking for the best content/article manager software, perferred open source, php, mysql backend.. can anyone recommend me one? I think that the best discussion is phpbb, the...
18
by: Roman Suzi | last post by:
;-) Just type into google "best programming language" and press (I am lucky) Sincerely yours, Roman Suzi -- rnd@onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
3
by: Irene | last post by:
Hi all, I have set up a simple VB program (and later on an ASP interface) to manage an Athletics database. I'm using Access 2000. To simplify, I have the Athlets, the Competitions and the...
5
by: l.woods | last post by:
I want your recommendation on which ASP.NET Shopping Cart software I should buy? Best code Best documentation Best support (if needed. I will buying source code, if possible) TIA, Larry...
4
by: Ron Brennan | last post by:
Good evening, Windows 2000, JDK 1.5. What opinions do people have on what way and tool programmaticly produces the best quality thumbnails from larger images? On the web I've seen Java...
7
by: Frank Millman | last post by:
Hi all Assume a 2-dimensional list called 'table' - conceptually think of it as rows and columns. Assume I want to create a temporary copy of a row called 'row', allowing me to modify the...
9
by: optimistx | last post by:
Which url in your opinion would be a good or even the best example of javascript usage in a set of pages at least say 10 or more pages? How to use css, how to split js-code to files, how to code...
24
by: Earl | last post by:
I have all of my data operations in a separate library, so I'm looking for what might be termed "best practices" on a return type from those classes. For example, let's say I send an update from...
9
by: =?Utf-8?B?QW1tZXI=?= | last post by:
I've read many incomplete opinions about the "Best Practice" for securely accessing SQL but what I really need to find the "Best Practice" that fits my applications needs. Currently (alpha...
0
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...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.