|
In win7 you need to give admin access (or you need to run your windows application as an administrator) to your application to allow it to create directory.
Hope this will help!
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
|
there is no error occur...application execute successfully but did not create directory in win7
|
|
|
|
|
i login from administrator user but did not create directory in win7
|
|
|
|
|
Can you show us your code?
|
|
|
|
|
Logging in is not enough to be an administrator. You should run your program as administrator. Also if your program does not give your an error message, it's probably because you aren't checking for any errors. (boo! boo!).
If it fails to create a directory, you should not be creating your directory there in the first place (Places like the root of c:, program files, windows, etc... are taboo.
|
|
|
|
|
AFAIK the situation is the same on Vista and Windows 7, and will continue to be so on newer versions of Windows:
- a lot of directories cannot be modified by a regular user; those include the top-level directory of your system partition (usually C: ) and all important directories such as /Windows, /Windows/system32, and /Program Files.
- as Michel said, you need an administrator account AND an app "running as administrator" so get over those restrictions.
What should work though is access to a number of special folders intended to hold your app's settings and local data, and other things like that. Have a look at Environment.GetFolderPath() and Environment.SpecialFolder
Within such directories, one usually creates a hierarchy of folders, so a typical sequence would be:
string fileSpec=Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)+
@"\companyName\appName\logfile.txt";
string folder=Path.GetDirectoryName(fileSpec);
Directory.CreateDirectory(folder);
StreamWriter writer=File.CreateText(fileSpec);
...
|
|
|
|
|
|
Parallel.For is part of .NET 4.0, that uses a CLR version different from .NET 3.5.
So you can't use Parallel.For or any 4.0 new feature in a 3.5 or older project.
EDIT: Please, do not delete your message after someone answered you.
|
|
|
|
|
Hi,
I need a way to check which URL's are available on a specific name server, so which urls are registered there. How can I do this?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
name servers don't contain urls they contain names which can be expanded to fqdn's. You access these names through your favorite dns client (nslookup) for instance, and issue a list command. The administrator of the dns server will probably have disallowed this, because it's a cheap trick used by amateur hackers to discover addresses on networks. If you explain to us what your final purpose is, and persuade us that your intentions are legal, we MIGHT explain some more.
|
|
|
|
|
Matter has been dealt with privately. Please ignore the question.
|
|
|
|
|
Hi
Im having a problem making the background of a label transparent. I have a label on top of a picturebox and I make the labels parent the picturebox. I also set the labels backcolor to transparent. For some reason the label just disapears when I do this. Does anyone have any ideas?
Thanx
|
|
|
|
|
Try by setting the textbox's parent to the picture box and also by bringing the label to the front.
Something like
Label1.Parent = PictureBox1;
Label1.BringToFront(); .
|
|
|
|
|
Setting the background to Color.Transparent tells the label control to inherit the background properties of it's parent container. It does NOT make the background transparent.
In order to do what you want, you'd have to create your own label control and render it yourself. Your not the first person to want to do this. There are a ton of examples of doing a true TransparentLabel ono the web. All it takes is a little Google to find them. ".net transparent label[^]"
|
|
|
|
|
|
Hi Programmers,
I am rewriting some of my COM Server (Out proc) executable to .Net enviornment.
I havn't found any clue for same, I have googled for same, but everytime I encountered IN_PROC DLL only. might i am searching from wrong keyword.
Actually I needed executable, who expose it's class or interface to dot net application and work accordingly. I have found workaround using IPC DotNet Remoting. i.e. creating class library as proxy and subscribing event in both Client and outproc exe, but it is not full proof.
So please help me if you know something in this reqards
Thanks
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
Can please anyone tell me that How to get the IP Address of the network printer through the codeing in .NET using C#.
Thanks
|
|
|
|
|
Use WMI to read all your printer properties. For a sample, see here,
|
|
|
|
|
Hello my friends. I am going to do a senior project and we found that Mobile banking is going to be a good project. Is it possible to do it in C# with less than 4 months? Or if you have any idea about this or if you worked on it, please help me out. Thank you
|
|
|
|
|
|
Hi all,
is there any way that we can bind Textboxes to a member varaible data for display , like we do in MFC ?
if so pls advice.
|
|
|
|
|
Public form properties and DataBindings ...
public partial class Form1 : Form {
public string TheMember { get; set; }
private TextBox _textBox;
public Form1() {
InitializeComponent();
TheMember = "Hello";
_textBox = new TextBox();
_textBox.DataBindings.Add( "Text", this, "TheMember" );
this.Controls.Add( _textBox );
}
}
|
|
|
|
|
Thanks Gerry Schmitz for your time.
|
|
|
|
|
There is an image capturing device which outputs images in wmf. This image is directly stored in the db. These images are supposed to appear on web page (in IE). Only some of the images appear; others don't. When we investigated the problem we observed various things:
a) Those problematic images don't appear visible on the web page, but they are still there! If you right click the image and try to save it on your hard disk from IE browser, you get a file.
b) This file is viewable via desktop image viewers like Microsoft Picture Viewer.
c) We can view this image if we convert the file into jpeg.
The jpeg alternative seem viable, but its simply too much processing on the web server if we adpoted that approach. Its only that some of these images have this problem. We have millions of records of data with images. We figure only 10 % of images do have the issue.
Is there a way to detect such problematic wmf files?
|
|
|
|