Solved

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

Posted on 2009-07-06
5
166 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 83

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
setup share and NTFS permissions. 12 69
home folder path for users 4 57
search on network drive not working 4 48
how to copy from computer to usb drive 7 106
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ā€¦
Learn about cloud computing and its benefits for small business owners.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now