Drag & drop install & read-only status
Jan Schenkel
janschenkel at yahoo.com
Fri Sep 13 23:40:01 EDT 2002
Hi Bob,
I clicked the "send" button just a split second too
soon *doh* -- the startUp handler should look like:
on startUp
# some other stuff...
if there is a file "firstrun.yes" then
# first time ; clean up read-only attributes...
get shell("firstrun.bat")
# really should check for the result here...
delete file "firstrun.yes"
end if
# some more stuff...
end startUp
Best regards,
Jan Schenkel.
--- Jan Schenkel <janschenkel at yahoo.com> wrote:
> Hi Bob,
>
> I've had this problem before. The solution I went
> for
> was the following:
>
> 1) on the cd, i put a small file names
> "firstrun.yes"
> 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
> file
> "firstrun.bat" which will switch the read-only flag
> off.
>
> 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
> to
> read and execute the commands in "firstrun.bat" from
> a
> 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
> foolish
> 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
> be
> > set as "read-only" in
> > the new destination (presumably since the CD
> source
> > 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
> from
> > within a stack? My
> > stand-alone mainstack checks to see if its
> substacks
> > exist -- it would be
> > nice if when checking, it could change the
> attribute
> > 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
> >
>
http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! News - Today's headlines
> http://news.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
>
http://lists.runrev.com/mailman/listinfo/use-revolution
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
More information about the use-livecode
mailing list