what
    MisterX 
    b.xavier at internet.lu
       
    Thu May 26 11:34:06 EDT 2005
    
    
  
try this
(looks complicated but it's not
3 lines suffice but it might fail... 
Not professional!
-- 
on SetUpNewWin32ApplicationFolder ApplicationName
  if applicationName is empty or badFileCharacters(ApplicationName) or
whathaveyoutest() 
  then return "SetUpNewWin32ApplicationFolder: Bad parameter" &CR& \
"Param:" ApplicationName
  put the hideconsolewindows into oldHCW
  put the directory into olddir
  try
    set the hideconsolewindows to true
    set the directory to "c:/"
    get shell("set")
    filter it with "ProgramFiles*"
    set the itemdelimiter to "="
    get item 2 of it 
    set the directory to it
    create folder ApplicationName
    get the result 
    -- politely return the environment to the user as it was
    set the hideconsolewindows to oldHCW
    set the directory to olddir
  catch anError
    -- i use a custom debugger call TAOODebug
    -- which outputs the error to a log window
    -- but here's the normal way of debugging
    -- errors and getting the right info
    return "Error:" && SetUpNewWin32ApplicationFolder &CR& \
           "ErrorID:"& anError &CR& \
           "Params:" && the params
  finally
    if it is not empty then return it -- uh error
  end try
end SetUpNewWin32ApplicationFolder 
not tested but should work, im pastin it in TAOO's NT Lib stack ;)
cheers
Xavier
http://monsieurx.com
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Christian Langers
> Sent: Thursday, May 26, 2005 16:00
> To: use-revolution use Revolution
> Subject: what
> 
> Hello,
> 
> I'm a bit confused by the various win systems when I want to 
> create a folder in the "Program Files"- Folder of Windows...
> 
> What do I have  to respect when I want to create my folder in 
> that path  independently of the win version ?
> 
> 
> Thanks for any help,
> 
> Christian
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
    
    
More information about the use-livecode
mailing list