PC Review


Reply
Thread Tools Rate Thread

Create directory

 
 
Christian Havel
Guest
Posts: n/a
 
      23rd Nov 2007
Hi,

how can I create a directory in the "documents and settings / user" directory?

Christian
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      23rd Nov 2007
Christian,

Assuming you have the rights to do so (if you are another user, and and
not an administrator) you won't, not unless you impersonate a user that has
rights and perform the operation under that user.

But generally, to create a new directory, you can use the DirectoryInfo
class, calling the Create or CreateSubDirectory methods to create the
directory that you wish.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Christian Havel" <(E-Mail Removed)> wrote in
message news:98E20783-EEDD-405C-AE0B-(E-Mail Removed)...
> Hi,
>
> how can I create a directory in the "documents and settings / user"
> directory?
>
> Christian


 
Reply With Quote
 
Christian Havel
Guest
Posts: n/a
 
      24th Nov 2007
Hi Nicholas,

thanks for your response!
How the directory can be created else (if the user does not have
administrator rights)? Is this a job for the install-program?

Christian

"Nicholas Paldino [.NET/C# MVP]" wrote:

> Christian,
>
> Assuming you have the rights to do so (if you are another user, and and
> not an administrator) you won't, not unless you impersonate a user that has
> rights and perform the operation under that user.
>
> But generally, to create a new directory, you can use the DirectoryInfo
> class, calling the Create or CreateSubDirectory methods to create the
> directory that you wish.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Christian Havel" <(E-Mail Removed)> wrote in
> message news:98E20783-EEDD-405C-AE0B-(E-Mail Removed)...
> > Hi,
> >
> > how can I create a directory in the "documents and settings / user"
> > directory?
> >
> > Christian

>

 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      24th Nov 2007
Christian,

Well, it depends on what the directory is for. But yes, if it is a
regular user, then they will not have rights to write to the Program Files
directory.

What is the purpose of the directory that you are trying to create?


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Christian Havel" <(E-Mail Removed)> wrote in
message news:79E1DF3F-29C7-4300-BFA9-(E-Mail Removed)...
> Hi Nicholas,
>
> thanks for your response!
> How the directory can be created else (if the user does not have
> administrator rights)? Is this a job for the install-program?
>
> Christian
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
>> Christian,
>>
>> Assuming you have the rights to do so (if you are another user, and
>> and
>> not an administrator) you won't, not unless you impersonate a user that
>> has
>> rights and perform the operation under that user.
>>
>> But generally, to create a new directory, you can use the
>> DirectoryInfo
>> class, calling the Create or CreateSubDirectory methods to create the
>> directory that you wish.
>>
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]
>> - (E-Mail Removed)
>>
>> "Christian Havel" <(E-Mail Removed)> wrote in
>> message news:98E20783-EEDD-405C-AE0B-(E-Mail Removed)...
>> > Hi,
>> >
>> > how can I create a directory in the "documents and settings / user"
>> > directory?
>> >
>> > Christian

>>


 
Reply With Quote
 
Christian Havel
Guest
Posts: n/a
 
      26th Nov 2007
Hi Nicholas,

in the directory I want to save some projectinformations (creatorname, date
of creation, ...) in a Xml-file.
Christian

"Nicholas Paldino [.NET/C# MVP]" wrote:

> Christian,
>
> Well, it depends on what the directory is for. But yes, if it is a
> regular user, then they will not have rights to write to the Program Files
> directory.
>
> What is the purpose of the directory that you are trying to create?
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Christian Havel" <(E-Mail Removed)> wrote in
> message news:79E1DF3F-29C7-4300-BFA9-(E-Mail Removed)...
> > Hi Nicholas,
> >
> > thanks for your response!
> > How the directory can be created else (if the user does not have
> > administrator rights)? Is this a job for the install-program?
> >
> > Christian
> >
> > "Nicholas Paldino [.NET/C# MVP]" wrote:
> >
> >> Christian,
> >>
> >> Assuming you have the rights to do so (if you are another user, and
> >> and
> >> not an administrator) you won't, not unless you impersonate a user that
> >> has
> >> rights and perform the operation under that user.
> >>
> >> But generally, to create a new directory, you can use the
> >> DirectoryInfo
> >> class, calling the Create or CreateSubDirectory methods to create the
> >> directory that you wish.
> >>
> >>
> >> --
> >> - Nicholas Paldino [.NET/C# MVP]
> >> - (E-Mail Removed)
> >>
> >> "Christian Havel" <(E-Mail Removed)> wrote in
> >> message news:98E20783-EEDD-405C-AE0B-(E-Mail Removed)...
> >> > Hi,
> >> >
> >> > how can I create a directory in the "documents and settings / user"
> >> > directory?
> >> >
> >> > Christian
> >>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MkDir won't create a directory and sub directory at the same time pubdude2003 via AccessMonster.com Microsoft Access VBA Modules 3 22nd Dec 2006 03:26 PM
Web Setup project - create virtual directory & point to another location in directory structure kplkumar@gmail.com Microsoft C# .NET 0 12th Apr 2006 06:26 PM
Create Directory in a shared newtok directory Paul Bromley Microsoft VB .NET 2 2nd Dec 2004 12:00 AM
vcdeploy : error VCD0035: Failed to create the file system directory for the virtual directory. Access is denied. Dominic Microsoft VC .NET 0 17th Jun 2004 01:27 AM
cannot create directory Ami Windows XP General 0 26th Nov 2003 10:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:44 AM.