Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute csc.exe in any pc --- how to set a web application by code

Status
Not open for further replies.

MarcosB

Programmer
Sep 4, 2002
10
0
0
UY
Hi.
I have two questions that have taken me some time and I would be pleased to find someone to answer them.

1 -How do you know which is the directory of the operating system Ej. "d:\winnt"
Purpose: I need to execute the c# compiler in execution time so I need to know where it is located.
I know that this is may be a poor solution to the problem, but unless the directory of the compiler is under the "path" I don't know how to execute it without going directly to the specific location in the hard drive


2 - How you can set a folder under the virtual directory as a Web Application by code.
Purpose: I need to set a directory as a Web application automaticaly without using the Administrative
tools in the configuration Panel.
The issue is that my program creates aspPages and its correspondig dlls and put them in virtual directory.
The problem arises when you try to execute the application because a security message is displayed indicating
that you have to do the process specified above to execute the page correctly.

Well, I will be very pleased to receive an answer to any of these questions.
Bye.
 
1. There is an API call:
HRESULT SHGetFolderPath(
HWND hwndOwner,
int nFolder,
HANDLE hToken,
DWORD dwFlags,
LPTSTR pszPath
);
That will find this for you when you use the constant CSIDL_WINDOWS for the nFolder value.

2. I have no idea, sorry.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top