Hi,
i need some help with setting permissions to the file system. My code for saving a text file as part of a project file is
' create a file with information on project file (e.g. number of sheets, graphs and notes)
Dim FileInfo As New StreamWriter("F" + Convert.ToString(Counter) + Checkfile.Name, False, System.Text.Encoding.Unicode)
FileInfo.WriteLine(DynamicNewDataTable.Count)
For NodeCounter = 0 To TreeView_Mainform.Nodes(0).Nodes.Count - 1
FileInfo.WriteLine(TreeView_Mainform.Nodes(0).Nodes(NodeCounter).Text)
Next
It runs fine on our development machine, as well on client machine if the application is ran administrator. However, I would like to have it run properly for users who are not an administrator. I understand changing the line "requiredadministrator" in the app.manifest to "<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />" solve the problem, but what if UAC is turned off?
Is there a better and more reliable solution? I would appreciate any help. Many thanks in advance.
Cheers
Oliver
i need some help with setting permissions to the file system. My code for saving a text file as part of a project file is
' create a file with information on project file (e.g. number of sheets, graphs and notes)
Dim FileInfo As New StreamWriter("F" + Convert.ToString(Counter) + Checkfile.Name, False, System.Text.Encoding.Unicode)
FileInfo.WriteLine(DynamicNewDataTable.Count)
For NodeCounter = 0 To TreeView_Mainform.Nodes(0).Nodes.Count - 1
FileInfo.WriteLine(TreeView_Mainform.Nodes(0).Nodes(NodeCounter).Text)
Next
It runs fine on our development machine, as well on client machine if the application is ran administrator. However, I would like to have it run properly for users who are not an administrator. I understand changing the line "requiredadministrator" in the app.manifest to "<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />" solve the problem, but what if UAC is turned off?
Is there a better and more reliable solution? I would appreciate any help. Many thanks in advance.
Cheers
Oliver