topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 12:36 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE - IDEA: modify system path (System Path Commander)  (Read 38149 times)

mtp

  • Participant
  • Joined in 2005
  • *
  • Posts: 31
    • View Profile
    • freewarewiki.de
    • Donate to Member
an app that adds a specified folder to windows path so it can be run from anywhere .. maybe a commandlineapp like:
add2path.exe "c:\program files\dydlo\"
or even add the function to the explorerrightclickmenu so that you can simply click on a icon to add the path of the app!
freewarewiki.de .. though it's not a wiki ...
« Last Edit: May 21, 2005, 07:29 PM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #1 on: May 03, 2005, 08:48 AM »
i happen to think a nice interactive tool to help modify the environment path in a safe way (keeping backup copies of all past settings), is a FANTASTIC little snack idea.
  if someone doesn't code this by the next coding snack weekend i will do it.

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #2 on: May 08, 2005, 01:45 AM »
an app that adds a specified folder to windows path so it can be run from anywhere .. maybe a commandlineapp like:
add2path.exe "c:\program files\dydlo\"
or even add the function to the explorerrightclickmenu so that you can simply click on a icon to add the path of the app!

You can do this easily, yourself, without a program.  (More accurately, without a compiled program.)  Just add the program name(s) as a subkey to the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

For example, Insecure Explorer is represented with the following key and values:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE
(Default) = C:\Program Files\Internet Explorer\iexplore.exe
Path = C:\Program Files\Internet Explorer;

This can be done with a batch script and a command line util like NirCmd (to create the applicable registry values and key).  Adding a context menu item is easy, too.

If I had time, I'd put together the script to do it.  But I don't want to make promises I can't keep.
« Next Edit: Tomorrow at 12:13:47 AM by Scott »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #3 on: May 08, 2005, 01:57 AM »
let me explain why i htink this would be a good snack.

my windows xp environment path is too long.

thank you bill gates for putting much too short limits on it. the madness never ends.

so i'm constantly having to watch it and remove stuff and worry about removing something i might later need.

so having a nice safe way to add stuff, disable stuff, and always making sure never to lose anything permanently, would be good even for me who is comfortable changing such stuff manually.

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #4 on: May 08, 2005, 03:29 AM »
Your %path% is over 8,191 chars long?

http://support.micro...scid=kb;en-us;830473

AFAIK, "App Paths" has no limit, so you'd never have to remove and re-add a program.
« Next Edit: Tomorrow at 12:13:47 AM by Scott »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #5 on: May 08, 2005, 07:26 AM »
8000 dream on..

the limit seems to choke out for me around 1000.

not sure what to make of msdn saying 2047/8000...

maybe i'll experiment later and see exactly where the trouble begins..

mtp

  • Participant
  • Joined in 2005
  • *
  • Posts: 31
    • View Profile
    • freewarewiki.de
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #6 on: May 09, 2005, 05:07 AM »
call me dumb .. cause i am! .. all i wanted was to add a path like "c:\program files\mplayer" to windows path so i could run mplayer from anywhere through cmd.exe .. and now i "discovered" the command "path" .. a bit of experimenting with it and then i got it .. i added the path by simply typing:
path "c:\program files\mplayer\";%path%
thats it .. thanks to autocompletion that was not so much writing ..
god damnit ...
freewarewiki.de .. though it's not a wiki ...

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #7 on: May 09, 2005, 02:16 PM »
Yeah, that will work, but it's clunky and kludgy, and you'll eventually run into trouble, as mouser points out above.  I still recommend using the App Paths registry key.
« Next Edit: Tomorrow at 12:13:47 AM by Scott »

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #8 on: May 09, 2005, 05:16 PM »
This should fit the bill:

AppPathZ (freeware)

On SnapFiles.com: http://www.snapfiles...om/get/apppathz.html
Home Page: http://izoxzone.150m...uct/app/ap/index.htm

I have not tried it, but a quick glance seems to indicate that it's what you're after, mtp.

Keep in mind that adding values to the aforementioned App Paths registry value will affect all users--in case that matters to you.  (I can't see why it would, but...)  The %path% environment variable has both a user- and machine-level component.
« Next Edit: Tomorrow at 12:13:47 AM by Scott »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #9 on: May 10, 2005, 05:21 PM »
chr has send me a beta of an app to do what i had in mind, let you easily check and uncheck entries, reorder entries, add entries, etc.  all in a nice gui with a good backup log.

really excellent.. when he finishes it i will add it to coding snacks download page.

chr15

  • Site Programmer
  • Developer
  • Joined in 2005
  • ***
  • Posts: 30
  • Everything in life is a gamble
    • View Profile
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #10 on: May 15, 2005, 11:31 PM »
Hi,

I thought I would create a little GUI app to do this, the idea was fairly simple to start with,
but it has since been extended many times via the requests from mouser

I cannot thank mouser enough for the name of the app, icon, and especially the testing and ideas :) , but the extra work, hmm maybe ;).

But as you will see soon, I hope you think it is worth it, at least I can say I definitely will use this app.

Chr15

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #11 on: May 15, 2005, 11:46 PM »
i have to say i love what chr has done, and it's exactly the app i've been wanting.
it should be up on the coding snacks download page this week.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: commandline to add specified directory to "windows path"
« Reply #12 on: May 20, 2005, 02:26 PM »
"System Path Commander" has now been added to the Coding Snacks Download Page:
https://www.donation...dingSnacks/index.php

you will find a screenshot and a readme there as well.

This program was far beyond the original request, and went beyond what i had hoped even.  It's a fantastic tool for power users who want to modify their system path.  one of my favorite snacks so far.  It's not going to be of use to everyone, but those who mess with their system path will love it.

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #13 on: May 22, 2005, 05:13 PM »
Nice job on System Path Commander.  I tried AppPathZ (as mentioned above), and didn't like it at all.  So I thought I'd mention another freeware alternative for editing the "App Paths" registry key: AppPaths.
« Next Edit: Tomorrow at 12:13:47 AM by Scott »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #14 on: May 22, 2005, 06:16 PM »
one thing that may need clarification..


both of the other appPath programs are designed for editing a windows registry key that related to paths to specific programs.

System Path Commander does something completely different.
It helps you manage the global system path, which is used when the system searches for programs that are executed.

For example if you have perl or a c++ compiler installed, their paths typically get added to the global system path, so that the compiler tools and interpreters can be found when invoking them.

I think it's also importan to note that SPC turned out to be a significant amount of work.
On the surface its a very simple idea, after all you are just editing a list of directories.
However, if you use the program you will see that some serious work went into making it safe (it keeps detailed logs, is careful about not saving when not asked, etc.), and most importantly, it has features for letting you temporarily disable entries by removing them from the registry key for environment path, but keeping a careful record of them, and their proper order, etc.  the program also has a bunch of cool extra features, like indicating new keys, letting you drag and drop to change order, converting long paths to short versions to save space, etc.

it's a unique program as far as i know.

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #15 on: May 22, 2005, 07:17 PM »
I personally did know the difference between the App Paths key and the %path% env var...  Just thought I'd mention those utils in case someone found them applicable to their problem.  Sorry if it didn't fit here.
« Next Edit: Tomorrow at 12:13:47 AM by Scott »

Dragonrider

  • Columnist
  • Joined in 2005
  • ***
  • Posts: 40
    • View Profile
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #16 on: May 23, 2005, 12:32 AM »
I have a problem / pet peeve with System Path Commander.  It's not with the handling of paths though.  It's the UI.

My pet peeve is that alot of coders Ass-U-Me that everyone out there has a light background & dark characters for their desktop default colors.  This is not the truth for those of us who are visually impaired & need the high contrast of light colored characters on a dark background.  System Path Commander Ass-U-Mes this.  It is a totally useless program for me because the white characters I use are unreadable on the light blue background.

Flame Off

Is it possible to change the interface to use system default colors?  Or at least to let me define what colors are going to be used in the interface.

Thanks in advance.

Regards
Dragonrider

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #17 on: May 23, 2005, 01:46 AM »
ill pass this along to chr, i'm sure he will change it (or add option to change it).
personally i love the blue background..

it seems this touched a raw nerve with you :) - just don't get mad at chr, im sure he didnt realize that there would be issues for visually impaired..

so here's a question for you, in spc, it uses 2 alternative colorings to indicate that an entry is either invalid (red) or changed (gree),
are those also unreadable, and if so, what would you recommend from a visually imparied standpoint, regarding colors..
« Last Edit: May 23, 2005, 01:50 AM by mouser »

chr15

  • Site Programmer
  • Developer
  • Joined in 2005
  • ***
  • Posts: 30
  • Everything in life is a gamble
    • View Profile
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #18 on: May 23, 2005, 01:51 AM »
Hi,

Thanks for the feedback.

As KC indicated this is a valid point for users with different visual needs, and as such there will be v1.18 with Colour configuration, I will implement this when I get home tonight, and hopefully it will be on line in 12hrs or so.

Chr15

