In my apps which I have written over a number of years I have Used the Windows Scripting Host capabilty to identify special folders on the user's PC.
In particular I need their My Documents folder path so that I can access folders created during the installation.
As a test to check these values I have created a file with the values in that can be inspected - the code is
WshShell = Createobject("WScript.Shell")
Strtofile('Special Folders on this PC ','paths.txt',1)
Strtofile('' +Chr(013)+Chr(10),'paths.txt',1)
Strtofile('' +Chr(013)+Chr(10),'paths.txt',1)
For i = 1 To 17
mytarget = Addbs(WshShell.SpecialFolders(i))
reporter = Transform(i)+' ' +mytarget
Strtofile(reporter,'paths.txt',1)
Strtofile('' +Chr(013)+Chr(10),'paths.txt',1)
Endfor
the output I am using in my application is for #16 :-
mytarget = Addbs(WshShell.SpecialFolders(16))
Which gives me the path to the My Documents or Documents folder.
Now today I was chasing a missing output file on that path - so I ran the program again
Today I get for #16
16 - C:\Users\bryan\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\
Previously
16 - C:\Users\bryan\Documents
Is anyone aware of what might have happened in my PC ?
Is it a registry entry which has been corrupted?
Thanks
Coldan
In particular I need their My Documents folder path so that I can access folders created during the installation.
As a test to check these values I have created a file with the values in that can be inspected - the code is
WshShell = Createobject("WScript.Shell")
Strtofile('Special Folders on this PC ','paths.txt',1)
Strtofile('' +Chr(013)+Chr(10),'paths.txt',1)
Strtofile('' +Chr(013)+Chr(10),'paths.txt',1)
For i = 1 To 17
mytarget = Addbs(WshShell.SpecialFolders(i))
reporter = Transform(i)+' ' +mytarget
Strtofile(reporter,'paths.txt',1)
Strtofile('' +Chr(013)+Chr(10),'paths.txt',1)
Endfor
the output I am using in my application is for #16 :-
mytarget = Addbs(WshShell.SpecialFolders(16))
Which gives me the path to the My Documents or Documents folder.
Now today I was chasing a missing output file on that path - so I ran the program again
Today I get for #16
16 - C:\Users\bryan\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\
Previously
16 - C:\Users\bryan\Documents
Is anyone aware of what might have happened in my PC ?
Is it a registry entry which has been corrupted?
Thanks
Coldan