jtaft Posted January 19, 2015 Share Posted January 19, 2015 I need a script that when run will identify the version of Internet explorer you are running and uninstall it. I am trying to use the Run with @ComSpec and cant seem to get past the starting line here. Here is the code I am trying. (This is to remove IE10, I will add conditions after I am able to get the initial removal to work) If I copy and past this in the cmd prompt it runs and removes IE10 as expected. Any help would be greatly appreciated! #RequireAdmin #include <Constants.au3> Local $IE10 = 'FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart' Run (@ComSpec & "/c" & $IE10) Link to comment Share on other sites More sharing options...
jdelaney Posted January 19, 2015 Share Posted January 19, 2015 (edited) It would be much easier to debug if it weren't all one command: _FileListToArray For loop ConsoleWrite RunWait I'm not seeing your closing " wrapping your dual command. Edited January 19, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
JohnOne Posted January 19, 2015 Share Posted January 19, 2015 You have an odd quote in it. Local $IE10 = 'FORFILES /P %WINDIR%servicingPackages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart' AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jtaft Posted January 19, 2015 Author Share Posted January 19, 2015 Universalist, I understand this is a long command string. As far as not seeing my closing" wrapping my dual command, I guess my question there would be how would I close this command? John, As I mentioned that this exact command does run from a command prompt as presented here. I have tried removing the odd Quote as highlighted here but it appears to be required and that is why I am wrapping this command in single quotes apposed to double quotes. Here is were I am pulling the command from http://blogs.msdn.com/b/askie/archive/2014/03/28/command-line-options-available-to-uninstall-internet-explorer.aspx Link to comment Share on other sites More sharing options...
JohnOne Posted January 19, 2015 Share Posted January 19, 2015 Try... Local $IE10 = 'FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c ' & '"' & 'cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart' AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jtaft Posted January 19, 2015 Author Share Posted January 19, 2015 Thanks John, But that did not worl. I was able to get it to work by using basic codeing without @comspec ...... HAHA Run ("cmd") Sleep(5000) Send ('FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart') Send ("{Enter}") Link to comment Share on other sites More sharing options...
JohnOne Posted January 19, 2015 Share Posted January 19, 2015 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jdelaney Posted January 19, 2015 Share Posted January 19, 2015 Stick with your prior route, it's more reliable...your closing " would wrap the entire command you are running in the forfiles loop...you also needed spaces in your Run command: Local $IE10 = 'FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart"' Run (@ComSpec & " /c " & $IE10) IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
jtaft Posted January 19, 2015 Author Share Posted January 19, 2015 Thank you so much ..... That worked! Now I see were it wasn't closed...I was one key stroke off lol Thanks very much appreciated!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now