I have an application that starts an SFX (self-extracting executable) file and extracts it.
The input file is located at c:\sfx\sfx.exe but it currently extracts to my application’s start up folder (c:\myapp\,) rather than where it is stored (c:\sfx\.)
How can I alter where the output goes?
When you start an application, the ‘working directory’ is the directory from which you start it (unless explicitly specified otherwise.) You can change this, however, using
SetCurrentDirectoryof theDirectoryclass.An example from the referenced MSDN page: