I wrote a script to downgrade different versions of IE to downgrade to IE8 on Windows 7 systems.  The script when run locally, it works, does the whole downgrade process, and reboots the computer in the end, when it comes back up IE is downgraded to 8.

When I mounted the script on KACE well, it doesnt run.  KACE reads through it, and just goes to the part where it reboots the system.  When the system comes back up, IE has not been downgraded.  I have tried converting my script in different ways but I can't figure out why KACE wont run it.

Could someone take a look at my script and give me other ideas or point what I am doing wrong? Here is the pastebin, just in case: http://pastebin.com/BBPkZqZP

Thanks!

@echo off

cls

set IEVersion=0

IF exist C:\Windows\servicing\Packages\Microsoft-Windows-InternetExplorer-*11.*.mum (

echo Internet Explorer 11 was found... Downgrading...

FORFILES /P C:\Windows\servicing\Packages /M Microsoft-Windows-InternetExplorer-*11.*.mum /c "cmd /c echo Uninstalling package @fname  

start /w pkgmgr /up:@fname /quiet /norestart"

set IEVersion=1

echo Internet Explorer 11 was removed

)

IF exist C:\Windows\servicing\Packages\Microsoft-Windows-InternetExplorer-*10.*.mum (

echo Internet Explorer 10 was found... Downgrading...

FORFILES /P C:\Windows\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname 

start /w pkgmgr /up:@fname /quiet /norestart""

set IEVersion=2

echo Internet Explorer 10 was removed

)

IF exist C:\Windows\servicing\Packages\Microsoft-Windows-InternetExplorer-*9.*.mum (

echo Internet Explorer 9 was found... Downgrading...

FORFILES /P C:\Windows\servicing\Packages /M Microsoft-Windows-InternetExplorer-*9.*.mum /c "cmd /c echo Uninstalling package @fname 

start /w pkgmgr /up:@fname /quiet /norestart"

set IEVersion=3

echo Internet Explorer 9 was removed

)

Answer Summary:
Cancel
7 Comments   [ + ] Show Comments

Comments

  • are these 64bit machines?
    • some are...
      • do not know why on 32 bit it would fail, but on 64 bit machines, the kace client is 32 bit so when it makes calls it will get redirected to the 32 bit system files not the sysnative 64 bit files, and this causes problems with it making the proper calls the OS is looking for.

        You may have to something like pstools psexec to do this for you. You can add psexec as a dependency and use it to login as administrator and call the bat file.

        http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
      • Smal.tmcc: We tried using PSexec.exe with the parameters -i -d -s, to call our script bit it didnt work as well. Really stuck on this one.
  • I notice some echo statements. Will that cause a problem as in will a cmd prompt window appear? This may be trouble if running a managed install when no user is logged in.
  • This is not a managed install... its a scripted install.
  • I messed with this forever and had the same result. I finally decided to remove the IE11 update manually and then install IE9 with KACE. Nice script though. I'll keep an eye here to see if there are any real answers.
  • why wont KACE run it though... ? Locally it runs...
  • SMal.tmcc: Going to try that and report back here....
  • If this runs locally, but not from Kace - it is not a problem with the script, but a problem with the way you are using Kace to push it. Can you paste screenshots from your K1000 which shows how you are deploying this?
    • We are using scripting method, here is screenshot: http://i.imgur.com/8xb0Jv5.jpg
Please log in to comment

Answers

1
Does it run as LocalSystem?  If not, you may have to supply admin credentials using runas.  To test:  https://www.kace.com/fr/support/resources/kb/article/How-to-mimic-running-a-script-as-Local-System-User-Scripting

If this is a .bat file, you might try adding it to your kscript as a dependency and calling it this way:  %windir%\sysnative\cmd.exe /c nameofyourfile.bat

I think that should call the 64 bit version of cmd.exe.
Answered 08/07/2014 by: jknox
Red Belt

  • you sir, are the man. We had to work with psexec a little bit but we got it running thanks to that article.
    • I'running into the same issue. Do you mind posting a screenshot of your kscript with psexec?
      • sure, here is the gist: https://gist.github.com/gjpalau/90e370a4d1973c99e15a
      • http://i.imgur.com/vWEzP18.png
    • Thank you so much I've been banging my head against the wall because of this. Say I wanted to just go down to IE9, do you think I could just remove that portion of your script?
      • yeah if you take apart the script its going to work up till that point...
    • Worked like a charm, I'll need to play around with only downgrading to IE9 though. Thanks so much...
Please log in to comment
Answer this question or Comment on this question for clarity