Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

21 Experts available now in Live!

Get 1:1 Help Now