Drag & drop install & read-only status

Klaus Major k_major at os.surf2000.de
Sat Sep 14 07:18:01 CDT 2002


Hi Bob,

> 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

I am not sure, but i think this is one of the wonderful features
Bill gave to us without that we asked for it...

> 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.

This is an excerpt from a little installer i created with MC.
I think you get the picture...

...
   put (specialfolderpath("system") & "/" & "KPCPREF/") into dosprefs
   replace "/" with "\" in dosprefs
   ## we can do lots of win-stuff with "get shell..."
   ## but all this has to be in win-format...

   set the hideconsolewindows to true
   ## so we don't see the dos-console,
   ## which doesn't look not too professional ;-)

   get shell("attrib -r" && dosprefs & "kpcinstall.inf")
   ## this removes the "read only" attribute
   ## use "+r" to add it to a fil...


There is an attribute to remove/add a readonly to a complete folder
including subfolders, which i do not have at hand right now. ..

I can supply it on monday, when i am back at work.
But maybe some other revolutionist can supply it earlier ;-)

> Thanks in advance
>
> Bob

Regards


Klaus Major
k_major at os.surf2000.de




More information about the use-livecode mailing list