WiX MSI在不启动的情况下安装Windows服务(WiX MSI install Windows service without starting it)
我正在尝试为我的Windows服务创建一个将安装该服务的WiX MSI安装程序,但无法启动它。 我似乎无法找到解释如何做到这一点的地方,或者如果可能的话。
我试图删除我用于启动服务的ServiceControl,并且没有任何运气地切换ServiceInstall上的Start属性。 它必须可以做到这一点,对吧? 我只想让MSI文件安装该服务,并让用户在需要时启动它。
<Component Id="ServiceInstaller" Guid="9e578e3d-0339-425c-8633-f54ffaaa4921"> <ServiceInstall Id="ReportingServiceInstaller" Type="ownProcess" Vital="yes" Name="WindowsService.exe" DisplayName="WindowsService" Description="Wickedly awesome and amazing service." ErrorControl="ignore" Account="NT AUTHORITY\LocalService" Start="auto" Interactive="no" /> <ServiceControl Id="ServiceControl_Stop" Name="WindowsService.exe" Stop="both" Remove="uninstall" Wait="no" /> </Component>
I am trying to create a WiX MSI installer for my Windows service that will install the service, but not start it. I can't seem to find anywhere that explains how to do this or if it's possible.
I tried to remove the ServiceControl I had for starting the service as well as toggling the Start attribute on the ServiceInstall without any luck. It has to be possible to do this, right? I just want the MSI file to install the service and let the user start it when they want.
<Component Id="ServiceInstaller" Guid="9e578e3d-0339-425c-8633-f54ffaaa4921"> <ServiceInstall Id="ReportingServiceInstaller" Type="ownProcess" Vital="yes" Name="WindowsService.exe" DisplayName="WindowsService" Description="Wickedly awesome and amazing service." ErrorControl="ignore" Account="NT AUTHORITY\LocalService" Start="auto" Interactive="no" /> <ServiceControl Id="ServiceControl_Stop" Name="WindowsService.exe" Stop="both" Remove="uninstall" Wait="no" /> </Component>
原文:https://stackoverflow.com/questions/34046837
最满意答案
UPDATE git 1.8.3引入了一个更有效的方式来获得粗略的大小:
git count-objects -vH
(见@VonC的回答)对于“完整尺寸”的不同想法,您可以使用:
git bundle create tmp.bundle --all du -sh tmp.bundle
关闭(但不准确)
git gc du -sh .git/
与后者,你也会计数:
- 挂钩
- config(遥控器,推送分支,设置(空格,合并,别名,用户详细信息等)
- 藏匿 (请参阅我可以从远程回收站将藏书藏到本地分支机构中吗? )
- rerere缓存(可以得到相当大的)
- reflogs
- 备份(从过滤器分支,例如)和各种其他事情(中间状态从rebase,平分等)
UPDATE git 1.8.3 introduced a more efficient way to get a rough size:
git count-objects -vH
(see answer by @VonC)For different ideas of "complete size" you could use:
git bundle create tmp.bundle --all du -sh tmp.bundle
Close (but not exact:)
git gc du -sh .git/
With the latter, you would also be counting:
- hooks
- config (remotes, push branches, settings (whitespace, merge, aliases, user details etc.)
- stashes (see Can I fetch a stash from a remote repo into a local branch? also)
- rerere cache (which can get considerable)
- reflogs
- backups (from filter-branch, e.g.) and various other things (intermediate state from rebase, bisect etc.)
相关问答
更多-
回购邮件本身会看到它的大小变化主要是因为数据的性质:二进制数据的存储效率低于非二进制数据,并且通常更大。 使用中的repo(本地克隆)可以看到它的大小取决于最后的gc和repack :请参阅git gc --aggressive vs git repack 。 Packfiles是完成整理的地方 。 至于提交,请阅读“ 完全无视Git提交历史 ”。 这两个极端是查看各个项目的核心变更单位。 从Git的角度来看 - 可能是因为在邮件列表方法中易于使用 - 单个原子提交最有意义。 从GitHub的角度来看,单个 ...
-
从git到deb repo(From git to deb repo)[2021-10-01]
在svn export命令的Git中没有直接的等价物,所以最简单的方法就是制作一个存档并解压缩它。 git archive创建一个ZIP或tar存档,其中只包含存储库的内容而没有任何Git的元数据,因此请创建其中一个并将其解压缩: git archive -o /tmp/repo.tar HEAD cd /your/server/directory tar -xf /tmp/repo.tar rm /tmp/repo.tar 您可以使用-C选项来避免临时文件告诉tar更改目录: git archive - ... -
查找git repo的大小(Find size of git repo)[2024-02-05]
UPDATE git 1.8.3引入了一个更有效的方式来获得粗略的大小: git count-objects -vH (见@VonC的回答) 对于“完整尺寸”的不同想法,您可以使用: git bundle create tmp.bundle --all du -sh tmp.bundle 关闭(但不准确) git gc du -sh .git/ 与后者,你也会计数: 挂钩 config(遥控器,推送分支,设置(空格,合并,别名,用户详细信息等) 藏匿 (请参阅我可以从远程回收站将藏书藏到本地分支机构中吗 ... -
合并不会删除历史记录。 特别: 你开始 C -- D -- E -- F <--(develop) 在A和B中都做了一些清理。你没有指定你做了什么,但是假设你最终得到了类似 C -- E' -- F' <--(develop) 在A.(我假设C没有变化,否则你的合并尝试会抱怨,你不得不使用--allow-unrelated-histories选项。) 然后在B ,假设你只是运行git fetch 。 你会有的 C -- D -- E -- F <--(develop) \ E' -- F' <-- ...
-
从来没有试过这个,但也许操纵bridge-repo的/.hg中的git-mapfile可以工作。 我会这样尝试: 让我们说Hg repo的提示是Git repo的根。 通过hg-git克隆Git repo只到root(这可能与Git一致,对吧?)。 将所有提交从原始Hg repo中拉入hg-git克隆。 去除单根,但记下这个根的完整哈希值。 记下Hg repo提示的完整哈希值(现在也是hg-git克隆的提示)。 编辑/.hg/git-mapfile。 它应该只包含一个条目,一边是单根的哈希(应该在右边)。 ...
-
我已通过在服务器中运行以下命令解决了它。 bash git gc --aggressive --prune=now I have resolved it by run below command in server. bash git gc --aggressive --prune=now
-
如果在执行第一个命令时没有初始化repo,则错误消息是正常的:您需要在添加任何远程之前创建一个repo。 至于你的第二个错误信息:如果你在git repo目录本身(你在git init ),那么,作为Issac注释,你不需要--git-dir参数。 但是如果你仍然想添加一个--git-dir参数,那么--git-dir为非裸存储库引用的路径必须以/.git (就像你在第一个命令中所做的那样)。 即使在~/gitRepo/my_repo创建了一个git repo: ~/gitRepo/my_repo不是git ...
-
Heroku不是GitHub的替代品(当然没有社交功能,拉取请求,fork队列,评论和对提交的评论......)。 另外我认为它不支持智能http (当你在企业防火墙后面推动时这很重要)。 它不支持子模块 ( GitHub ) 但它适用于管理和部署Web应用程序,并具有高级监控功能 。 如果是你的情况,那么Heroku是正确的选择。 Heroku isn't a replacement for GitHub (and certainly don't have all the social feature, ...
-
您可以为每个存储库配置pack.threads,但我怀疑是否有自动执行此操作的设置,具体取决于存储库的大小。 You can configure pack.threads per repository, but I doubt that there is a setting to do this automatically depending on the size of the repository.
-
如何使用git重置repo?(How to reset repo using git?)[2022-07-15]
重置为HEAD : git reset --hard HEAD 清理掉任何遗留下来的东西: git clean -fxd 请注意, 这两个命令都可以删除信息并丢失状态。 如果您丢失了某些内容,请务必进行备份。 Reset to HEAD: git reset --hard HEAD Clean out anything else left behind: git clean -fxd Be warned that both of these commands can delete informati ...