Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ctypes
- from ctypes import wintypes, windll
- CSIDL_LOCAL_APPDATA = 28
- _SHGetFolderPath = windll.shell32.SHGetFolderPathW
- _SHGetFolderPath.argtypes = [wintypes.HWND,
- ctypes.c_int,
- wintypes.HANDLE,
- wintypes.DWORD, wintypes.LPCWSTR]
- path_buf = wintypes.create_unicode_buffer(wintypes.MAX_PATH)
- result = _SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, 0, path_buf)
- print path_buf.value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement