Solved

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

Posted on 2009-07-06
5
168 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
  • 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

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…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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