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

Author Topic: Find path in the Win Registery  (Read 12240 times)

0 Members and 1 Guest are viewing this topic.

Ryder17z

    Topic Starter


    Intermediate
  • Thanked: 2
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: Find path in the Win Registery
« Reply #15 on: April 18, 2009, 11:14:38 AM »
Yes, but if we look at your code:
Code: [Select]
@echo off & setlocal & set sim=

set q="HKLM\software\maxis\the sims" /v installpath
for /f "skip=4 tokens=2*" %%a in ('reg query %q%') do set sim=%%b

if defined sim echo copy *.iff "%sim%"
Nothing tells it to use "The Sims\GameData\Userobjects\filename\filename.iff"

When I read your code, something tells me the path "The Sims\filename\filename.iff" would be used, which I don't get why isn't

I mean, Where does it get "GameData\UserObjects\" from?
It's not even in the script, or defined in the win registery
The cake is a lie...

Reno



    Hopeful
  • Thanked: 32
    Re: Find path in the Win Registery
    « Reply #16 on: April 18, 2009, 11:49:31 AM »
    Yes, but if we look at your code:Nothing tells it to use "The Sims\GameData\Userobjects\filename\filename.iff"

    I mean, Where does it get "GameData\UserObjects\" from?
    It's not even in the script, or defined in the win registery
    how would i know where it get the value, why dont you tell me. i am not the one who makes the sim. and i even never play the sims.
    i only post code based on your description, assuming %installpath%\gamedata\userobjects\filename\ is the default folder for iff files. ( see below )
    It copies "filename.iff" to "The Sims\GameData\Userobjects\filename\finename.iff" - which is the correct folder

    Ryder17z

      Topic Starter


      Intermediate
    • Thanked: 2
      • Yes
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    Re: Find path in the Win Registery
    « Reply #17 on: April 18, 2009, 12:25:43 PM »
    How can I tell you if I don't know the answear? :P


           The path in the script is different than the actual path used
                                     /\                                            /\
                                      |                                             |
                                      |                                             |
                            "The Sims\filename.iff"                           |
                                                                                    ||
                                                                                    ||
                                      "The Sims\GameData\Userobjects\filename\filename.iff"


    I feel confused ???
    The cake is a lie...

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Find path in the Win Registery
    « Reply #18 on: April 19, 2009, 11:16:11 AM »
    change the path in the script to be the actual path used.  ::)
    I was trying to dereference Null Pointers before it was cool.

    Ryder17z

      Topic Starter


      Intermediate
    • Thanked: 2
      • Yes
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    Re: Find path in the Win Registery
    « Reply #19 on: April 24, 2009, 06:29:11 AM »
    No need to do since it works already, but it works like magic, nobody knows how, they just know it works ::)
    The cake is a lie...

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Find path in the Win Registery
    « Reply #20 on: April 24, 2009, 08:56:09 AM »
    Code: [Select]
    set q="HKLM\software\maxis\the sims" /v installpath


    this takes it from the registry.
    I was trying to dereference Null Pointers before it was cool.