Advertisement
Guest User

Untitled

a guest
Sep 8th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !include LogicLib.nsh
  2. !define CSIDL_NETWORK 0x0012
  3. !define CSIDL_NETHOOD 0x0013
  4. !define CSIDL_COMPUTERSNEARME 0x003d
  5. !define BIF_BROWSEFORCOMPUTER 0x00001000
  6. system::call 'shell32::SHGetFolderLocation(i $hwndparent,i ${CSIDL_NETWORK},i0,i0,*i.r3)i.r0'
  7. ${If} $0 <> 0
  8.     StrCpy $3 0
  9. ${EndIf}
  10. system::call '*(&t257)i.r2'
  11. system::call '*(i $hwndparent,i $3,ir2,i,i ${BIF_BROWSEFORCOMPUTER},i,i,i)i.r0'
  12. system::call 'shell32::SHBrowseForFolder(i r0)i.r1'
  13. ${If} $3 <> 0
  14.     system::call 'Shell32::ILFree(i $3)'
  15. ${EndIf}
  16. ${If} $1 <> 0
  17.     system::call 'Ole32::CoTaskMemFree(ir1)'
  18.     system::call '*$2(&t257.r0)'
  19. ${Else}
  20.     StrCpy $0 "user cancel"
  21. ${EndIf}
  22. system::free $0
  23.  
  24. system::free $2
  25. messagebox mb_ok $0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement