Element Dir GlobalConst PCharConst Dir.rgShellFolders, 'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' PCharConst Dir.rgPrograms, 'Programs' PCharConst Dir.rgStartup, 'Startup' PCharConst Dir.rgStartMenu, 'Start Menu' PCharConst Dir.rgDesktop, 'Desktop' PCharConst Dir.rgFavorites, 'Favorites' PCharConst Dir.rgFonts, 'Fonts' PCharConst Dir.rgHistory, 'History' PCharConst Dir.rgPersonal, 'Personal' PCharConst Dir.rgSendTo, 'SendTo' GlobalProc proc Dir.GetStdDir rgName locals hKey dd ? dwType dd ? dwSize dd ? endl lea eax,[hKey] invoke RegOpenKeyEx,HKEY_CURRENT_USER,Dir.rgShellFolders,0,KEY_READ,eax mov eax,512 mov [dwSize],eax lea edx,[__rtl_temp_str] call __strsetlength lea eax,[dwType] lea ecx,[dwSize] invoke RegQueryValueEx,[hKey],[rgName],0,eax,[__rtl_temp_str],ecx invoke RegCloseKey,[hKey] ret endp PointWork doDir \local res ToString res,data,data.type invoke CreateDirectory,res,0 if Self#.onEnd.use eq 1 Self#.onEnd data,data.type end if EndPoint PointWork doCurrentDir \local res ToString res,data,data.type invoke SetCurrentDirectory,res if Self#.onEnd.use eq 1 Self#.onEnd data,data.type end if EndPoint PointVar CurrentDir,data_str mov eax,512 lea edx,[__rtl_temp_str] call __strsetlength mov eax,[__rtl_temp_str] invoke GetCurrentDirectory,512,eax result equ [__rtl_temp_str] EndPoint PointVar WindowsDir,data_str mov eax,512 lea edx,[__rtl_temp_str] call __strsetlength mov eax,[__rtl_temp_str] invoke GetWindowsDirectory,eax,512 result equ [__rtl_temp_str] EndPoint PointVar TempDir,data_str mov eax,512 lea edx,[__rtl_temp_str] call __strsetlength mov eax,[__rtl_temp_str] invoke GetTempPath,512,eax result equ [__rtl_temp_str] EndPoint PointVar ProgramsDir,data_str stdcall Dir.GetStdDir,Dir.rgPrograms result equ [__rtl_temp_str] EndPoint PointVar StartUpDir,data_str stdcall Dir.GetStdDir,Dir.rgStartup result equ [__rtl_temp_str] EndPoint PointVar StartMenuDir,data_str stdcall Dir.GetStdDir,Dir.rgStartMenu result equ [__rtl_temp_str] EndPoint PointVar DesktopDir,data_str stdcall Dir.GetStdDir,Dir.rgDesktop result equ [__rtl_temp_str] EndPoint PointVar FavoritesDir,data_str stdcall Dir.GetStdDir,Dir.rgFavorites result equ [__rtl_temp_str] EndPoint PointVar FontsDir,data_str stdcall Dir.GetStdDir,Dir.rgFonts result equ [__rtl_temp_str] EndPoint PointVar HistoryDir,data_str stdcall Dir.GetStdDir,Dir.rgHistory result equ [__rtl_temp_str] EndPoint PointVar MyDocumentDir,data_str stdcall Dir.GetStdDir,Dir.rgPersonal result equ [__rtl_temp_str] EndPoint PointVar SendToDir,data_str stdcall Dir.GetStdDir,Dir.rgSendTo result equ [__rtl_temp_str] EndPoint EndElement