?
Solved

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

Posted on 2009-07-06
5
Medium Priority
?
173 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 85

Accepted Solution

by:
oBdA earned 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

762 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