2

In my webapp i write Process.Start("mklink", args);. This is for testing only and the function has an if to check which os this app is running on (it will be running on my linux server) but i get an exception

The system cannot find the file specified

My mklink is a system file on windows7 and vista. I suspect it isnt finding it because mklink may only be in the admin path.

How do i make it so my program can access mklink?

2 Answers2

3

mklink is built into cmd.exe. You would have to launch cmd.exe to access it. You could do this with cmd.exe /C mklink

where /C = execute command and terminate.

beryllium
  • 29,669
  • 15
  • 106
  • 125
Toby Meyer
  • 316
  • 1
  • 6
2

cmd.exe /C mklink "C:\Users\sizu\fooSymbolic" "C:\Users\sizu\foo"

Scott Izu
  • 21
  • 1