Drag & drop install & read-only status
janschenkel at yahoo.com
Fri Sep 13 23:40:01 CDT 2002
I clicked the "send" button just a split second too
soon *doh* -- the startUp handler should look like:
# some other stuff...
if there is a file "firstrun.yes" then
# first time ; clean up read-only attributes...
# really should check for the result here...
delete file "firstrun.yes"
# some more stuff...
--- Jan Schenkel <janschenkel at yahoo.com> wrote:
> Hi Bob,
> I've had this problem before. The solution I went
> was the following:
> 1) on the cd, i put a small file names
> in the same directory as the application.
> 2) on startUp, the application checks for the
> existence of that same file.
> 3) if it exists, the application will run a batch
> "firstrun.bat" which will switch the read-only flag
> 4) after that has executed, the application will
> delete the "firstrun.yes" file.
> "firstrun.bat" looks something like:
> @echo "Finishing installation..."
> @echo "Do NOT interrupt this program!"
> @echo "1) Data files"
> @cd data
> @attrib -r *.*
> @echo "2) Help files"
> @cd ../help
> @attrib -r *.*
> @cd ..
> @attrib -r firstrun.yes
> @echo "Installation finished."
> The "on startUp" handler looks something like:
> on startUp
> # some other stuff...
> get shell("firstrun.bat")
> # really should check for the result here...
> delete file "firstrun.yes"
> # some more stuff...
> end startUp
> Note: of course you could use the shell() function
> read and execute the commands in "firstrun.bat" from
> field instead ; however, if something is wrong, it's
> easier to send a batch file than a new cd...
> Hope this helped,
> Jan Schenkel.
> "As we grow older, we grow both wiser and more
> at the same time." (De Rochefoucald)
> --- Bob Arnold <rfarnold at bu.edu> wrote:
> > I have encountered another stumbling block --
> > Apparently, a file copied from CD on Windows will
> > set as "read-only" in
> > the new destination (presumably since the CD
> > is locked). Is this
> > correct?
> > This puts a kink in in the simple notion of
> > drag-and-drop Windows
> > installation of application stacks with read/write
> > data or preference-saving
> > substacks.
> > A. does anyone know how to get Windows to avoid
> > doing this? --- or
> > B. Can a file's read-only attribute be changed
> > within a stack? My
> > stand-alone mainstack checks to see if its
> > exist -- it would be
> > nice if when checking, it could change the
> > to read/write as well.
> > My cursory search for such a capability in the
> > transcript dictionary didn't
> > come up with anything. -- Even if it could get the
> > attribute without
> > changing it, I could add an alert to the user.
> > Thanks in advance
> > Bob
> > --
> > Robert Arnold
> > Associate Professor of Film
> > Boston University
> > Tel (617) 353-7735 Fax (617) 353-1084
> > News: http://people.bu.edu/rfarnold/Announce.htm
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> Do you Yahoo!?
> Yahoo! News - Today's headlines
> use-revolution mailing list
> use-revolution at lists.runrev.com
Do you Yahoo!?
Yahoo! News - Today's headlines
More information about the use-livecode