Announcement

Collapse
No announcement yet.

Help for %SystemDrive% Dir

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help for %SystemDrive% Dir

    Hi, the answer is very simple, maybe, but I'm new.
    How to obtain the% SystemDrive% location.

    I coded this but is it okay?

    SystemDrive = String.Left(_WindowsFolder, 3)
    if String.Right(SystemDrive, 2) == ":"..String.Char(92) then
    Dialog.Message("", SystemDrive)
    end

    message result: C:\


  • #2
    That is one way or

    Code:
    SystemDrive = _WindowsFolder
    
    --or use SystemDrive = Shell.GetFolder(SHF_PROGRAMFILES);
    
    sPath = String.SplitPath(SystemDrive)
    sDrive = sPath.Drive.."\\"
    Results in C:\

    Comment


    • #3
      Code:
      os.getenv("SystemDrive")
      Ulrich

      Comment


      • #4
        That was what I was looking for. Thanks

        Comment

        Working...
        X