我是wix安装程序的新手.我已经为我的应用程序使用wix安装程序开发了一个设置,我需要执行自定义操作以在cmd.exe中运行命令.在XP中它工作正常.但在Windows 8和7中,cmd提示符需要以管理员身份运行.
我用Google搜索并发现关键字Elevated Privileges和impersonate可能对我有所帮助.
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated"></Package>
Run Code Online (Sandbox Code Playgroud)
如上所示,我使用了设置为perMachine的InstallScope属性,并且我在CustomAction元素中使用了Impersonate ="No":
<CustomAction Id='comReg' Directory='INSTALLLOCATION' Impersonate='no'
ExeCommand='"[NETFRAMEWORK40CLIENTINSTALLROOTDIR]regasm.exe" "[INSTALLLOCATION]myProduct.dll" /codebase' Return='check' />
Run Code Online (Sandbox Code Playgroud)
但是在安装时我没有得到任何改变.我需要命令提示符以管理员模式打开并运行上述命令.
任何人都可以告诉我这些关键词" 提升权限和模仿"
<InstallExecuteSequence>
<Custom Action='comReg' After='InstallFinalize'>NOT REMOVE</Custom>
<Custom Action='comUnreg' Before='RemoveFiles'>REMOVE</Custom>
</InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)
怎么做?
我开发了ac#应用程序,它连接到许多类型的数据库服务器,如Sql,Oracle,Mysql等.连接是使用ODBC建立的.
我需要找到建立连接的服务器类型(DBMS类型),因为用户只输入DSN名称.
经过几个小时的冲浪,我发现我的要求只能通过这个函数SQLGetInfo.但我不知道如何在C#中处理这个问题.
甚至已经检查过这个Link1.
从上面的链接,我发现ODBC API只提供DataBase名称和DataSource Name.但是我需要找到Datatbase类型,比如它是SQL连接还是Oracle连接或mySqlConnection.
是否可以从DSN名称获取DBMS类型..?
注意:我不想从注册表设置中读取它.我试过这个并且它可以工作,但我有权限问题..!
我在树视图和列表框中启用了滚动查看器,甚至自定义了滚动条,引用了这个网站,我已经实现了我需要的东西.我的滚动条现在看起来像下面
但我需要我的滚动条看起来像这样
我需要在右下角的空间用水平或垂直滚动条填充.是否可以在wpf?
以下是滚动条的自定义样式
<local:ThicknessConverter x:Key="ThicknessConverter" />
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Width" Value="Auto"/>
<Setter Property="Height" Value="18" />
<Setter Property="Template"
Value="{StaticResource HorizontalScrollBar}" />
</Trigger>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="Width" Value="18"/>
<Setter Property="Height" Value="Auto" />
<Setter Property="Template"
Value="{StaticResource VerticalScrollBar}" />
</Trigger>
<Trigger Property="Name" Value="PART_VerticalScrollBar">
<Setter Property="Margin" Value="{Binding RelativeSource={RelativeSource AncestorType=ScrollViewer},Converter={StaticResource ThicknessConverter}}">
</Setter>
</Trigger>
</Style.Triggers>
</Style>
Run Code Online (Sandbox Code Playgroud)
这里有树视图代码
<telerik:RadTreeView x:Name="radTreeView" Background="#4E4E4E" Margin="0,0,456,0" Grid.Row="2"
ItemsSource="{x:Static local:MainWindow.AnimalCategories}" ItemPrepared="treeView_ItemPrepared"
ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" Grid.RowSpan="2" Grid.ColumnSpan="2">
<telerik:RadTreeView.ItemTemplate> …Run Code Online (Sandbox Code Playgroud) 我正在使用以下代码以编程方式从资源中将图像添加到radtreeviewitem.
"/myAssembley;component/Resources/image1.png"
Run Code Online (Sandbox Code Playgroud)
并且图像显示成功.现在我需要添加另一个需要在radtreeviewitem中第一个图像旁边显示的图像.
如何实现它.
如下图所示,我需要使用treeviewitem在单个树视图项目中显示文件夹图标和红色方块图标.
我已经在vs2010中开发了一个用于word的插件.它在32位版本的办公室中工作很酷,但它不适用于64位版本的办公室.搜索了很多,发现
For 64-bit Root\Software\Microsoft\Office\application name\Addins\add-in ID
For 32-bit Root\Software\Wow6432Node\Microsoft\Office\application name\Addins\add-in ID
Run Code Online (Sandbox Code Playgroud)
注册表信息路径.我尝试注册64位的信息.即使它不在64位的办公室工作.在64位的办公室中,我的插件显示在InActive Application Add-Ins下.我甚至尝试启用它.
如何为64位办公室开发和部署插件..?
并得到以下错误.. !!
无法加载文件或程序集'xxxxx,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一.尝试加载格式不正确的程序.
**************异常文本**************System.BadImageFormatException:无法加载文件或程序集'xxxxx,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一.尝试加载格式不正确的程序.文件名:'xxxxx,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'
at MyWord.ThisAddIn.ThisAddIn_Startup(Object sender, EventArgs e)
at MyWord.ThisAddIn.FinishInitialization()
Run Code Online (Sandbox Code Playgroud)
Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreats..ExecuteCustomization.ExecutePhase(ExecutionPhases executionPhases)at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.ExecuteEntryPoints ()WRN:程序集绑定日志记录已关闭.要启用程序集绑定失败日志记录,请将注册表值[HKLM\Software\Microsoft\Fusion!EnableLog](DWORD)设置为1.注意:程序集绑定失败日志记录会导致一些性能损失.要关闭此功能,请删除注册表值[HKLM\Software\Microsoft\Fusion!EnableLog].
我需要在regAsm中注册一个dll,现在我正在使用它
<CustomAction Id='comReg' Directory='INSTALLLOCATION'
ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\regasm.exe" "[INSTALLLOCATION]myProduct.dll" /codebase' Return='check' />
Run Code Online (Sandbox Code Playgroud)
注册和注销
<CustomAction Id='comUnreg' Directory='INSTALLLOCATION' ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\regasm.exe" /u "[INSTALLLOCATION]myProduct.dll" /codebase' Return='check' />
Run Code Online (Sandbox Code Playgroud)
我使用它,有时它的安装和somnetimes它给出错误.但所有人都建议使用Heat.exe,http: //wixtoolset.org/documentation/manual/v3/overview/heat.html, 即使我通过这个链接,但我需要如何在wix中使用它以及怎么做有这些东西.我需要一些tuitorial
我正在尝试获取我几乎已存档的频道视频,但是 YouTube 每页检索 50 个结果,而我的频道有 150 个视频,对结果进行分页会更整洁。可以用下面的代码来做到这一点吗?如果是这样,请告诉我如何做
我是一名 PHP 程序员,但对于使用它并向 youtube 发送 http 请求(包括分页)完全陌生。
这是我到目前为止所拥有的
<?php
error_reporting(E_ALL);
$feedURL = 'http://gdata.youtube.com/feeds/api/users/gamertv273/uploads?start-index=1&max-results=10';
$sxml = simplexml_load_file($feedURL);
$i=0;
foreach ($sxml->entry as $entry) {
$media = $entry->children('media', true);
$watch = (string)$media->group->player->attributes()->url;
$thumbnail = (string)$media->group->thumbnail[0]->attributes()->url;
?>
<link rel='previous' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/api/users/gamertv273/uploads?start-index=1&max-results=10'/>
<link rel='next' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/api/users/gamertv273/uploads?start-index=2&max-results=10'/>
<div class="videoitem">
<div class="videothumb"><a href="<?php echo $watch; ?>" class="watchvideo"><img src="<?php echo $thumbnail;?>"
alt="<?php echo $media->group->title; ?>" /></a></div>
<div class="videotitle">
<h3><a href="<?php echo $watch; ?>" class="watchvideo"><?php echo $media->group->title; ?></a></h3>
</div>
</div>
<?php $i++; …Run Code Online (Sandbox Code Playgroud) 嗨我需要开发一个用于在visio中创建图表对象的插件.我能够创建顶部形状但不能创建它的派生类型.对于EG,我能够使用c#在visio中创建Start事件,但无法创建消息类型的Start Event或其他

在上图中,我有3个启动事件,添加了BPMN启动事件,并更改了其属性Trigger/Result选项
开始活动 - 多个
开始活动 - 消息
开始活动 - 无
但以上3种形状均来自Start Event.如何创建Message start事件或Multiple start evet等.
我正在使用visio创建形状
Visio.Master shapetodrop = Masters.get_ItemU(@"Start Event");
Visio.Shape DropShape = ActivePage.Drop(shapetodrop, x, y);
DropShape.Name = name;
DropShape.Text = name;
Run Code Online (Sandbox Code Playgroud)
但这只会创建Start Event,如何创建Message Start EVent,Multiple Start Event等
我在按钮鼠标悬停上放置了一个弹出窗口。每次将鼠标悬停在该按钮上时,都会完美显示我自定义设计的弹出窗口。怎么做..?现在我的弹出窗口看起来像
我希望该箭头标记指向该帮助按钮的方法。
这是我在xaml中的按钮和弹出窗口的代码
<telerik:RadButton Name="btnH" Grid.Column="1" HorizontalAlignment="Left" Margin="444,56,0,0" Grid.Row="2" VerticalAlignment="Top"
Width="23" Height="23" BorderThickness="6" BorderBrush="#4E4E4E">
<Image Source="Images/help.png" />
<telerik:RadButton.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard>
<Storyboard TargetName="TooltipPopup" TargetProperty="IsOpen">
<BooleanAnimationUsingKeyFrames FillBehavior="HoldEnd">
<DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="True" />
</BooleanAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
Run Code Online (Sandbox Code Playgroud)
下面是自定义usercontrol xaml,在弹出窗口中amn调用
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="WPFTest.UCToolTip"
mc:Ignorable="d" Height="231.493" Width="362.075"
Background="Transparent" >
<UserControl.Resources>
<Style TargetType="{x:Type Hyperlink}">
<Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
</Style>
</UserControl.Resources>
<Grid Margin="10,0,0,0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Background="red" Margin="0,0,182,133">
</Grid>
<Polygon
Points="0.5,0 15,0, 0,30" Stroke="Orange" Fill="Orange" Margin="0,98,0,101" />
</Grid>
Run Code Online (Sandbox Code Playgroud)
我想从t_object获得一个对象,如果它的关键字包含单词“ Test”。即使有“正在测试”或“已测试”,我也需要从行中获取该数据。
在sql中,我们可以使用LIKE关键字。但是如何在EA SQL Scratch Pad ..中使用它?
SELECT * FROM t_object where t_object.PDATA5 like '%Test%'
Run Code Online (Sandbox Code Playgroud)
上面的内容在EA中不起作用。
嗨,我需要我的应用程序才能在管理员模式和所有用户模式下工作。(即)它应该在所有模式下工作。我已经在WIX 中创建了设置,并且在浏览了很多之后我才知道在包中设置InstallScope="perMachine"使我们的应用程序可以在所有模式下工作。但我发现只有它在所有登录(管理员或其他用户)中的Add\Remove 程序下显示我们的应用程序。
(ie):我可以在管理员模式下运行我的应用程序,如果我以任何用户身份登录,那么我的应用程序是不可见的。它只出现在Add\Remove 程序中。
我的要求是我需要我的应用程序在所有模式下工作,管理员,登录,所有用户。
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" ></Package>
Run Code Online (Sandbox Code Playgroud)
甚至我在 InstallScopeDlg 中尝试了 allUser 选项。我需要我的应用程序也适用于所有用户,包括管理员
我是wix的新手,任何人都可以告诉我如何使用wix中的remotePayload中的哈希值.
<RemotePayload
Hash="D40DB6440BD2B5B5AA00DA63F408469FF22A9542"
ProductName="vstor_redist.exe"
Description="Dotnet 4.0"
Size="39130"
Version="4.0.5022.0" />
Run Code Online (Sandbox Code Playgroud)
在EXEPACKAGE里面我用过它.但是当安装程序运行时,它会显示 哈希值不正确