Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: NEED A REGEDIT VARIABLE FOR THE DRIVE LETTER THAT THE OS IS INSTALLED ONTO..??  (Read 2770 times)

0 Members and 1 Guest are viewing this topic.

gumbaz

    Topic Starter


    Intermediate

    IS THERE A VARIABLE I CAN USE WHEN I MAKE A REG FILE THAT SPECIFIES THE DRIVE LETTER THAT THE OS IS INSTALLED ONTO..

    SOMETHING LIKE THIS:

    Code: [Select]
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
    "SYSTEM"="%SYSTEMDRIVE%\\SYSTEM\\SYSTEM.EXE"

    BUT THE VARIABLE %SYSTEMDRIVE% REPRESENTS THE DRIVE LETTER THAT THE OS IS INSTALLED ONTO..
    IS THERE ANYTHING LIKE THIS THAT I CAN USE...??

    Spoiler



      Specialist

      Thanked: 50
    • Experience: Beginner
    • OS: Windows XP
    Why would you need this? What is the problem you are trying to solve?

    Whenever I watch TV and I see those poor starving kids all over the world, I can't help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff." - Mariah Carey, Pop Singer

    gumbaz

      Topic Starter


      Intermediate

      is there a way to do this or no,
      need to install on many PC, use a variable just in case the OS is installed on a different drive other than C:\

      contrex

      • Guest
      gumbaz, glad you found the caps lock key at last!


      gumbaz

        Topic Starter


        Intermediate

        sorry for caps, i tend to write all my batch files in caps, and forget to turn it off after.

        so is there a variable to do this or not..??

        contrex

        • Guest
        what, you mean a variable like %systemdrive% ?

        You surely know how to list all the system variables, why not do that on your own machine, and see if there is one that might be what you are looking for?




        gumbaz

          Topic Starter


          Intermediate

          I just manually entered in the reg entries from the regedit..
          I tried both   %SystemDrive%\batch.exe   and   %HOMEDRIVE%\batch.exe
          and they never startup the C:\batch.exe file when i log off and back on or Restart the PC..??
          the batch.exe files code is just
          Code: [Select]
          start calcand calc never opens so what am i doing wrong, or will those variables just not work in regedit..??



          contrex

          • Guest
          No, system variables don't work in Regedit.


          DeltaSlaya



            Apprentice
          • Google
            You could write and run the regedit file from batch using the %systemdrive% variable though.

            >>"file.reg" echo "system"="%systemdrive%\blahblahvirustostart"
            System specs:
            Intel Core 2 Duo E6600 (up to 3.3 stock V and air)
            ASUS Striker Extreme
            XFX 8600GT XXX Edition
            2x 1gB Corsair XMS2 DDR2-800
            Seagate Barracuda 320gB SATA
            Raidmax Ninja 918 (520W ATXV2.0 PSU)
            -

            contrex

            • Guest
            You could write and run the regedit file from batch using the %systemdrive% variable though.

            >>"file.reg" echo "system"="%systemdrive%\blahblahvirustostart"

            Great minds think alike, DS...


            DeltaSlaya



              Apprentice
            • Google
              I was just joking, noone was supposed to notice that lol. ;D
              System specs:
              Intel Core 2 Duo E6600 (up to 3.3 stock V and air)
              ASUS Striker Extreme
              XFX 8600GT XXX Edition
              2x 1gB Corsair XMS2 DDR2-800
              Seagate Barracuda 320gB SATA
              Raidmax Ninja 918 (520W ATXV2.0 PSU)
              -

              contrex

              • Guest
              I was just joking, noone was supposed to notice that lol. ;D

              I wasn't. Files that alter the registry are curious things to write for a hobby, aren't they?