简体   繁体   中英

mklink error in visual studios/webdev

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?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM