As part of a network engineering team, one of the common problems we have is lack of access to CLI tools when we are diagnosing various windows machines
- PortQry.exe (not default install on Win2003)
- psexec (not default install on Windows)
- plink.exe (not default install on Windows)
- pscp.exe (not default install on Windows)
- WinMTR (not default install on Windows)
- TcpView.exe (not default install on Windows)
- ProcessExplorer (not default install on Windows)
- Python
- etc...
While the perfect world is to get the server and desktop teams to install these utilities on all systems, the real world is that it won't happen for all machines. My idea: give team members a read-onlyNote 1 USB that they can insert into machines so they can diagnose issues, even if that windows machine can't mount a corporate network share.
However, this plan depends on yet another activity... when the USB is plugged into a windows machine, I need whatever drive letter is assigned to somehow be put into the Windows %PATH%
(hopefully automatically). How can I do this from resources installed on the USB itself?
Note 1: Read-only to avoid the obvious issues with security and virus infections
You can use the setx command to set the PATH that will be given to newly opened shells. Combine that with an autorun batch file and you should be in good shape. You will have to reverse the procedure before ejecting the drive though.
As an alternative, have a cmdln.bat on the drive that opens a shell with environment configured how you would like it. That way there are no changes to the target machine.