c++windowswinapisystemwebdav

Windows Command Line History


I need to programmatically mount a WebDAV volume in Windows using C, and I think I'm going to use system() to achieve this (via the 'net use' command)... However, since net use requires that the password be written in plain text, I just wanted to make sure there's no logging of commands run in the Windows command line shell... I know in Mac OS X and Linux in some circumstances commands can be logged in the file .bash_history, so I thought maybe something similar was going on in Windows. I don't think so though, since nothing showed up on Google.


Solution

  • The shell has a history, but it's only stored in memory not a log on disk. That said, it could end up in the swap file and open to (slightly non-trivial) discovery. Then again, if you did the connection directly in your own program using something like WNetAddConnection2, it could end up in the swap file anyway.