.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Accessing Program Files (x86) Directory

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF

I just got Visual Studio 2010 a couple weeks ago, but I do have some programming experience with Visual Basic. I'm still trying to get the new syntax down and I'm having trouble understanding permissions and accessing files in the program directories' folder. I've been doing a lot of basic programs to figure out new changes, how to open/save/print and print preview documents. I've pretty much got all that figured out. I actually prefer my own saving/opening methods vs the richtextbox.savefile and .loadfile, I prefer this because it's easier for me to load information into listboxes and gives me the opportunity to encrypt and decrypt the information using my own algorithm. But, to cut to the chase, I'm creating a program that when started for the first time I want it to ask for an authentication key and I'm having issues implimenting this type of procedure. I've created an authentication key in a special file, the file path name is, "C:\Program Files(x86)\My Folder\Authenticator.auth". From what I understand, to be professional about it I would actually need to create a website and have the program connect to the website and register the product even once the authentication key has been entered, but I'm only a first year college student and I'm few years away from getting to that professional level. However, sticking to the basics

View Complete Post

More Related Resource Links

File.Copy to Program Files Directory.

I searched high and low and have found some discussions on this topic but do seem to see any solutions.   So here is my issue.   I have an application that will copy 2 files to the Program Files directory.   What happen is, when I run it and the files exist (this should be what normally happens) I get accessed denied.   If I try to do a File.Delete (in code) first I get an access denied, however I can manually (in OS windows explorer) delete the files and then the copy will work.   I am running the application as Admin, so permissions to the folder are good.  

The application is restoring a 3rd party software file that tends to get corrupted a lot.   We have mechanism that will back this file up, but when I try to restore it I get the problem described above.   (not a file lock issue, I have made sure no programs have a handle to the file)

OS = Vista32
Program written in C#

Is there anyway of accomplishing this?


Polling FTP-Server and downloading files to our local directory on regular intervals

Issue regarding downloading same file again and again. Let me be clear, I am using SSIS to poll FTP Server on regular intervals to download different files to my local directory. Once the file is downloaded I need to load the file name into table and validate that particular file name against FTP Server next time when I am polling, so that I don't download same file again.                              Question here is how could I implement this either using SSIS or VB Script ???

how to make working WPF 2010 program make changes to SQL Server 2008 Express files

(1) I have a working WPF 2010 program that manipulates a table in SQL Server 2008 Express (2) the program does delete, update, select and insert correctly however in its own project file folder logbooklmk.mdf   logbooklmk_log.ldf (3) I want the actual SQL Server 2008 express files to be changed yes I know the issue is sharing and the copy option only applies to the local project files. I found this out by trying always copy, never copy and copy if newer. I probably have to change the .xsd folder to refer to the actual SQL Server 2008 Express file. Tried that once and it failed. Something about sharing not allowed.

Copy files through batch program on Windows Server 2003

I have a VB6 program running on windows server 2003. When I try to open a file in a SharePoint Document library it will not traverse folders. If I run the application on Windows 7 (maybe Vista too), it can. I assume that there is some operating system helping hand here. In order to get around this problem, we have to output our files to a network share and then copy the files over to the document library manually. My question is, how can I write a batch program that will copy all of the files on a network share to the document library using the individual's credentials? I am unable to map a drive letter to a document library in Windows server 2003 (it works on 7). Any suggestions and tips would be much appreciated. Thanks.

Web Service Unable to access Directory (Temporary ASP.NET Files) CS0016

QuestionMoving web service to a production level server. This is not a new server, but is new to running an ASP.NET 2.0 web service. No other websites or services existed on this server.

Installed .Net 2 and specified that ASP is registered for 2.0 using aspnet_regiis. Installed missing components such as Front page extensions. When I try to browse to the services asmx page I get the error saying that the process has a compilation error and cannot access the asp.net temp directory under the 2.0 Framework. I looked at the directory and it appears that the asp.net process and others have correct access.

Note a basic asp.net page will come up as well as a basic html page.

All comments are welcome.

  • .Net 2
  • ASP.NET aspnet_regiis specifies .Net 2 as root
  • C#
  • IIS6
  • Windows Server 2003 SP1

Sharepoint 2010 "Some content or files on this webpage require a program that you don't have instal


This may be a DNS question.

New SP 2010 install, single server lab environment.
I can create and access site collections under the first web application SP2010 (Sharepoint 80, http://sp2010)

I have created another web application, different database, different port (777), and given it a different URL (test.otherdomain.com:777)
I have created a corresponging site collection (default team site).
Opened port 777 TCP incoming and outgoing in the windows firewall
Created a host (A record) in my DNS test.otherdomain.com (IP of the sharepoint server which is really called SP2010.mydomain.com)

nslookup returns the correct IP address, but when I type test.otherdomain.com:777 into a browser window I get
"Some content or files on this webpage require a program that you don't have installed" both from another machine on the network and on the Sharepoint server.



uid.sbmp.tmp files on SSAS temp directory


Hi, We browse a cube thanks to the Microsoft datapump and after a benchmark I notice the process msmdsrv has 2000 handle count.

Thanks to Process Explorer I know that this is the *.sbmp.tmp files stored in the temp directory.

Someone know what is these files?



Access to update application files stored in Program Files, restricted on a Windows 7 device when us


Hi all,


I'm here to solve a problem, and that is our application, which speaks to a central server on startup, checks for updates and if found, updates its local files (stored in Program Files) with those pushed from the central server.  Currently, we are getting access denied exception when this updater tries to add/edit files in this special directory.  What I am looking for is a way to accomplish this updating process without moving these application files to a different location.

Accessing Active Directory with SQL 2008

I've searched the forum, as was unable to come up with a solution.

How can I access my Active Directory using SQL 2008?

I've tried running Import and Export Data but "OLE DB provider for microsoft directory services" isn't even listed as an option. Do I need to install something extra?

Thanks in advance


Accessing Active Directory's User Profile Information in InfoPath Form



I want the User Profile information in InfoPath Form from active directory and I want complete information of currently logged in user which include:

User Name, First Name, Last Name, Email Address, Designation, Company, Manager Name and everything which is in the profile of user in Active Directory. Please help me in getting this.


M Kamran Rafi

Accessing files on a mapped server


Hi all,

I have file locations stored in my DB. The locations are mapped drives on a different server. How can I access them? Do I need to set something up in IIS?

Here are som example locations:

\\FILESERVER\P4W$\Documents - FC\Client\005109\1\1000LE~1.DOC

V:\4\7\1\47123\1\File Note


Any help much appreciated!

Call a Program Located in Virtual Directory


How can I call a C# program located in a Virtual Directory? 

Accessing External Javascript files (.js) in VWD 2010 (.Net 4)


Hopefully I've selected the appropriate forum to post. If not, kindly let me know and I will post in that forum.

I have searched hundreds of posts over countless forums, but am unable to run a Javascript that is placed in a separate .js file. If the script is placed directly in the <HTML> and ASP markup, the script runs fine. I am a newbie at this and resolution may be quite simple. But I cannot figure it out.

I have simplied the example down to a single .aspx page with a single button and the codebehind in VB, knowing that if I cannot get this working, I certainly won't be able to get my real scripts working.

I am currently running VWD 2010 on the .Net 4 framework. I've been working on this problem on and off over the past 3 weeks and simply cannot get it to work, so I continue to insert the code directly into the markup. I have tried countless changes to the following code, but not once able to get it to work.

Any help, suggestions or recommendations will be graciously accepted and very much appreciated.


The .aspx page is as follows:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test_Script.aspx.vb" Inherits="Test_Script" %>



Programmatically copy all files from a SharePoint Library to a local directory on the server with an


Through the use of an event receiver I am trying to copy all the files in a document library to a local folder on the server.  I am finding examples of how to upload but none to download.

Can someone show me the code or have a good reference for me?


Cannot publish files in root directory?


Hi Everyone,

I have a website(not an application) built in VS2008. When I try to publish the site, any of the files that are in the root folder are not published. This has only just started happening and I am unsure what I have changed to cause this. The files are not excluded from the project.

Thanks for the help


Getting files from a directory in a server


Can someone help me with moving files from a server to another server. Ive tried using the FOREACH loop container, but it seems that the files have to be on the same server to use a flat file enumerator.

My issues is I have Server A, and Server B. I need to pull files from a folder in A onto B, B has SSIS on it. I tried creating a connection manager to the existing folder on A, but I cant seem to use it in the FOREACH container.




You are so wise...like a miniature budha covered in fur. -Anchorman

Accessing Excel\Access files through Sql Server 2008 R2 Stand 64 BIT



This has been just such a pain with 64 bit! Data Access!!  I have been unable to use linked servers from SQL server to access files because there is no Jet 64 bit. Now, I have been using bulk insert statements.  These are working ok, but for some uknown reason, for a certain .csv file I am getting unexpected end of line errors.  I have tried many things to no resolution..

How can I get linked servers to work with SQL Server 64 bit for excel and access?  Why would microsoft leave this out??



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend