I have a folder that I only want Administrators having permissions to write text files to it.
I need to write text files in a program and insert it into the folder. I am currently using StreamWriter to write the files. It works for me to write the files because I am an administrator and have access to the folder.
I need to have it so all users using the program that may not have access to write to the folder can use the program, and when needed, use the vb.net program to write to the folder but if they try to access the folder they wont have access to write or edit anything in it.
My Idea's where to possibly create a 'Application User' that has access to the folder. This user would be somehow reference when writing the files from the application. Not sure if that is possible.
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter("O:\*****\****\**\****\" + LPlant + LMove + "_" + Format(thisDay, "yyyyMMddhhmmss") + ".dat", True)
file.WriteLine(LPlant + LMove + LMaterial + LQuantity + LLocation + LUnit + LPPOrderNum + LPONum + LPOItem + LBatchNum + LDocumentDT + LBadgeID + LSequenceNum)
file.Close()
Has anyone done anything like this in a vb.net application.
Any help would be appreciated
Thanks