Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to paint lines on combo-box in difference colors ? Pin
Luc Pattyn16-Jan-12 0:47
sitebuilderLuc Pattyn16-Jan-12 0:47 
GeneralRe: how to paint lines on combo-box in difference colors ? Pin
BobJanova16-Jan-12 3:43
BobJanova16-Jan-12 3:43 
Questionhelp Pin
rudra12415-Jan-12 21:03
rudra12415-Jan-12 21:03 
AnswerRe: help Pin
Mycroft Holmes15-Jan-12 21:08
professionalMycroft Holmes15-Jan-12 21:08 
AnswerRe: help Pin
OriginalGriff15-Jan-12 21:26
mveOriginalGriff15-Jan-12 21:26 
GeneralRe: help Pin
Luc Pattyn15-Jan-12 21:38
sitebuilderLuc Pattyn15-Jan-12 21:38 
AnswerRe: help Pin
thatraja16-Jan-12 2:13
professionalthatraja16-Jan-12 2:13 
QuestionWindows service Windows XP and Windows 7 Pin
Mc_Topaz15-Jan-12 20:58
Mc_Topaz15-Jan-12 20:58 
Hi!

For an application I have to learn, maintain and upgrade there is a code for installing Windows services. The code works on Windows XP, but it don't work on Windows 7 which I use.

The Windows service (Service.exe), needs two arguments for the main method. The two arguments are a string and a file path (File.txt).

This is the code for installing the service on XP:
C#
string installutilFolder; // Folder to installutil.exe
string filePath;          // Path to argument file (File.txt)
string serviceFolder;     // Path to folder for Service.exe

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = installutilFolder + @"\installutil";
process.StartInfo.Arguments = @"/i /key=""" + filePath + "\" \"" + serviceFolder + "\\Service.exe \"" ;
process.Start();

Pretty simple only the assignment is a bit weird. Notice the installutil will have two arguments:

* The string containing the file path which is the argument for the service
* The service to install

I'm happy that this actually works on Windows XP. But when I run this code on Windows 7, the services seems not to be installed, because I cannot find it where all other installed services are in Windows.

Any solution for how to install the service for Window 7? A solution which is same for Window XP and Windows 7 would be best.
AnswerRe: Windows service Windows XP and Windows 7 Pin
Luc Pattyn15-Jan-12 21:42
sitebuilderLuc Pattyn15-Jan-12 21:42 
AnswerRe: Windows service Windows XP and Windows 7 Pin
Mc_Topaz15-Jan-12 22:22
Mc_Topaz15-Jan-12 22:22 
GeneralRe: Windows service Windows XP and Windows 7 Pin
BobJanova16-Jan-12 3:48
BobJanova16-Jan-12 3:48 
GeneralRe: Windows service Windows XP and Windows 7 Pin
Dave Kreskowiak16-Jan-12 4:27
mveDave Kreskowiak16-Jan-12 4:27 
AnswerRe: Windows service Windows XP and Windows 7 Pin
Mc_Topaz16-Jan-12 5:29
Mc_Topaz16-Jan-12 5:29 
GeneralRe: Windows service Windows XP and Windows 7 Pin
Dave Kreskowiak16-Jan-12 6:40
mveDave Kreskowiak16-Jan-12 6:40 
QuestionMSIL obfuscator with .pdb symbol and source line number fixup Pin
Ravi Bhavnani15-Jan-12 16:26
professionalRavi Bhavnani15-Jan-12 16:26 
QuestionMagic Button Text Padding Pin
John R. Shaw15-Jan-12 8:30
John R. Shaw15-Jan-12 8:30 
AnswerRe: Magic Button Text Padding Pin
BillWoodruff15-Jan-12 16:07
professionalBillWoodruff15-Jan-12 16:07 
QuestionSuggestion to do a multilanguage project Pin
Arunkumar.Koloth15-Jan-12 1:21
Arunkumar.Koloth15-Jan-12 1:21 
AnswerRe: Suggestion to do a multilanguage project Pin
venomation15-Jan-12 1:42
venomation15-Jan-12 1:42 
AnswerRe: Suggestion to do a multilanguage project Pin
Not Active15-Jan-12 7:22
mentorNot Active15-Jan-12 7:22 
AnswerRe: Suggestion to do a multilanguage project Pin
Bernhard Hiller15-Jan-12 21:31
Bernhard Hiller15-Jan-12 21:31 
GeneralRe: Suggestion to do a multilanguage project Pin
joost.versteegen16-Jan-12 4:26
joost.versteegen16-Jan-12 4:26 
AnswerRe: Suggestion to do a multilanguage project Pin
jschell16-Jan-12 8:52
jschell16-Jan-12 8:52 
QuestionProblem with Ninject Pin
venomation15-Jan-12 0:28
venomation15-Jan-12 0:28 
AnswerRe: Problem with Ninject Pin
Dave Kreskowiak15-Jan-12 3:23
mveDave Kreskowiak15-Jan-12 3:23 

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.