Advertisement
Najeebsk

WINDOWS FOLDER LOCATIONS (WINDOWS XP/WINDOWS 7).txt

Nov 10th, 2022 (edited)
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.78 KB | None | 0 0
  1. WINDOWS FOLDER LOCATIONS (WINDOWS XP/WINDOWS 7)
  2.  
  3. - Note: you can paste these into the address bar of an Explorer window or into the Run dialog (which you can show by pressing Win+R).
  4. - Environment variables like %appdata%, %temp%, %username%, and 'shell:' folders like shell:Desktop will be resolved.
  5.  
  6. Windows XP folders:
  7. A_AppData = C:\Documents and Settings\%username%\Application Data
  8. A_AppDataCommon = C:\Documents and Settings\All Users\Application Data
  9. A_Desktop = C:\Documents and Settings\%username%\Desktop
  10. A_DesktopCommon = C:\Documents and Settings\All Users\Desktop
  11. A_MyDocuments = C:\Documents and Settings\%username%\My Documents
  12. A_ProgramFiles = C:\Program Files
  13. A_Programs = C:\Documents and Settings\%username%\Start Menu\Programs
  14. A_ProgramsCommon = C:\Documents and Settings\All Users\Start Menu\Programs
  15. A_StartMenu = C:\Documents and Settings\%username%\Start Menu
  16. A_StartMenuCommon = C:\Documents and Settings\All Users\Start Menu
  17. A_Startup = C:\Documents and Settings\%username%\Start Menu\Programs\Startup
  18. A_StartupCommon = C:\Documents and Settings\All Users\Start Menu\Programs\Startup
  19. A_Temp = C:\DOCUME~1\%username%\LOCALS~1\Temp
  20. A_WinDir = C:\WINDOWS
  21. Recent = C:\Documents and Settings\%username%\Recent
  22.  
  23. Windows 7 folders:
  24. A_AppData = C:\Users\%username%\AppData\Roaming
  25. A_AppDataCommon = C:\ProgramData
  26. A_Desktop = C:\Users\%username%\Desktop
  27. A_DesktopCommon = C:\Users\Public\Desktop
  28. A_MyDocuments = C:\Users\%username%\Documents
  29. A_ProgramFiles = C:\Program Files
  30. A_Programs = C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
  31. A_ProgramsCommon = C:\ProgramData\Microsoft\Windows\Start Menu\Programs
  32. A_StartMenu = C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu
  33. A_StartMenuCommon = C:\ProgramData\Microsoft\Windows\Start Menu
  34. A_Startup = C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  35. A_StartupCommon = C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
  36. A_Temp = C:\Users\%username%\AppData\Local\Temp
  37. A_WinDir = C:\Windows
  38. Recent = C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Recent
  39.  
  40. 'shell:' folders:
  41. note: 'shell:MyComputerFolder' doesn't work on Windows XP
  42. note: there is no 'shell:Temp' shortcut
  43. A_AppData = shell:AppData
  44. A_AppDataCommon = shell:Common AppData
  45. A_Desktop = shell:Desktop
  46. A_DesktopCommon = shell:Common Desktop
  47. A_MyDocuments = shell:Personal
  48. A_ProgramFiles = shell:ProgramFiles
  49. A_Programs = shell:Programs
  50. A_ProgramsCommon = shell:Common Programs
  51. A_StartMenu = shell:Start Menu
  52. A_StartMenuCommon = shell:Common Start Menu
  53. A_Startup = shell:Startup
  54. A_StartupCommon = shell:Common Startup
  55. A_Temp = %temp%
  56. A_WinDir = shell:Windows
  57. MyComputer = shell:MyComputerFolder
  58. Recent = shell:Recent
  59.  
  60. Link with more 'shell:' folders:
  61. Shell Commands to Access the Special Folders in Windows 10/8/7/Vista/XP » Winhelponline
  62. http://www.winhelponline.com/blog/shell-commands-to-access-the-special-folders/
  63.  
  64. ==================================================
  65.  
  66. WINDOW EVENTS
  67.  
  68. [SetWinEventHook]
  69. Event Constants (Windows)
  70. https://msdn.microsoft.com/en-us/library/windows/desktop/dd318066(v=vs.85).aspx
  71. Simple File Explorer Fix - AutoHotkey Community
  72. https://autohotkey.com/boards/viewtopic.php?f=5&t=48911&p=219950#p219950
  73. Is possible to get path when Explorer window is closing and restore when is opening? - AutoHotkey Community
  74. https://autohotkey.com/boards/viewtopic.php?f=5&t=49842&p=221423#p221423
  75. Trouble getting shellhook to detect window change - AutoHotkey Community
  76. https://autohotkey.com/boards/viewtopic.php?f=5&t=51265&p=226227#p226227
  77.  
  78. [WMI events e.g. WmiMonitorBrightnessEvent]
  79. Detect screen brightness changes in Windows 10 - AutoHotkey Community
  80. https://autohotkey.com/boards/viewtopic.php?f=5&t=58914
  81.  
  82. ==================================================
  83.  
  84. LAUNCH/RELOAD SCRIPT AS ADMIN/NON-ADMIN (RUN AS ADMINISTRATOR)
  85.  
  86. Reloading: Admin to Non-Admin - AutoHotkey Community
  87. https://autohotkey.com/boards/viewtopic.php?f=5&t=7752
  88.  
  89. ==================================================
  90.  
  91. SCREEN BRIGHTNESS
  92.  
  93. 3 ways to dim the screen - AutoHotkey Community
  94. https://autohotkey.com/boards/viewtopic.php?f=6&t=39580
  95.  
  96. Brightness adjust via scroll wheel - AutoHotkey Community
  97. https://autohotkey.com/boards/viewtopic.php?f=5&t=69857
  98.  
  99. ==================================================
  100. ;Run, ::{20d04fe0-3aea-1069-a2d8-08002b30309d} ;Computer (My Computer)
  101. ;Run, ::{645ff040-5081-101b-9f08-00aa002f954e} ;Recycle Bin
  102. ;Run, shell:MyComputerFolder ;Computer (My Computer)
  103. ;Run, shell:RecycleBinFolder ;Recycle Bin
  104. ===================================================
  105. ;Tested on Windows 7.
  106.  
  107. ;combined A_Desktop and A_DesktopCommon
  108. Run, "%A_Desktop%"
  109. ;Run, "C:\Users\%A_UserName%\Desktop"
  110. ;Run, explore "%A_Desktop%"
  111. ;Run, shell:Desktop
  112.  
  113. ;A_Desktop only
  114. Run, explorer.exe "%A_Desktop%"
  115. ;Run, explorer.exe "C:\Users\%A_UserName%\Desktop"
  116. ;Run, "C:\Documents and Settings\%A_UserName%\Desktop"
  117.  
  118. ;A_DesktopCommon only
  119. Run, "%A_DesktopCommon%"
  120. ;Run, C:\Users\Public\Desktop
  121. ------------------------------------------------------------------
  122. ;Tested on Windows 7.
  123.  
  124. ;combined A_Desktop and A_DesktopCommon
  125. Run, "%A_Desktop%"
  126. ;Run, "C:\Users\%A_UserName%\Desktop"
  127. ;Run, explore "%A_Desktop%"
  128. ;Run, shell:Desktop
  129.  
  130. ;A_Desktop only
  131. Run, explorer.exe "%A_Desktop%"
  132. ;Run, explorer.exe "C:\Users\%A_UserName%\Desktop"
  133. ;Run, "C:\Documents and Settings\%A_UserName%\Desktop"
  134.  
  135. ;A_DesktopCommon only
  136. Run, "%A_DesktopCommon%"
  137. ;Run, C:\Users\Public\Desktop
  138. =======================================================
  139. ;PostMessage, 0x111, 415,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Win+M?
  140. ;PostMessage, 0x111, 416,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Shift+Win+M? restore all
  141. ;PostMessage, 0x111, 419,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;show desktop (doesn't toggle)
  142. ;PostMessage, 0x111, 407,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Win+D? show desktop toggle
  143. -----------------------------------------------------------------
  144. ;PostMessage, 0x111, 415,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Win+M?
  145. ;PostMessage, 0x111, 416,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Shift+Win+M? restore all
  146. ;PostMessage, 0x111, 419,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;show desktop (doesn't toggle)
  147. ;PostMessage, 0x111, 407,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Win+D? show desktop toggle
  148. =========================================================
  149. ;Run, ::{20d04fe0-3aea-1069-a2d8-08002b30309d} ;Computer (My Computer)
  150. ;Run, ::{645ff040-5081-101b-9f08-00aa002f954e} ;Recycle Bin
  151. ;Run, shell:MyComputerFolder ;Computer (My Computer)
  152. ;Run, shell:RecycleBinFolder ;Recycle Bin
  153. ==========================================================
  154. ;PostMessage, 0x111, 401,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Win+R Run dialog
  155. ;Run, shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0} ;Win+R Run dialog
  156. ;PostMessage, 0x111, 41093,,, ahk_class Shell_TrayWnd ;WM_COMMAND ;Win+F Search Results
  157. ;Run, taskmgr ;Ctrl+Shift+Esc Windows Task Manager
  158. ;Run, control hotplug.dll ;Safely Remove Hardware (e.g. Windows XP)
  159. ;Run, sndvol32 ;Volume Control (e.g. Windows XP)
  160. ;Run, sndvol ;Volume Mixer (e.g. Windows 7)
  161. ;Run, C:\Windows\System32\SndVol.exe ;Volume Mixer (e.g. Windows 7)
  162. ;Run, msinfo32 ;System Information
  163. ;Run, intl.cpl ;Region and Language
  164. ;Run, timedate.cpl ;Date and Time
  165.  
  166. ;Run, sysdm.cpl ;System Properties, Computer Name tab
  167. ;Run, % "control sysdm.cpl,,2" ;System Properties, Hardware tab ;tab may not show
  168. ;Run, % "control sysdm.cpl,,3" ;System Properties, Advanced tab ;(e.g. Environment Variables)
  169. ;Run, % "control sysdm.cpl,,3" ;System Properties, Advanced tab ;(e.g. Performance, Settings..., Adjust for best performance)
  170. ;Run, % "control sysdm.cpl,,4" ;System Properties, System Protection tab ;tab may not show
  171. ;Run, % "control sysdm.cpl,,5" ;System Properties, Remote tab
  172.  
  173. ;Run, mmsys.cpl ;Sound, Playback tab
  174. ;Run, % "control mmsys.cpl,,1" ;Sound, Recording tab
  175. ;Run, % "control mmsys.cpl,,2" ;Sound, Sounds tab
  176. ;Run, % "control mmsys.cpl,,3" ;Sound, Communications tab
  177.  
  178. ;Run, % "rundll32 shell32.dll,Options_RunDLL" ;Folder Options, General tab
  179. ;Run, % "rundll32 shell32.dll,Options_RunDLL 7" ;Folder Options, View tab
  180. ;Run, % "rundll32 shell32.dll,Options_RunDLL 2" ;Folder Options, Search tab
  181.  
  182. ;Run, % "rundll32 shell32.dll,Options_RunDLL 1" ;Taskbar and Start Menu Properties, Taskbar tab
  183. ;Run, % "rundll32 shell32.dll,Options_RunDLL 3" ;Taskbar and Start Menu Properties, Start Menu tab
  184. ;Run, % "rundll32 shell32.dll,Options_RunDLL 6" ;Taskbar and Start Menu Properties, Toolbars tab
  185.  
  186. ;Run, % "rundll32 shell32.dll,Options_RunDLL 5" ;Control Panel\All Control Panel Items\Notification Area Icons
  187. ;Run, % "rundll32 shell32.dll,Options_RunDLL 4" ;Control Panel\All Control Panel Items\Notification Area Icons\System Icons
  188.  
  189. ;e.g. DllCall equivalents:
  190. ;DllCall("shell32\Options_RunDLLW", "Ptr",0, "Ptr",0, "WStr","", "UInt",1) ;Folder Options, General tab
  191. ;DllCall("shell32\Options_RunDLLW", "Ptr",0, "Ptr",0, "WStr","7", "UInt",1) ;Folder Options, View tab
  192. =====================================================
  193. ;Run, % "rundll32 user32.dll,LockWorkStation" ;Win+L
  194. ;DllCall("user32\LockWorkStation") ;Win+L
  195. ;DllCall("powrprof\SetSuspendState", "UChar",0, "UChar",0, "UChar",0, "UChar") ;Sleep/Suspend
  196. ;DllCall("powrprof\SetSuspendState", "UChar",1, "UChar",0, "UChar",0, "UChar") ;Hibernate
  197. ;Shutdown
  198. ;https://autohotkey.com/docs/commands/Shutdown.htm
  199. ======================================================
  200. ;Run, control ;Control Panel (view: Category/Large icons/small icons)
  201. ;Run, ::{26EE0668-A00A-44D7-9371-BEB064C98683} ;Control Panel (view: Category)
  202.  
  203. ;Run, ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0 ;Control Panel\All Control Panel Items ;(view: Large icons/Small icons)
  204. ;Run, shell:ControlPanelFolder ;Control Panel\All Control Panel Items ;(view: Large icons/Small icons)
  205.  
  206. ;Run, control /name Microsoft.WindowsUpdate ;Windows Update
  207. ;Run, explorer.exe shell:::{36EEF7DB-88AD-4E81-AD49-0E313F0C35F8} ;Windows Update
  208.  
  209. ;if A_Is64bitOS && !(A_PtrSize=8) ;if 32-bit AHK on 64-bit PC
  210. ; DllCall("kernel32\Wow64DisableWow64FsRedirection", "Ptr*",0)
  211. ;Run, explorer.exe shell:::{36EEF7DB-88AD-4E81-AD49-0E313F0C35F8}\pageSettings ;Windows Update\Change settings
  212.  
  213. ;Run, control /name Microsoft.PowerOptions /page pagePlanSettings ;Power Options\Edit Plan Settings
  214. ;Run, shell:::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pagePlanSettings ;Power Options\Edit Plan Settings
  215.  
  216. ;Run, % "control desk.cpl,,2" ;Control Panel\Appearance and Personalization\Personalization
  217. ;Run, % "rundll32 shell32.dll,Control_RunDLL desk.cpl,,2" ;Control Panel\Appearance and Personalization\Personalization
  218. ;DllCall("shell32\Control_RunDLLW", "Ptr",0, "Ptr",0, "WStr","desk.cpl,,2", "UInt",1) ;Control Panel\Appearance and Personalization\Personalization
  219. ;Run, explorer.exe shell:::{ED834ED6-4B5A-4BFE-8F11-A626DCB6A921} ;Control Panel\Appearance and Personalization\Personalization
  220.  
  221. ;Run, desk.cpl ;Control Panel\Appearance and Personalization\Display\Screen Resolution
  222. ;Run, % "control desk.cpl,,0" ;Desktop Icon Settings
  223. ;Run, % "control desk.cpl,,1" ;Screen Saver Settings
  224. ;Run, % "control desk.cpl,,2" ;Control Panel\Appearance and Personalization\Personalization
  225. ;Run, % "control desk.cpl,,5" ;Window Color and Appearance
  226.  
  227. ;Run, control system ;System
  228. ;Run, control /name Microsoft.System ;System
  229. ;Run, shell:::{BB06C0E4-D293-4F75-8A90-CB05B6477EEE} ;System
  230.  
  231. ;Run, control /name Microsoft.NetworkAndSharingCenter ;Network and Sharing Center
  232. ;Run, shell:::{8E908FC9-BECC-40F6-915B-F4CA0E70D03D} ;Network and Sharing Center
  233.  
  234. ;Run, ncpa.cpl ;Control Panel\Network and Internet\Network Connections
  235. ;Run, control netconnections ;Network Connections ;Control Panel\Network and Internet\Network Connections
  236. ;Run, ::{7007ACC7-3202-11D1-AAD2-00805FC1270E} ;Network Connections
  237. ;Run, shell:ConnectionsFolder ;Control Panel\All Control Panel Items\Network Connections
  238.  
  239. ;Run, shell:NetworkPlacesFolder ;Network
  240.  
  241. ;Run, appwiz.cpl ;Programs and Features (Uninstall or change a program)
  242. ;Run, shell:::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5} ;Programs and Features (Uninstall or change a program)
  243. ==================================================
  244. ;non-obvious names
  245. ;Run, calc ;Calculator
  246. ;Run, charmap ;Character Map
  247. ;Run, cmd ;Command Prompt
  248. ;Run, mspaint ;Paint
  249. ;Run, winword ;Microsoft Word
  250.  
  251. ;obvious names
  252. ;Run, excel ;Microsoft Excel
  253. ;Run, notepad ;Notepad
  254. ;Run, wordpad ;WordPad
  255. ===================================================
  256. ;RunWait, displayswitch /internal ;Computer only/Disconnect Projector
  257. ;RunWait, displayswitch /clone ;Duplicate
  258. ;RunWait, displayswitch /extend ;Extend
  259. ;RunWait, displayswitch /external ;Projector only
  260. ====================================================
  261. ;4 levels of complexity:
  262. ;Run, ::{MyCLSID}
  263. ;Run, shell:::{MyCLSID}
  264. ;Run, explorer.exe shell:::{MyCLSID}
  265. ;Run, explorer.exe shell:::{MyCLSID} ;plus call Wow64DisableWow64FsRedirection (if 32-bit AHK on 64-bit PC)
  266.  
  267. ;Run, ::{20d04fe0-3aea-1069-a2d8-08002b30309d} ;My Computer
  268. ;Run, ::{26EE0668-A00A-44D7-9371-BEB064C98683} ;Control Panel (view: Category)
  269. ;Run, ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0 ;Control Panel\All Control Panel Items ;(view: Large icons/Small icons)
  270. ;Run, ::{645ff040-5081-101b-9f08-00aa002f954e} ;Recycle Bin
  271. ;Run, ::{7007ACC7-3202-11D1-AAD2-00805FC1270E} ;Network Connections
  272.  
  273. ;Run, shell:::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}\pagePlanSettings ;Power Options\Edit Plan Settings
  274. ;Run, shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0} ;Win+R Run dialog
  275. ;Run, shell:::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5} ;Programs and Features (Uninstall or change a program)
  276. ;Run, shell:::{8E908FC9-BECC-40F6-915B-F4CA0E70D03D} ;Network and Sharing Center
  277. ;Run, shell:::{BB06C0E4-D293-4F75-8A90-CB05B6477EEE} ;System
  278.  
  279. ;Run, explorer.exe shell:::{36EEF7DB-88AD-4E81-AD49-0E313F0C35F8} ;Windows Update
  280. ;Run, explorer.exe shell:::{ED834ED6-4B5A-4BFE-8F11-A626DCB6A921} ;Control Panel\Appearance and Personalization\Personalization
  281.  
  282. ;if A_Is64bitOS && !(A_PtrSize=8) ;if 32-bit AHK on 64-bit PC
  283. ; DllCall("kernel32\Wow64DisableWow64FsRedirection", "Ptr*",0)
  284. ;Run, explorer.exe shell:::{36EEF7DB-88AD-4E81-AD49-0E313F0C35F8}\pageSettings ;Windows Update\Change settings
  285. ================================================
  286. ;PostMessage, 0x111, 41249,, ShellTabWindowClass1, A ;WM_COMMAND := 0x111 ;Back
  287. ;PostMessage, 0x111, 41250,, ShellTabWindowClass1, A ;WM_COMMAND := 0x111 ;Forward
  288. ;PostMessage, 0x111, 40994,, ShellTabWindowClass1, A ;WM_COMMAND := 0x111 ;Up one level
  289.  
  290. ;PostMessage, 0x111, 28705,, SHELLDLL_DefView1, A ;Select all
  291. ;PostMessage, 0x111, 28706,, SHELLDLL_DefView1, A ;Invert Selection
  292. ;PostMessage, 0x111, 28747,, SHELLDLL_DefView1, A ;View, Details
  293. ;PostMessage, 0x111, 28753,, SHELLDLL_DefView1, A ;View, List
  294. ;PostMessage, 0x111, 31492,, SHELLDLL_DefView1, A ;View, Sort by, Name ;toggle ascending/descending
  295. =======================================================
  296. ;PostMessage, 0x111, 403, 0,, ahk_class Shell_TrayWnd ;Cascade windows
  297. ;PostMessage, 0x111, 404, 0,, ahk_class Shell_TrayWnd ;Show windows side by side ;(tile horizontally) (tile as columns)
  298. ;PostMessage, 0x111, 405, 0,, ahk_class Shell_TrayWnd ;Show windows stacked ;(tile vertically) (tile as rows)
  299. ;PostMessage, 0x111, 416, 0,, ahk_class Shell_TrayWnd ;Undo ;(undo cascade/tile)
  300.  
  301. ;note: the terms 'tile horizontally' and 'tile vertically' are confusing and often used to mean opposites
  302. ;'tile as columns' and 'tile as rows' are more sensible
  303. ;https://www.safaribooksonline.com/library/view/filemaker-pro-9/9780596514136/httpatomoreillycomsourceoreillyimages44774.png
  304.  
  305. ;note: these numbers (tested on Windows 7) differ from those obtained by querying the context menu (on Windows 7):
  306.  
  307. ;404 Cascade windows
  308. ;406 Show windows stacked
  309. ;405 Show windows side by side
  310. ;408 Show the desktop
  311.  
  312. ;421 Start Task Manager
  313.  
  314. ;425 Lock the taskbar
  315. ;414 Properties
  316. ========================================================
  317.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement