revDeleteFolder and revCopyFolder with Vista
Ken Ray
kray at sonsothunder.com
Thu Jun 28 14:01:44 EDT 2007
On Wed, 27 Jun 2007 18:13:02 +0200, Riccardo Linzitto wrote:
> I am using a localized version of Vista in Italian language: I have this
> system path c:\Programmi\...
>
> If I use revCopyFolder "c:\Programmi\MyFolder", "c:\" it works
> but
> if I use revCopyFolder "c:\Programmi\MyFolder", " c:\Programmi\MyFolder\a"
> it doens't work and the result is 4.
>
> The following command is ok:
> revCopyFolder "c:\Programmi\MyFolder", " c:\Program Files\MyFolder\a"
>
> Obviously it is not the same with XP.
Wow... didn't know that. The 'revCopyFolder' command uses the
underlying 'xcopy' command-line program for doing the copying, so
perhaps that is what's at fault in Vista.
> I would like to avoid the problems about the virtualstore location that you
> have explained in your post, by using C:\ as the default folder where the
> application is installed. Is it a good idea?
Good question - I don't think it's a "good" idea, but it gets the job
done. Best would be to create your program with just a "stub" (also
called "splash") executable (that all it does is launch and open
another stack file on disk. This way, you can install your stub program
in the Program Files folder, the rest of the running stack(s) that make
up your program in the user's Application Data folder, and then save
any data that the user generates into the user's Documents folder.
What that translates to on XP and Vista is:
1) Main Executable Stub
Install Location: specialFolderPath(38)
Windows XP - C:\Program Files
Windows Vista - C:\Program Files
2) Additional Program Stacks
Install Location: specialFolderPath(26)
Windows XP - C:\Documents and Settings\Ken\Application Data
Windows Vista - C:\Users\Ken\AppData\Roaming
3) Generated User Documents
Install Location: specialFolderPath(5) [another form is
specialFolderPath("documents")]
Windows XP - C:\Documents and Settings\Ken\My Documents
Windows Vista - C:\Users\Ken\Documents
If you don't already have this page bookmarked, I would suggest it:
Tip file010: 'specialFolderPath' Codes
http://www.sonsothunder.com/devres/revolution/tips/file010.htm
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list