How to programmatically update a FTP Directory for 'Write Access'

I am writing scripts to create FTP directories automatically. The entire process will allow users to generate a username, password, etc for a new ftp share. The hurdle I am now facing is not being able to allow write access to the FTP share. I am not discussing NTFS security. I have attached an image that show what option I am trying to set.

The IISFTPDR vbs only allows for read access. I have tried to change the vbs to change the setting to write, but it does nothing different. The default for the accessflags = 1, I assumed 2 would set read + write.
' Set ftp virtual directory properties
    vdirObj.AccessFlags = 2 ' read access
	vdirObj.Put_()

Open in new window

ftpdir.jpg
LVL 1
LGerritseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LGerritseAuthor Commented:
I finally determined the resolution. The OS was overwriting the vbs file. The changes I had made to the iisftpdr.vbs were never truly being saved. I am glad to finally have figured this out. I am also glad the MS has this code so well documented. I could not find this information anywhere. Furthermore I found another question of the same never truly answered.

I made a copy of the file and gave it a name unique to my environment. Here are the results of my testing.
1 - Read Access
2 - Write Access
3 - Read and Write Access

' Set ftp virtual directory properties
    vdirObj.AccessFlags = 2 ' read access
      vdirObj.Put_()
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.