ddepuemd
asked on
Vista and XP permissions problem
How do you make sure the installation directory allows writing by the user? How can you make sure to change the settings in a Deployment project?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
currentpath should have been curdir()
ASKER
I've modified the code to write that database to the users directory instead of program files...
good stuff well done, :)
ASKER
Dim CurrentPath as String = "C:\TestPath"
Dim UserName as String = system.environment.usernam
Dim dInfo As New DirectoryInfo(CurrentPath)
Dim dSecInfo As DirectorySecurity = dInfo.GetAccessControl(Acc
Dim myRuleValue As Integer = 0
myRuleValue = FileSystemRights.FullContr
Dim myRule as FileSystemAccessRule
myRule = New FileSystemAccessRule(UserN
dSecInfo.AddAccessRule(myR
dSecInfo.SetAccessRule(myR
dInfo.SetAccessControl(dSe
but it fails because it is not giving permission for the function to set the rule. Any ideas on how to set the rule as administrator???