chr15

  • Site Programmer
  • Developer
  • Joined in 2005
  • ***
  • Posts: 30
  • Everything in life is a gamble
    • View Profile
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #19 on: May 23, 2005, 04:23 PM »
Hi,

v1.18 of spc has been uploaded to mouser, now you just have to wait until, mouser has processed it.

You can now customize the colours to your personal taste or needs :)

Chr15

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #20 on: May 23, 2005, 08:20 PM »
coding snacks downlload page has been updated.

Dragonrider

  • Columnist
  • Joined in 2005
  • ***
  • Posts: 40
    • View Profile
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #21 on: May 24, 2005, 12:35 AM »
Hi Mouser & Chr15:
Thank you VERY much for the quick response & sensitivity to others problems.

> =========== Mouser Wrote: ===========
> it seems this touched a raw nerve with you  :) - just don't get mad at chr, im sure he didnt realize that there
> would be issues for visually impaired..

Not a raw nerve per se, but I will say a sensitive 1.  I wasn't mad, just frustrated.  I wanted to use this excellent program & couldn't.  There are so many really excellent programs out there that a person who can't see well (or at all) can't use due to an oversight by the designer.  When a person doesn't have a particular problem, it is very easy to just not see the trees for the forest (not forest for the trees).  :)

> so here's a question for you, in spc, it uses 2 alternative colorings to indicate that an entry is either invalid
> (red) or changed (gree), are those also unreadable, and if so, what would you recommend from a visually
> imparied standpoint, regarding colors..

For my eyes, the higher the contrast between font color & background color the better.  The way I have set up the program for me is:

Normal:               Font = clWhite
                Background = clBlack
Updated:             Font = clYellow
                Background = clNavy
Invalid:                Font = clWhite
                Background = clMaroon

This may not (& doesn't for my son who has similar vision problems) work for someone else, but is extremely effective for me.

But my post wasn't about me.  It was about the fact that the coloring couldn't be changed to take into account these type of problems.

Stepping down from soapbox...

Thanks again for not only the quick changes chr15, but a really nicely done program as well.

Regards
Dragonrider


chr15

  • Site Programmer
  • Developer
  • Joined in 2005
  • ***
  • Posts: 30
  • Everything in life is a gamble
    • View Profile
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #22 on: May 24, 2005, 02:02 AM »
np KC,

Have fun with it :)

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #23 on: June 29, 2005, 01:04 AM »
 
Why does System Path Commander 1.18 change the data type of the Path value from its default of REG_EXPAND_SZ, to REG_SZ?  Windows XP always changes it back to the REG_EXPAND_SZ type, when the System Properties applet is used to edit the Path.
 
« Next Edit: Tomorrow at 12:13:47 AM by Scott »

Scott

  • Resident Googler
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 378
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE - IDEA: modify system path (System Path Commander)
« Reply #24 on: June 29, 2005, 06:45 AM »
OK, I found out the difference between REG_SZ and REG_EXPAND_SZ, and it's an important one, with very serious applications.  The former does not allow variables to be expanded.  Variable expansion is the whole purpose of REG_EXPAND_SZ.

I also found out that the implications of using the wrong data type can be serious.  I just rebooted after using SPC--without making any actual changes to the path itself--and had serious problems afterward.  (To be clear, what I did was uncheck one of the paths shown in SPC, save the changes, then recheck the path, and save the changes again.  Thus, the path didn't change, but SPC's change was in effect.)  The %SystemRoot% variable wasn't expanded after my reboot, thus instead of being "C:\WINDOWS", it was seen as literally "%SystemRoot%".

Running the command "echo %path%" from a command window shows this.  What I see, after rebooting with a REG_SZ value in place, is:

C:\Program Files\Console;C:\Program Files\UltraEdit;C:\Program Files\Undelete;%SystemRoot%;%SystemRoot%\system32;%SystemRoot%\System32\Wbem;D:\Data\Batch Files

What I should see, and what appears when REG_EXPAND_SZ is used, is:

C:\Program Files\Console;C:\Program Files\UltraEdit;C:\Program Files\Undelete;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;D:\Data\Batch Files

The problems I had included applications that couldn't find supporting files in C:\WINDOWS\system32, and if I let my system lock, it won't let me back in.  I can't even run CHKDSK.EXE normally.  Is this one of those "random features" you talk about?  :o

Sorry I didn't test SPC earlier.  This was my first time using it.
« Next Edit: Tomorrow at 12:13:47 AM by Scott »
« Last Edit: June 29, 2005, 06:54 AM by Scott »