how to remove the Patch from console - patch

I am applying Patch to my programm with command line:
msiexec /p Patch.msp -l*v log.txt
But how to remove the Patch from console? Not to remove the product at all.Only Patch.
Now I am using ARP Panel for this cause. But i can't get logs.

Starting with Windows Installer 3.0, you can uninstall patches. There are two methods you can use on the command line:
Using MSIPATCHREMOVE on a command line
msiexec /i {GUID-OF-PRODUCT} MSIPATCHREMOVE={GUID_OF_PATCH} /qb
Using the standard command line options
Msiexec /package {GUID-OF-PRODUCT} /uninstall {GUID_OF_PATCH} /passive
For more information, read Uninstalling Patches article on MSDN.

No all patches can be removed individually. You must author a special kind of patch called "Uninstallable Patch" in order to remove it.
You can read more here on how to remove patches:
http://msdn.microsoft.com/en-us/library/aa371212(VS.85).aspx

The other answers need product's GUID, it's not easy to get it.
Here's another way:
Msiexec /i {installpath_of_product} MSIPATCHREMOVE={installpath_of_patch} /qb

Related

Qt DirectX fxc.exe compilation line

I was compiling Qt, then saw in the log "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\bin\x86\fxc.exe" /nologo /E VS_Passthrough2D /T vs_4_0_level_9_3 /Fh libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h ../../../3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/shaders/Passthrough2D11.hlsl
It gave error Too many files specified ('E:/' was the last one), use /? to get usage information
it shows in the help that /E<name> entrypoint name
It seems to me that it is treating the /E option as the path E:/ (its unfortunate I have a drive E, and many data residing in it). Is there anyway around this? is my analogy correct? some suggestions would be really appreciated.
Having had the same problem recently, I asked colleagues about it and was advised to use MS's cmd.exe command prompt instead of MinGW's Git Bash prompt. For some reason that worked ! I won't pretend to understand how choice of command shell can help, but apparently it does.
See also discussion of this on Qt's own forum:
https://forum.qt.io/topic/73114/building-with-mingw64-on-windows-8

Rstudio Git bash pop-up every time

I have integrated the git version control to an existing project in Rstudio(Windows). After that for every change I make in the Rmd file, a pop up is coming. I could see that it is a git bash executing on every command I have added in the file. I do not have more details on this.
Actually solved it myself just now with the help of this info:
https://stat545-ubc.github.io/git03_rstudio-meet-git.html
WARNING: On Windows, do NOT use C:/Program Files (x86)/Git/cmd/git.exe. The difference between the good and bad paths is bin vs. cmd.
My Rstudio-version was setting the cmd/git.exe as default.
If you change that to bin/git.exe my problem was solved...

flyway sbt placeholder substitution not working

Using Flyway 2.3 on Windows, same result from command prompt and within cygwin. Production env is Linux, but haven't been able to test there yet.
My SQL file has the line:
alter table person add ${new_col} text;
I added the following to my build.sbt, based on what I saw on the the flyway sbt doc page:
flywayPlaceholders := Map(
"new_col" -> "temp_name"
)
When I run
> sbt flywayMigrate
I get this:
com.googlecode.flyway.core.api.FlywayException: No value provided for placeholder expressions: ${new_col}. Check your configuration!
Under cygwin it does work if I specify the substitution on the command line:
> sbt flywayMigrate -Dflyway.placeholders.new_col=temp_name
Command line plaveholder substitution doesn't work in Windows command prompt, but I suspect that's a different issue as none of my -D options are respected there.
I'm new to both sbt and Flyway, so I'm hoping this is something simple, but I couldn't find anything helpful by googling. thanks in advance for any help
The flywayPlaceholders in build.sbt are currently by the commandline configuration.
This is a bug in Flyway.
I created a pull request.

Zsh wants to autocorrect a command, with an _ before it

I just started using Zsh lately for some of the integrated support in the shell prompt for my Git status etc.
When I type in:
ruby -v
to confirm the version of ruby I'm running, Zsh asks if I want to change the command to _ruby. Well after saying no at the prompt and the command completing as expected I continue to get the question at the prompt after confirming my command is correct.
I'm assuming there is a completion file or something of the sort.
Thanks
Update:
The shell is no longer trying to complete _ruby, it stopped responding after closing the shell a few times some how.
I tried to clean the file up several times but there is a "opts" variable that is 50 or more lines long and the lines are all ran together, some lines more than 150 characters. Maybe I could email an attachment to you if you still want to see it.
I sincerely apologize for the messy post.
This is command autocorrection, activated by the correct option. It has nothing to do with completion. You're seeing _ruby because zsh thinks there is no ruby command and it offers _ruby as the nearest existing match.
If you've just installed ruby, it's possible that zsh has memorized the list of available command earlier, and it won't always try to see if the command has appeared in between. In that case, run hash -rf. Future zsh sessions won't have this problem since the ruby command already existed when they started.
Sometimes, when you change your PATH, zsh forgets some hashed commands. The option hash_listall helps against this. As above, if you can force zsh to refresh its command cache with hash -rf.
You could make an alias:
alias ruby='nocorrect ruby'
It's what I did when zsh kept asking me if I meant .meteor when I typed meteor because auto-correct is still useful from time to time.
I find the autocorrect feature can get annoying at times. So I do in my ~/.zshrc,
DISABLE_CORRECTION="true"
I had the same problem even when the command is not installed.
I can solve it using the CORRECT_IGNORE variable in my .zshrc
# OPTs to enable
setopt HASH_LIST_ALL
setopt CORRECT
# Zsh variable to determine what to ignore,
# in this case everything starting with _ or .
CORRECT_IGNORE="[_|.]*"
I hope it helps to you or anyone with this issue
Sometime ago after an update, I got command auto-correction enabled which I don't want. If the same happened to you and you want to revert it, in the ~/.zshrc file you'll have make it:
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="false"
or comment it as per bellow:
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
Just a note, on my zsh (version 5.7.1 on macOS), the DISABLE_CORRECTION didn't work.
I saw in my .zshrc file the following two lines, which I then commented out
setopt CORRECT
setopt CORRECT_ALL
That did it for me.

Command line option to tell msi installation to a specific location

Is there anyway to install the msi at specific location through the command line.
Yes, typically, you can specify a TARGETDIR=(path to install to) when you run the msiexec installer:
msiexec /i (yourFile).msi TARGETDIR=C:\YourBin\YourApp
I've been corrected (thanks to 0xA3 for this!) - my initial mention of INSTALLDIR is wrong - you need to use TARGETDIR instead. That one does indeed seem to work for just about any MSI I tried it on. Windows Installer stuff isn't exactly intuitive or easy......
If this is a Web setup, you can use the workaround described here. Otherwise you may specify the MSI property TARGETDIR on the command line:
msiexec /i setup.msi TARGETDIR="C:\TestLocation\"

Resources