Add a comment. Active Oldest Votes. Nae I just needed this badly myself and, for that particular case as parameter , it's much more shorter and elegant.
Marc Marc Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. From this, I need to be able to remove the full path name related to "oracle. Unfortunately, not only could the oracle path name be different than shown above, there could be multiple oracle path names and all need to be removed.
I tried implementing the solution here However, it just isn't working. The script wouldn't find the path name. Any help would be appreciated. Thank you. If you need to make it a persistent change use setx instead of set and open another console for changes to take effect. I putted an echo to the last line. Check the result and If it's OK for you, remove it. I think this is more elegant, and I commented the hell out of it so even someone new to the horrors of Batch can follow along.
I'm quite sure it's easy to adapt to Windows-native perl and bat files. Advantage: the flexible power of regular expressions. But this was not possible due to using a another variable in the environment variable for Windows. Also, thanks to Jens A. Koch for the base command. For fixed change, it is necessary to use the SETX command or directly change the entries in the Registry.
Fortunately, PShell came to the rescue:. RegistryValueKind]::ExpandString ". Special thanks to vonpryz for the last command. See also: ss AKhudairy is correct: ss Also you need to add " s around!
Show 4 more comments. Frank Frank 1, 9 9 silver badges 11 11 bronze badges. In case anyone wants an alternative method Mark Mark 59 1 1 silver badge 1 1 bronze badge. It probably works against current directory, not a directory where script file located. Gico Gico 1, 2 2 gold badges 13 13 silver badges 29 29 bronze badges. Quick and dirty. I like that! Naguib Ihab Naguib Ihab 3, 7 7 gold badges 33 33 silver badges 71 71 bronze badges.
Steve Seymour Steve Seymour 1. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Hot Network Questions.
Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.
0コメント