Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends
i Want to set DisplayName Property by variable, So when i want to change it i can dynamically.
How can i do that task?
for eg.
DisplayName=@%SystemRoot%\system32\umpnpmgr.dll,-100

This string Provide "Plug And Play" for that service.
Posted
Updated 28-Aug-12 0:56am
v3

1 solution

you can use the Process class to execute an assembly with commandline args and get the service name out of it, then set the result value to the service name

for more info http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^]

Hope this helps :)

Jas
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900