Changeset 174
- Timestamp:
- 04/08/08 22:54:17 (9 months ago)
- Files:
-
- trunk/sys/win32/SpecPath.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/sys/win32/SpecPath.d
r161 r174 189 189 190 190 +/ 191 char[] iePath() 192 { 193 char[] result; 191 char[] InternetExplorerPath() 192 { 193 char[] result = r"C:\Program Files\Internet Explorer\IEXPLORE.EXE"; 194 if(FilePath(result).exists) return result; 195 196 result = r"D:\Program Files\Internet Explorer\IEXPLORE.EXE"; 197 if(FilePath(result).exists) return result; 198 194 199 scope httpkey = RegistryKey.classesRoot.openSubKey(r"HTTP\shell\open\command"); 195 200 if(httpkey !is null) … … 198 203 } 199 204 205 // too tedious 20080409 yidabu 206 /* 200 207 if(!result) 201 208 { … … 216 223 } 217 224 } 218 225 */ 219 226 if( result && result[0] == '\"' ) 220 227 { … … 223 230 result = result[0..i]; 224 231 } 225 result = ( result.length && FilePath(result).exists ) ? result : null; 226 227 return result; 232 233 return (result.length && FilePath(result).exists) ? result : null; 228 234 } 229 235 //iePath 230 236 237 /** 238 239 240 */ 241 char[] windowsMediaPlayerPath() 242 { 243 char[] result; 244 result = r"C:\Program Files\Windows Media Player\wmplayer.exe"; 245 if( FilePath(result).exists ) return result; 246 247 result = r"D:\Program Files\Windows Media Player\wmplayer.exe"; 248 if( FilePath(result).exists ) return result; 249 250 auto key = dwin.sys.win32.Registry.RegistryKey.localMachine.openSubKey(r"SOFTWARE\Microsoft\MediaPlayer\"); 251 if(key !is null) 252 if( auto dir = key.getValue!(char[])("Installation Directory") ) 253 return dir ~ r"\wmplayer.exe"; 254 255 return null; 256 } 231 257 232 258 char[] shellPath(char[] name)
