I made a vb6 reg free com one click deployment project
I added manifest file after publish and change content to use my vb name Green.exe instead of vb.net project name. also changed properties to content and copy if newer. When I install it on client, vb6 program cant start cause of not registered ocx. it means reg free com is not right.
we created lots of ocx which main vb6 program will using. Here is manifest file I created:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="Green.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" type="win32" />
<application />
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!--
UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="10" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
</dependentAssembly>
</dependency>
<file name="Green.exe" size="7184384">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>rqeYDzIVrIY9m/pVlyFdJ6tFpAc=</dsig:DigestValue>
</hash>
</file>
<file name="Green.ReportControl.v15.0.1.ocx" size="1370104">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>DR4oqg8TvRGA7901DvJ8kwQZt48=</dsig:DigestValue>
</hash>
</file>
<file name="GreenACITrans.ocx" size="937984">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>LbPTQBKEGlaE2nD02Lle+jPz1gU=</dsig:DigestValue>
</hash>
</file>
<file name="GreenBackUpRestore.ocx" size="217088">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>EALTeLxgFCOKv256oJyr7T0eRg8=</dsig:DigestValue>
</hash>
</file>
</asmv1:assembly>
Edited: I fixed it. there was a component which it cant be register and i didnt know. i placed it in setup package and now its working.
using this link steps:
https://msdn.microsoft.com/en-US/library/aa697429(v=vs.80).aspx
Thanks guys. it is not a hack. it is from microsoft link:
here . one of my ocx was from prev developer. i didnt know it makes a problem and shouldnt be in manifest. now it works as the link i placed said!
Related
I am getting an error when I attempt to apply a provisioning package which I have created using Windows Configuration Designer. The PPKG is meant to lockdown a specific local user account to only be able to use 3 apps; Google Chrome, PrintStation and BarTender Designer. I have specified in the code the exact path for each app as well as copy/pasting their shortcuts into the Start Menu. I have checked through the code numerous times and can't seem to resolve this issue. I have included the XML code for your reference below, many thanks in advance, I hope we can get this resolved!
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{A039AA28-6A43-4C89-A561-2BCD06282535}">
<AllAppsList>
<AllowedApps>
<App DesktopAppPath="C:\Program Files\Google\Chrome\Application\chrome.exe" />
<App DesktopAppPath="C:\WINDOWS\system32\shutdown.exe" />
<App DesktopAppPath="C:\Windows\SysWOW64\shutdown.exe" />
<App DesktopAppPath="C:\Windows\explorer.exe" />
<App DesktopAppPath="C:\Windows\SysWOW64\explorer.exe" />
<App DesktopAppPath="C:\Program Files\Seagull\Bartender Suite\PrintStation.exe" />
<App DesktopAppPath="C:\Program Files\Seagull\Bartender Suite\bartend.exe" />
</AllowedApps>
</AllAppsList>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Fairview Health Kiosk">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%AppData%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%AppData%\Microsoft\Windows\Start Menu\Programs\PrintStation.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationLinkPath="%AppData%\Microsoft\Windows\Start Menu\Programs\BarTender Designer.lnk" />
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="false"/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>Test</Account>
<DefaultProfile Id="{A039AA28-6A43-4C89-A561-2BCD06282535}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
I am using log4net currently and on every hour log file archive is being performed.
Now I am changing log4net to NLog
Is there similar setting available in NLog Like rolingStyle="once"? which was configure setting available in log4net.
For example earlier while using log4net the files created were used to be like:
LogFile.log
LogFile.log.1 <-last archive file
Following is configuration I used in log4net and I want to use the exact configure settings so that archived file naming should remains as it was in log4net:
<appender name="Work" type="RMM.Common.Logger.LogFileRollingAppender, Common">
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<dateTimeStrategy type="log4net.Appender.RollingFileAppender+UniversalDateTime" />
<file type="log4net.Util.PatternString" value="%property{EdgeAPILogPath}\WebAPI_Work.log" />
<param name="AppendToFile" value="true"/>
<rollingStyle value="Once" />
<rollingStyle value="Composite" />
<datePattern value=".yyyyMMdd-HH" />
<maxSizeRollBackups value="300" />
<maximumFileSize value="20MB" />
<Encoding value="UTF-8" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%utcdate{yyyy/MM/dd HH:mm:ss,fff} [%-5p] [%3t] %m%n" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="DEBUG" />
<levelMax value="FATAL" />
</filter>
</appender>
You can:
Use fileName="${basedir}/logs/${cached:${date:format=yyyy-MM-dd HH_mm_ss}}.log" as a way to ensure one log file per application instance.
Use archiveFileName="${archiveLogDirectory}/LogFile.log.{####}" to append numbers at the end (feel free to add or remove # as required, depending on your maxArchiveFiles).
Use archiveNumbering="Sequence" to achieve the order you want (higher numbers = newer logs).
Source: this piece of documentation and some personal experience.
Hopefully this basic example will help you getting closer to your final target:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
internalLogLevel="Error"
internalLogFile="./internal-nlog.txt"
throwExceptions="true">
<variable name="logDirectory" value="./logs"/>
<variable name="archiveLogDirectory" value="./logs/archive"/>
<targets>
<target name="errors"
xsi:type="File"
fileName="${logDirectory}/${cached:${date:format=yyyy-MM-dd HH_mm_ss}}.log"
archiveFileName="${archiveLogDirectory}/LogFile.log.{#}"
maxArchiveFiles="9"
archiveEvery="Hour"
archiveNumbering="Sequence"
/>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="errors"/>
</rules>
</nlog>
Not an expert on log4net, but it sounds like that rolingStyle="once" is the same as NLog FileTarget ArchiveOldFileOnStartup. So maybe something like this:
<nlog>
<variable name="EdgeAPILogPath" layout="${basedir}" />
<targets>
<target xsi:type="file" name="work"
fileName="${EdgeAPILogPath}/WebAPI_Work.log"
encoding="utf-8"
archiveNumbering="DateAndSequence"
archiveFileName="${EdgeAPILogPath}/WebAPI_Work.{#}.log"
archiveDateFormat="yyyyMMdd-HH"
archiveEvery="Hour"
archiveAboveSize="20000000"
archiveOldFileOnStartup="true"
maxArchiveFiles="300" />
</targets>
<rules>
<logger name="*" minLevel="Debug" writeTo="work" />
</rules>
</nlog>
See also: https://github.com/NLog/NLog/wiki/FileTarget-Archive-Examples
I have a running WCF web role on Azure (not ASP.NET hosted!). I've seen many tutorials, tried many of them, and saw many SO questions - none of them seem to match my specific situation:
I'm able to connect with RDP
I see the MSVSMON.exe process in the host
I can attach to any process via VS2013-Update4 Server Explorer -> Instance -> Attach Debugger... (which process is the host, btw?)
The service works: tested with unit-test with the remote service reference
Disabled firewall - still no luck
I currently use Azure SDK 2.5
But when I try to Step Into from my unit-test, it says A remote operation is taking longer than expected and then: Unable to automatically step into the server. Connecting to the server machine '*.cloudapp.net' failed. The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.
What am I missing?
The csdef file:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="MyServiceWebRole.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-06.2.4">
<WebRole name="MyServiceWebRole" vmsize="Small">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<ConfigurationSettings>
<Setting name="Variable_1" />
<!-- ... -->
<Setting name="Variable_N" />
</ConfigurationSettings>
<Imports>
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
</WebRole>
</ServiceDefinition>
The Cloud.cscfg file:
<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="MyServiceWebRole.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2014-06.2.4">
<Role name="MyServiceWebRole">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="***" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="***" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2016-10-01T23:59:59.0000000+03:00" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
<Setting name="Variable_1" value="Variable_1_Value=" />
<!-- ... -->
<Setting name="Variable_N" value="Variable_N_Value" />
</ConfigurationSettings>
<Certificates>
<Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="***" thumbprintAlgorithm="sha1" />
</Certificates>
</Role>
</ServiceConfiguration>
I have to create a shortcut at the end of the installation process.
This is what i declared in my install.xml
<resources>
...
<res id="shortcutSpec.xml" src="install/shortcuts.xml"/>
</resources>
<panels>
<panel classname="ShortcutPanel">
<os family="windows"/>
</panel>
</panels>
<natives>
...
<native type="izpack" name="ShellLink.dll" stage="both">
<os family="windows" />
</native>
<native type="izpack" name="ShellLink_x64.dll" stage="both">
<os family="windows" />
</native>
</natives>
And this is the content of my shortcuts.xml:
<shortcuts>
<skipIfNotSupported />
<programGroup defaultName="MyGroup" location="applications" />
<shortcut name="MyApplication" target="$INSTALL_PATH\bin\open.bat"
workingDirectory="$INSTALL_PATH" iconFile="$INSTALL_PATH\bin\App32.ico"
iconIndex="0" programGroup="no" desktop="yes" applications="yes"
startMenu="yes" startup="false">
<os family="windows" />
</shortcut>
</shortcuts>
When i run the setup i am able to see the shortcuts panel, but the shortcut is never created in the desktop nor in other known locations.
Is there something i need to do?
I notes that in the showrtcuts panel there is a checkbox 'create shortcut in the desktop'.
If you select this option the shortcut is correctly created in the desktop.
I have a local Orchard 1.7 cms site, which i have customized and so forth. My task is now to publish my site to my host(arvixe.com) through Visual Studio Ultimate 2012 - via the publish option. But the publish fails and i get this error:
Error 1 The "MSBuild.Orchard.Tasks.XmlDelete" task could not be loaded from the assembly C:\Users\WilliamHolm\Documents\Visual Studio 2012\Projects\whj\src\Orchard.Web\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll. Could not load file or assembly 'file:///C:\Users\WilliamHolm\Documents\Visual Studio 2012\Projects\whj\src\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. C:\Users\WilliamHolm\Documents\Visual Studio 2012\Projects\whj\src\Orchard.Web\Orchard.Web.csproj 247 5 Orchard.Web
by looking at the source where the error is located around line 247, in the Orchard.Web.csproj, it looks like this:
</Target>
<Import Project="$(ProjectDir)..\..\lib\msbuild\MSBuild.Community.Tasks.Targets" />
<UsingTask AssemblyFile="$(ProjectDir)..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
<Target Name="ProcessConfigurationFiles" AfterTargets="CopyAllFilesToSingleFolderForMsdeploy">
<PropertyGroup>
<PackageTmp>$(ProjectDir)obj\Release\Package\PackageTmp</PackageTmp>
</PropertyGroup>
<!-- extra processing of the staged config files -->
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/compilation/#debug" Value="false" />
<XmlDelete XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/trust" />
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/machineKey/#validationKey" Value="AutoGenerate" />
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/machineKey/#decryptionKey" Value="AutoGenerate" />
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender/immediateFlush/#value" Value="false" />
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger/priority/#value" Value="ERROR" />
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/root/priority/#value" Value="ERROR" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[#name='debug-file']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[#name='debugger']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[#name='error-file']/filter" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger[#name='Orchard.Localization']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger[#name='Orchard']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/root/appender-ref[#ref='debug-file']" />
<!-- disable all file monitoring but ExtensionMonitoringCorrdinator to detect new modules/themes -->
<XmlUpdate XmlFileName="$(PackageTmp)\Config\HostComponents.config" XPath="/HostComponents/Components/Component/Properties/Property[#Name='DisableMonitoring']/#Value" Value="true" />
</Target>
The closest ting i can find on this, is this thread:
http://orchard.codeplex.com/workitem/19688
and i have tried those advices, but it keeps failing.
Does anyone have a solution for this?
THX in advance.
/Will.
I found the solution.
Please change following path to =>
<UsingTask AssemblyFile="C:\Users\Shaun\Documents\#GitHub\CertifiedOverheadCrane\orchard1x\src\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll"
TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
Original:
<!--<UsingTask AssemblyFile="$(ProjectDir)\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll"
TaskName="MSBuild.Orchard.Tasks.XmlDelete" />-->
Don't forget to restart VS.
The solution to my problem was that i had only built the project in "Debug" configuration, while my publishing option was looking for "Release". So I only changed it to "Release" in the Solutions Configurations and pressed --> Build/Build Solution. That worked!
/Will.