Solved

Login Script - Checking for Registry value to run install of IE7

Posted on 2009-07-06
5
170 Views
Last Modified: 2012-05-07
I am trying to use this statement to check for IE7 on some PCs and then if it exists continue with rest of the login script batch file -

reg query "HKLM\Software\Microsoft\Internet Explorer\Version Vector\ " /f 7.0000

However, if this value does not exist then I want to run the install of IE7 with some switches and continue with the rest of the login script.

Any help is appreciated.  Thanks.
0
Comment
Question by:cfbennett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 12

Expert Comment

by:kevin_u
ID: 24789182
This should work:
reg query "HKLM\Software\Microsoft\Internet Explorer\Version Vector\ " /f 7.0000
if %errorlevel% 1 (
  rem ie7 install command here
)

Open in new window

0
 

Author Comment

by:cfbennett
ID: 24789208
I will give this a try and let you know.

Thanks.
0
 
LVL 84

Accepted Solution

by:
oBdA earned 500 total points
ID: 24790131
This will definitely not work.
The syntax of "reg query" is incorrect and will *always* return errorlevel 1.
The errorlevel as suggested by kevin_u is incorrect as well, the script will exit with a syntax error.
In addition, this will NOT work as a logon script, because users do (or at least "should") not have permissions to install software, and the logon script runs in the user's security context.
You could try to use the script below as a *computer* *startup* script; note that the group "Domain Computers" needs to have Read permissions to whatever share the installation file is coming from.
Or you can deploy it directly through a GPO:
You can use .msi files to deploy Internet Explorer 7 in Active Directory environments
http://support.microsoft.com/kb/942812

reg query "HKLM\Software\Microsoft\Internet Explorer\Version Vector" /v "IE" | find "7.0000"
if not errorlevel 1 goto :eof
REM Your IE7 install goes here:

Open in new window

0
 

Author Comment

by:cfbennett
ID: 24805087
Thanks oBdA.  I am going to try this and if I cannot get it to work then I will use the link to deploy IE7 via AD.

I will post back in a bit whether it works.
0
 

Author Comment

by:cfbennett
ID: 24805216
Thank you oBdA as your solution worked putting those lines in the login script.

I know you said not to put it there but the users have Administrative rights to the PC where we are deploying this so it works.

Thanks again for the help.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question