Reply to Thread

Post a reply to the thread: Folder Questions

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 10-17-2011, 09:30 AM
    linder

    Re: Folder Questions

    On UAC-aware systems, the AppData looks like this:

    C:\Users\arun.shah\AppData\Roaming

    Your code would retrieve "C:\Users\arun.shah\AppData"

    In other words, your idea might work on XP but not on modern operating systems.

    Hope this helps.

    Friedrich
  • 10-17-2011, 09:05 AM
    Arun2

    Re: Folder Questions

    Thanks for your prompt reply! It does help.

    So, since I do not have acess to "Extract Root" (since I am using 7.1), I tried
    getting the parent folder by using :

    FULLFOLDERPATH=C:\Documents And Settings\Administrator

    Set Variable %LASTFOLDERPATH% and %REST% to FUNCTION:Split Source String at Last Occurrence of Search String(%FULLFOLDERPATH%, "\")

    This returns:

    LASTFOLDERPATH=C:\Documents And Settings

    --

    Is that a good strategy? Do you anticipate any problems with this?

    Thanks,
    -Arun
  • 10-17-2011, 08:29 AM
    linder

    Re: Folder Questions

    Hello,

    Support for SetupBuilder 7.1 came to an end last year on July 26, 2010, so my answers are based on the latest SetupBuilder 7.5.

    Answer 1:

    You can use Handle String Operation (Extract Root Folder) to retrieve the root. For example:

    Set Variable %TEST% to FUNCTION:Get Special Folder("CSIDL_APPDATA")
    Set Variable %ROOT% to FUNCTION:Extract Root Folder(%TEST%)

    Question 2:

    The "Handle File Listing" function lets you retrieve a list of files (but not folders).

    Does this help?

    Friedrich
  • 10-17-2011, 08:04 AM
    Arun2

    Folder Questions

    Question 1: I am using Get Special Folder (CSIDL_APPDATA ) which returns me ( C:\Documents and Settings\[my login name]\ )

    My question is how do I get the parent folder's full path (in this case answer should be (C:\Documents and Settings)?


    Question 2: I am using Setupbuilder 7.1. Will "Handle File Listing" give me a list of files and folders?

    I specifically want to traverse through all folders in a particular directory.

    Would appreciate any help on this, Thanks.

Posting Permissions

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