Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Setting Windows 2000 Enviromental Variables automatically

Hello!

I am building a simple installation program and to be more specific for Ant (tool for Java).Because I want to install Ant to many computers I want that installation program that I am develiping to add some enviromental variables to the system.Ant for Java in order to work needs from the user to add to the system some specific path statements.Well somehow I dont want the user to do that manually but the installatrion program itself.
Using IntCtrl and looking my systems reaction when I was adding these PATH statements manually,I saw that the windows 2000 do not store that statements to a file but automatically stores that info to the registry to specific keys and values...so there are 2 keys that are responsible for such information and they have a variable called PATH and the system stores there all the PATH statements,one after another.
Well I have tried with various install makers to make an install program but none of them are providing me the option to edit in a way the registry and add the PATH statements to the appropriate keys ...The only solution I have find is some wrapper finctions in Visual Basic but for now I cant afford to do my own instalation program from the scratch ..does anyone have an idea how I can do that using an installation maker or something like that?

Thank you!


Comments

  • Stoic JokerStoic Joker Posts: 84Member
    Greetings
    Try using the Autoparse function built into Win2k, Any variable put into the Autoexec.bat is automatically transfered to the Enviromentals list (for that user). You can check the registry to see if this is enabled;

    The value HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWinlogonParseAutoexec should be set to 1 for autoexec.bat to be parsed, or 0 for autoexec.bat not to be parsed.

    It Will require a reboot for the install, But it should work

    Hope that's Helpfull
    Stoic Joker

    : Hello!
    :
    : I am building a simple installation program and to be more specific for Ant (tool for Java).Because I want to install Ant to many computers I want that installation program that I am develiping to add some enviromental variables to the system.Ant for Java in order to work needs from the user to add to the system some specific path statements.Well somehow I dont want the user to do that manually but the installatrion program itself.
    : Using IntCtrl and looking my systems reaction when I was adding these PATH statements manually,I saw that the windows 2000 do not store that statements to a file but automatically stores that info to the registry to specific keys and values...so there are 2 keys that are responsible for such information and they have a variable called PATH and the system stores there all the PATH statements,one after another.
    : Well I have tried with various install makers to make an install program but none of them are providing me the option to edit in a way the registry and add the PATH statements to the appropriate keys ...The only solution I have find is some wrapper finctions in Visual Basic but for now I cant afford to do my own instalation program from the scratch ..does anyone have an idea how I can do that using an installation maker or something like that?
    :
    : Thank you!
    :
    :


  • papopapo Posts: 2Member
    Thank you very much Stoic Jocker..yes it works just fine.thank god because I did not want to hardcode into WINAPI32 ..anyway my expereince is very limited..now I just have to edit auto exec.bat and add the statements..fine for me!

    Thanks again







    : Greetings
    : Try using the Autoparse function built into Win2k, Any variable put into the Autoexec.bat is automatically transfered to the Enviromentals list (for that user). You can check the registry to see if this is enabled;
    :
    : The value HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWinlogonParseAutoexec should be set to 1 for autoexec.bat to be parsed, or 0 for autoexec.bat not to be parsed.
    :
    : It Will require a reboot for the install, But it should work
    :
    : Hope that's Helpfull
    : Stoic Joker
    :
    : : Hello!
    : :
    : : I am building a simple installation program and to be more specific for Ant (tool for Java).Because I want to install Ant to many computers I want that installation program that I am develiping to add some enviromental variables to the system.Ant for Java in order to work needs from the user to add to the system some specific path statements.Well somehow I dont want the user to do that manually but the installatrion program itself.
    : : Using IntCtrl and looking my systems reaction when I was adding these PATH statements manually,I saw that the windows 2000 do not store that statements to a file but automatically stores that info to the registry to specific keys and values...so there are 2 keys that are responsible for such information and they have a variable called PATH and the system stores there all the PATH statements,one after another.
    : : Well I have tried with various install makers to make an install program but none of them are providing me the option to edit in a way the registry and add the PATH statements to the appropriate keys ...The only solution I have find is some wrapper finctions in Visual Basic but for now I cant afford to do my own instalation program from the scratch ..does anyone have an idea how I can do that using an installation maker or something like that?
    : :
    : : Thank you!
    : :
    : :
    :
    :


Sign In or Register to comment.