diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-06-05 15:05:46 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-06-05 15:05:51 +0100 |
commit | e96b27a0ec639a79b1282ab67bb021e0eeb9aa51 (patch) | |
tree | d750084c0eca7d12c605414a0b3c07dd74156f31 | |
parent | 2d55c345bd3ce04bfb01c7bad23e36d662574531 (diff) |
Fix opening htmlhelp when run without Administrator privileges.
Use cygwin_internal(CW_SYNC_WINENV) to populate the Win32 environment, so that
HtmlHelp() will try to create temporary files in a suitable location. rather
than falling back to %WINDIR%, which will fail without Adminstrator privileges.
-rw-r--r-- | main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -839,6 +839,12 @@ void usage(void) int main(int argc, char **argv) { + // It seems that HtmlHelp() may need to create a temporary file using + // GetTempPath(). Create a full Win32 environment, so that it can find a + // suitable location, rather than falling back to %WINDIR%, which will fail + // if we don't have Adminstrator privileges. + cygwin_internal(CW_SYNC_WINENV); + try { InitCommonControls(); CMyWizard dialog; |