NT Service - working directory
-
Hello, How can change the working directory of NT service from WINNT\system32 to the exe directory (C++ unmanaged)? Thanks,
SetCurrentDirectory()
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
Hello, How can change the working directory of NT service from WINNT\system32 to the exe directory (C++ unmanaged)? Thanks,
Use
GetModuleFileName(NULL, ...)
to get the EXE's folder. Use that withSetCurrentDirectory()
.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
-
Hello, How can change the working directory of NT service from WINNT\system32 to the exe directory (C++ unmanaged)? Thanks,
If you are bent at using crt routines, then _chdir would do that. Be aware that this routine would internally call the win32 api, SetCurrentDirectory.
-
Hello, How can change the working directory of NT service from WINNT\system32 to the exe directory (C++ unmanaged)? Thanks,
See
SetCurrentDirectory(for set directory) GetCurrentDirectory(for get current directory)
_**
**_
WhiteSky