Click here to Skip to main content
15,891,375 members
Home / Discussions / C#
   

C#

 
GeneralRe: What is this Control's name? Pin
sharmit2-May-07 16:33
sharmit2-May-07 16:33 
QuestionGetting the bin directory location for a service??!! Pin
LongRange.Shooter1-May-07 11:54
LongRange.Shooter1-May-07 11:54 
AnswerRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult1-May-07 18:01
mvePIEBALDconsult1-May-07 18:01 
GeneralRe: Getting the bin directory location for a service??!! Pin
LongRange.Shooter2-May-07 5:30
LongRange.Shooter2-May-07 5:30 
GeneralRe: Getting the bin directory location for a service??!! [modified] Pin
PIEBALDconsult2-May-07 13:35
mvePIEBALDconsult2-May-07 13:35 
GeneralRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult2-May-07 15:02
mvePIEBALDconsult2-May-07 15:02 
GeneralRe: Getting the bin directory location for a service??!! Pin
LongRange.Shooter10-May-07 10:22
LongRange.Shooter10-May-07 10:22 
AnswerRe: Getting the bin directory location for a service??!! Pin
justintimberlake1-May-07 18:01
justintimberlake1-May-07 18:01 
System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
this will return the path of exe of windows service now to get the directory path parse the string and get the folder path i have dome it for my self u can see it.
////
public string GivePath()
{
string originalPath =System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
int length;
length=originalPath.Length;
string sp=@"/";
char c=System.Convert.ToChar(sp);
string[] splitstring=originalPath.Split(c);
int mylen=splitstring.Length;
string exepro =splitstring[mylen-1];
int exeprolen=exepro.Length;
int reqlength=length-exeprolen;
string truncstring=originalPath.Substring(0,reqlength);
int rellength=truncstring.Length - 8;
string string1=(truncstring.Substring(8,rellength));
//string msg=string.Empty;;
return(string1);
}

just relax
AnswerRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult2-May-07 15:10
mvePIEBALDconsult2-May-07 15:10 
GeneralRe: Getting the bin directory location for a service??!! Pin
LongRange.Shooter2-May-07 5:21
LongRange.Shooter2-May-07 5:21 
GeneralRe: Getting the bin directory location for a service??!! Pin
justintimberlake2-May-07 18:57
justintimberlake2-May-07 18:57 
GeneralRe: Getting the bin directory location for a service??!! Pin
LongRange.Shooter2-May-07 5:30
LongRange.Shooter2-May-07 5:30 
GeneralRe: Getting the bin directory location for a service??!! Pin
justintimberlake2-May-07 19:05
justintimberlake2-May-07 19:05 
AnswerThe only thing that works with a service in the 2.0 framework Pin
LongRange.Shooter3-May-07 1:43
LongRange.Shooter3-May-07 1:43 
AnswerRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult3-May-07 15:31
mvePIEBALDconsult3-May-07 15:31 
GeneralRe: Getting the bin directory location for a service??!! Pin
LongRange.Shooter4-May-07 3:01
LongRange.Shooter4-May-07 3:01 
GeneralRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult4-May-07 16:47
mvePIEBALDconsult4-May-07 16:47 
GeneralRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult6-May-07 14:14
mvePIEBALDconsult6-May-07 14:14 
QuestionThread creation using reflection for the target? Pin
LongRange.Shooter1-May-07 9:55
LongRange.Shooter1-May-07 9:55 
AnswerRe: Thread creation using reflection for the target? Pin
Ian Shlasko1-May-07 10:21
Ian Shlasko1-May-07 10:21 
GeneralRe: Thread creation using reflection for the target? Pin
LongRange.Shooter1-May-07 10:58
LongRange.Shooter1-May-07 10:58 
AnswerRe: Thread creation using reflection for the target? Pin
PIEBALDconsult1-May-07 18:26
mvePIEBALDconsult1-May-07 18:26 
QuestionC# Remote Window Hooks Pin
Bourtree1-May-07 9:40
Bourtree1-May-07 9:40 
AnswerRe: C# Remote Window Hooks Pin
LongRange.Shooter1-May-07 11:58
LongRange.Shooter1-May-07 11:58 
GeneralRe: C# Remote Window Hooks Pin
Bourtree3-May-07 6:51
Bourtree3-May-07 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.