Batch File to Detect if Application Installed

curtranhome

New member
Member
Local time
11:40 PM
Messages
48
Location
Sacramento CA
Hey everyone! I'm making a batch file for a computer repair company I'm with and I'm trying to automate as much stuff as possible and speed things up. As of this moment, I got all the major components of a batch file that retrieves information about the computer (Manufacturer, Model #, Serial #, etc.) then it opens up our site and logs that information in the site's database for the user's later review. Now, our site is programmed for netscape based browsers (Opera, FireFox, Chrome) and has some serious issues with Internet Explorer. So what I'm trying to find out is how do I make a batch file detect if a netscape based browser is installed and then open the site up in that browser? Any alternatives to this would be nice, we're trying not to completely redesign the website but will if it has to be done.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome
I can think of 2 quick solutions, and neither are 100% reliable really.
One would be to check for the existence of the folder in program files, using an IF EXIST c:\program files\opera\nul............ and assuming it will be there. However it has problems if the user installed to a non standard location and you'll have to watch out for 32/64 bits versions which go to different folders.
Another way would be to check for the existence of the registry key un HKLM\Software\Opera, using REG QUERY command (check the actual key created beforehand, I'm just inventing here, but the idea is that). This also fails when the user is using the portable installations of browsers, which are registry-free.

In the long run, the only sure method would be to fix the site to make it work in IE. It's really common that non-IE browsers run the sites as they should, yet IE has problems frequently due to being standards-incompatible. While it's more work, I would ask a web developer to do the fix and workaround those IE bugs to make the site work properly everywhere. It's a very common problem unfortunately.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Ok, well thank you. :D
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome
Back
Top