Either (a) add the path to the registry; or (b) add the program to a location already in the path, eg to system32.
Setx Path "%path%;X:\Program Files\My little tool"
[Process]RegHiveLoad,Tmp_Default,%RegDefault%RegWrite,HKLM,0x2,Tmp_Default\Environment,Programs,Y:\ProgramsRegHiveUnLoad,Tmp_DefaultRegHiveLoad,Tmp_System,%RegSystem%RegWrite,HKLM,0x2,"Tmp_System\ControlSet001\Control\Session Manager\Environment",Programs,Y:\ProgramsRegHiveUnLoad,Tmp_System
I though of a command likeQuoteSetx Path "%path%;X:\Program Files\My little tool"which could be executed as Autorun or something similar... Is this feasible somehow?It should work for both RunfromRAM and RunfromCD apps.
Setx Path "%path%;%PE_Programs%\%ProgramFolder%"
[Interface]ScrollBox_RunFromWhere="Run from CD",1,4,4,9,148,21,"Run default","Run from RAM","Run from CD"[Process]Echo,"Processing %ScriptTitle%..."StrFormat,REPLACE,%ScrollBox_RunFromWhere%," ","",%runfrom%If,Not,%runfrom%,Equal,Rundefault,Call,VariableToMacro,%runfrom%,TrueTXTDelLine,%target_sys%\autorun.cmd,exitTXTAddLine,%target_sys%\autorun.cmd,"Setx #$pPath#$p #$q#$ppath#$p;%PE_Programs%\%ProgramFolder%#$q",AppendTXTAddLine,%target_sys%\autorun.cmd,exit,Append
However, it turned out, that executing setx.exe (automatically or later by me) has no effect.
... RunFromWhere ...TXTDelLine,%target_sys%\autorun.cmd,exitTXTAddLine,%target_sys%\autorun.cmd,"SetEnv -ua Path #$p%PE_Programs%\%ProgramFolder%#$q",AppendTXTAddLine,%target_sys%\autorun.cmd,"Path=#$pPath#$p;%PE_Programs%\%ProgramFolder%",AppendTXTAddLine,%target_sys%\autorun.cmd,exit,Append
It's that very issue I want to solve, the whole rest was okay and didn't need greater changes...