Jump to content

Recommended Posts

Posted

I am attempting to use Microsoft APIs within AutoIT to change system folder locations based on context - i.e. laptop logging on to network gets My Documents pointed to network folder, whereas the same laptop logging on disconnected would have local My Documents. Our organization has not implemented Folder Redirection via Group Policy, so I'm trying to appropriately simulate it.

I was able to implement API SHGetFolderPath, but am unable to get SHSetFolderPath to work.

SetFolderPath requires an ordinal to be passed first to API GetProcAddress, and then the subsequent pointer (I think) referenced to perform the intended action.

I am trying to change the location of "My Documents", and am thus attempting to use csidl '5' as an integer representation of csidl "CSIDL_PERSONAL"...

I can't seem to visualize how to implement these actions in AutoIt...

If anyone can help, that would be great!

I have attached what is working so far...

Getpaths.au3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...