Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set system properties in C#

Tags:

c#

how can i set system properties in C#.

In java i can use:

System.setProperty("webdriver.chrome.driver","/path/to/where/you/ve/put/chromedriver.exe");

how to do this in C#?

like image 349
senzacionale Avatar asked Aug 24 '11 18:08

senzacionale


People also ask

Where are system properties set?

Programmatically, a system property can be set using the setProperty method of the System object, and also via the setProperty method of the Properties object that can be obtained from System via getProperties.

How do I find system properties?

Find the "My Computer" icon on the computer's desktop or access it from the "Start" menu. Right-click the "My Computer" icon. From the menu, choose "Properties" down at the bottom. A window will come up which will provide some specs.

How do I set system properties in Windows 10?

Right-click This PC in your Desktop, and click Properties to launch the System properties dialog. Or use keyboard shortcut - WinKey + Pause-Break.


1 Answers

try System.Environment.SetEnvironmentVariable("webdriver.chrome.driver",@"/path/to/where/you/ve/put/chromedriver.exe")
-MSDN

like image 127
Damith Avatar answered Sep 28 '22 01:09

Damith