aj85
asked on
VB.NET String Settings and Temp Folder Question
I have a VB.NET application that looks for a specific folder called "datarepository" that gets created in the Windows temp path. The settings value within the application is named "datapath".
Below is the value that is within the settings:
Name Type Scope Value
datapath String User "C:\Users\<username>\AppDa ta\Local\T emp\datare pository"
Within the vshost.exe.config file the values show as the following:
<setting name="datapath" serializeAs="String">
<value>C:\Users\<userna me>\App Data\Local \Temp\data repository </value>
</setting>
Please note the "<" around the "username" within the string value. I think this is causing an error within the application as the path is not found. Can someone advise on how to pass in the value so I can be certain that the folder and path are created correctly in both Win 7 and 10 OS?
Regards,
aj85
Below is the value that is within the settings:
Name Type Scope Value
datapath String User "C:\Users\<username>\AppDa
Within the vshost.exe.config file the values show as the following:
<setting name="datapath" serializeAs="String">
<value>C:\Users\<userna
</setting>
Please note the "<" around the "username" within the string value. I think this is causing an error within the application as the path is not found. Can someone advise on how to pass in the value so I can be certain that the folder and path are created correctly in both Win 7 and 10 OS?
Regards,
aj85
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Fernando, the code worked very well and solved my problem.
Regards,
aj85
Regards,
aj85
Open in new window
or get current user's AppData folderOpen in new window