Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2005
    Posts
    5

    Huh? How can I change a folder's Attributes after setup?

    I want to change a folder's(in my setup path) Attribute to "hidden",but I can't find a function like "SetAttributes" in Folder's operation.

  2. #2
    SUF6NEWBIE Guest
    Hi

    this may help.. at a command prompt type: attrib /?

    this will bring up the available command options for a target
    folder or tree or files.. /D relates to folders
    you may need to try some of the syntax to get it working.

    One thing to remember is if the Operating system user setting
    is to 'show hidden files and folders' ..hiding a folder and or files
    will basically achieve nothing...

    HTH

  3. #3
    SUF6NEWBIE Guest
    below link gives you an example showing just one way to
    create a batch file on the fly to use with the File.Run action


    http://www.indigorose.com/forums/showthread.php?t=9205

    may be usefull..

  4. #4
    Join Date
    Mar 2005
    Posts
    5
    I do know this,BUT I want to know how I can achieve the function in SF7.
    My work to finish is very simple only like this:
    /****here I want to change folder's attrib****/
    strAppFolder = SessionVar.Expand("%AppFolder%");
    Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt");
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "Driver", strAppFolder.."\\db\\dbeng\\dbodbc8.dll", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "UID", "dba", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "PWD", "sql", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "DatabaseFile", strAppFolder.."\\db\\czxt.db", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "EngineName", "czxt", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "AutoStop", "Yes", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "Integrated", "No", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources", "czxt", "Adaptive Server Anywhere 8.0", REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBC.INI\\czxt", "Start", strAppFolder.."\\db\\dbeng\\dbeng8.exe -d -c1024 -Q", REG_SZ);

  5. #5
    Join Date
    Mar 2005
    Posts
    5
    Tks,I'll try it!

  6. #6
    SUF6NEWBIE Guest
    setting the folder below to your expanded strAppFolder

    sample batch file use textfilewritefromstring action then run it.
    sets the users temp dir to hidden..

    @echo off
    attrib +H /S /D %Temp%
    exit

    in this case %Temp% is an operating system assigned 'envronment variable'
    and not a LUA or Session variable..
    Last edited by SUF6NEWBIE; 03-03-2005 at 06:42 PM.

  7. #7
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Alternatively, to stay with SUF70:

    File.SetAttributes(sFolder, { Hidden = true });

  8. #8
    Join Date
    Mar 2005
    Posts
    5
    It veritably worked!
    Thank yoy csd214.

Similar Threads

  1. New Features in Setup Factory 7.0
    By Ted Sullivan in forum Setup Factory 7.0
    Replies: 0
    Last Post: 08-12-2004, 12:13 PM
  2. HOWTO: Distribute an AutoPlay Application with Setup Factory 6.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-25-2002, 02:33 PM
  3. INFO: Finding Shell Folders in the Registry
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-10-2002, 03:52 PM
  4. FAQ: Setup Factory 5.0 Frequently Asked Questions
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-10-2002, 09:50 AM
  5. HOWTO: Build a Setup from the Command Line
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-08-2002, 01:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts