Sign in to follow this  
Followers 0
ScriptingSteve

API calling

1 post in this topic

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

1 person likes this

Share this post


Link to post
Share on other sites



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
Sign in to follow this  
Followers 0