FreeDLL: GetFolderLocations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5552

    #16
    ok, you wont need the dll to do that, the quick launch is set at the same path on every system, the only variable factor is the username, so its a case of getting all the users on the pc and build the path that way

    Code:
    -- get user
    sUser = System.GetLANInfo().User;
    -- get os
    sOS = System.GetOSName();
    -- get windows drive
    sDrive = String.SplitPath(_WindowsFolder).Drive;
    
    if sOS == "Windows XP" then
    	-- for vista
    	sQuickLaunch=sDrive.."\\Users\\"..sUser.."\\AppData\\Roaming\\Microsoft\\Internet Explorer\\Quick Launch"
    else
    	-- for xp,2k,98,95
    	sQuickLaunch=sDrive.."\\Documents and Settings\\"..sUser.."\\Application Data\\Microsoft\\Internet Explorer\\Quick Launch"
    end
    
    -- Test
    Dialog.Message("Notice", sQuickLaunch);
    the above code is good for getting the QL folder on a per user basis, now you just need to get all the users on the system and repeat the process, not sure how its done right now, i'll look into it
    Embrace change in your life, you never know, it could all work out for the best

    Comment

    • qwerty
      Forum Member
      • Oct 2006
      • 345

      #17
      ok, i was compiling a reply, showing what i thought would work for current user...

      Code:
      QL_Location = (Shell.GetFolder(SHF_APPLICATIONDATA).. "\\Microsoft\\Internet Explorer\\Quick Launch");
      when i realised ive got a bug in my theory.... the "roaming" folder on vista will trip me up... damit.

      thanks for the example above, looks like i had some duff gen on the true file path for vista.

      back to the drawing board !

      Comment

      • RizlaUK
        Indigo Rose Customer
        • May 2006
        • 5552

        #18
        hummm, i dont understand, the code you posted should work,

        SHF_APPLICATIONDATA on vista returns "C:\Users\User\AppData\Roaming" and "C:\Documents and Settings\User\Application Data" on xp, so in both cases it points to the correct folder

        your code is better than mine
        Embrace change in your life, you never know, it could all work out for the best

        Comment

        • qwerty
          Forum Member
          • Oct 2006
          • 345

          #19
          errrr....

          if sOS == "Windows XP" then
          -- for vista


          i'm gettting the feeling that should be
          if sOS ~= "Windows XP" then

          Comment

          • qwerty
            Forum Member
            • Oct 2006
            • 345

            #20
            Originally posted by RizlaUK View Post
            hummm, i dont understand, the code you posted should work,

            SHF_APPLICATIONDATA on vista returns "C:\Users\User\AppData\Roaming" and "C:\Documents and Settings\User\Application Data" on xp, so in both cases it points to the correct folder

            your code is better than mine

            ahhhh ... i was under the impression the SHF_APPLICATIONDATA would return upto and including the AppData folder on vista, but stop short of the Roaming folder, thus cause me a problem...... but i dont have (and dont want) a vista system ! ... so i will trust your result there and say thank you for testing it for me

            ok, just the All Users option to look at now then, time to hit the search function and see what i can find on returning a table or list of the users

            Comment

            • RizlaUK
              Indigo Rose Customer
              • May 2006
              • 5552

              #21
              if sOS == "Windows XP" then
              DoH!, i really should check demo code, lol

              heres a C++/.Net example useing WMI


              but i cant find anything i can use in AMS yet.
              Embrace change in your life, you never know, it could all work out for the best

              Comment

              • qwerty
                Forum Member
                • Oct 2006
                • 345

                #22
                yeah it's getting late here and the all user thing is giving me a headache, when i start thinking about the variables involved, for example the options i need to give in the dialog box of "include quick launch item" ... "apply to all users or current only" ..... then i have to remember pre Win2000 doesnt have the multi account options, so i need to make sure i dont try applying that section of the code, it might be easier to stick to single user account for now, and deal with the other aspect of what i need the quick launch item to do... and come back to the all users option later, thx for the help :yes


                anyway, time for sleep i think

                Comment

                • shinway
                  Forum Member
                  • Nov 2008
                  • 2

                  #23
                  OK so I'm trying to get a folder to install at

                  26 C:\Users\Username\AppData\Roaming\
                  26 C:\Documents And Settings\Username\Application Data\

                  for vista and xp


                  what is the steps to doing this, what screen do you enter this into,


                  does this get entered into session variables, or folder reference properties, or is it added in under actions, hmm not sure of this method, I'm very new to setup factory and would really like to understand how to make my folder install under those directories.

                  Comment

                  • qwerty
                    Forum Member
                    • Oct 2006
                    • 345

                    #24
                    Setup Factory ?

                    no idea, this thread is in the AutoPlay Media Studio section, i have no idea on Setup Factory scripting, but i'm sure someone will be able to help

                    Comment

                    • shinway
                      Forum Member
                      • Nov 2008
                      • 2

                      #25
                      hmm think Ive figured it out, was actually very simple and just used Session Variables lool and yea used the search function and didn't noticed it wasn't setup factory... sorry

                      Comment

                      • qwerty
                        Forum Member
                        • Oct 2006
                        • 345

                        #26
                        Originally posted by shinway View Post
                        hmm think Ive figured it out, was actually very simple and just used Session Variables lool and yea used the search function and didn't noticed it wasn't setup factory... sorry
                        LOL, i just did the same thing this morning in a Setup Fctory thread, must have searched from the wrong little box

                        glad your sorted, now if only i could do it from AMS :lol

                        Comment

                        • qwerty
                          Forum Member
                          • Oct 2006
                          • 345

                          #27
                          ok, so....

                          from a cmd window, "net user" will return a list of all accounts registered to that PC.

                          now i', wondering if it's possible to export that list to a text file, and utilise it some how. However, i have discovered another possible hurdle, if a user account is passworded, then i dont think i will be able to inject into the quick launch folder.

                          i did find a way to add it into the "Default User" account, but this will only add my required item at account creation stage and not post creation ... damit !

                          this is getting awkward LOL... i'm sure windows does it somehow with the internet explorer link, as this can be added on the fly like i am trying to do!
                          Last edited by qwerty; 11-02-2008, 04:14 AM.

                          Comment

                          • rexzooly
                            No longer a forum member
                            • Jul 2007
                            • 1512

                            #28
                            is there a link to this dll anymore?

                            Comment

                            • qwerty
                              Forum Member
                              • Oct 2006
                              • 345

                              #29
                              yeah someone reposted it in this thread as an example



                              as far as i know that is the same one


                              BTW.... i've also had an app using it tested it on a Vista 64 bit machine and for me getting the cookies folder (33) worked fine

                              Comment

                              Working...
                              X