1.I want my program to get the drive letter (like c:\,d:\) on form load and save that to a variable.What should i do to get the drive letter?

2.I want my application to fire this command (shutdown -s -p) on button click. But if i use this path (process.start("F:\Windows\System32\shutdown.exe -s -p")) to do the work it doesn't work.
The path is correct.What to do.

please help and enlighten me.

Hi,

For your second question, use this in a button event:

System.diagnostics.Process.Start("shutdown", "-s") 
' Will cause the computer to shutdown
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.