• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

windows scripting question (2k,2003)

slag

Lifer
Trying to set up a script to search all available drives for java.exe. I can make it search root, but i think its only searching root and subfolders of the C drive. I am going to push this to thousands of windows boxes, all configured a bit differently depending on what drives they have installed, drive names, etc.

I don't want to do it in asp.. need to do it in plain jane windows shell scripting...
 
dir x:\java.exe /s
if errorlevel 0 {
echo Java found on drive X.
goto :endof script
}

Rinse and repeat 26 times. If the drive doesn't exist it will fail immediately for that drive and move on. No reason to complicate it by trying to pull all available drive letters out of the registry or something like that. Brute force it. Be sure to test it, I don't think there's any weird scenarios where you could get a 0 returned and not find the file.
 
thats basically what we did but used a for statement

i was hoping to get it cleaner than that.
 
Back
Top