if you are using windows vista or higher, you can make a symbolic link
to the folder. for example:
mklink /d C:\pf "C:\Program Files"mklink /d C:\pf86 "C:\Program Files (x86)"
would make a link so c:\pf
would be your program files folder. I shaved off 300 characters from my path by using this trick.
(I know it's not related to setx but it is useful for people which are searching overcomming on 1024 char limit)