Compare commits
No commits in common. "master" and "ver/1.0" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
|
/*.opensdf
|
||||||
/*.sdf
|
/*.sdf
|
||||||
/*.suo
|
/*.suo
|
||||||
/.vs
|
|
||||||
/ipch
|
/ipch
|
||||||
*.user
|
*.user
|
||||||
temp
|
temp
|
||||||
|
Binary file not shown.
@ -1,5 +1,9 @@
|
|||||||
@echo off
|
@echo off
|
||||||
nmake.exe /ls All LANG=en_US CFG=Debug PLAT=Win32
|
nmake.exe /ls All LANG=En CFG=Debug PLAT=Win32
|
||||||
nmake.exe /ls All LANG=en_US CFG=Debug PLAT=x64
|
nmake.exe /ls All LANG=Sl CFG=Debug PLAT=Win32
|
||||||
nmake.exe /ls All LANG=en_US CFG=Release PLAT=Win32
|
nmake.exe /ls All LANG=En CFG=Debug PLAT=x64
|
||||||
nmake.exe /ls All LANG=en_US CFG=Release PLAT=x64
|
nmake.exe /ls All LANG=Sl CFG=Debug PLAT=x64
|
||||||
|
nmake.exe /ls All LANG=En CFG=Release PLAT=Win32
|
||||||
|
nmake.exe /ls All LANG=Sl CFG=Release PLAT=Win32
|
||||||
|
nmake.exe /ls All LANG=En CFG=Release PLAT=x64
|
||||||
|
nmake.exe /ls All LANG=Sl CFG=Release PLAT=x64
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
@echo off
|
@echo off
|
||||||
nmake.exe /ls Clean LANG=en_US CFG=Debug PLAT=Win32
|
nmake.exe /ls Clean LANG=En CFG=Debug PLAT=Win32
|
||||||
nmake.exe /ls Clean LANG=en_US CFG=Debug PLAT=x64
|
nmake.exe /ls Clean LANG=Sl CFG=Debug PLAT=Win32
|
||||||
nmake.exe /ls Clean LANG=en_US CFG=Release PLAT=Win32
|
nmake.exe /ls Clean LANG=En CFG=Debug PLAT=x64
|
||||||
nmake.exe /ls Clean LANG=en_US CFG=Release PLAT=x64
|
nmake.exe /ls Clean LANG=Sl CFG=Debug PLAT=x64
|
||||||
|
nmake.exe /ls Clean LANG=En CFG=Release PLAT=Win32
|
||||||
|
nmake.exe /ls Clean LANG=Sl CFG=Release PLAT=Win32
|
||||||
|
nmake.exe /ls Clean LANG=En CFG=Release PLAT=x64
|
||||||
|
nmake.exe /ls Clean LANG=Sl CFG=Release PLAT=x64
|
||||||
|
25
MSICALib.sln
25
MSICALib.sln
@ -1,37 +1,36 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio 2010
|
||||||
VisualStudioVersion = 16.0.29728.190
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MSICALib", "build\MSICALib.vcxproj", "{8552EE55-177E-4F51-B51B-BAF7D6462CDE}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MSICALib", "build\MSICALib.vcxproj", "{8552EE55-177E-4F51-B51B-BAF7D6462CDE}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "atlex", "..\atlex\build\atlex.vcxproj", "{5A4EADF2-3237-457A-9DA8-BB9942A91019}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|ARM64 = Debug|ARM64
|
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
Release|ARM64 = Release|ARM64
|
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
Release|x64 = Release|x64
|
Release|x64 = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|ARM64.Build.0 = Debug|ARM64
|
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|Win32.ActiveCfg = Debug|Win32
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|Win32.Build.0 = Debug|Win32
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|x64.ActiveCfg = Debug|x64
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|x64.Build.0 = Debug|x64
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Debug|x64.Build.0 = Debug|x64
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|ARM64.ActiveCfg = Release|ARM64
|
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|ARM64.Build.0 = Release|ARM64
|
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|Win32.ActiveCfg = Release|Win32
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|Win32.Build.0 = Release|Win32
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|Win32.Build.0 = Release|Win32
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|x64.ActiveCfg = Release|x64
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|x64.ActiveCfg = Release|x64
|
||||||
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|x64.Build.0 = Release|x64
|
{8552EE55-177E-4F51-B51B-BAF7D6462CDE}.Release|x64.Build.0 = Release|x64
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{5A4EADF2-3237-457A-9DA8-BB9942A91019}.Release|x64.Build.0 = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {FD46612E-A0D9-4E88-9A26-38DE0813EF45}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
48
build/MSICALib.props
Normal file
48
build/MSICALib.props
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 1991-2016 Amebis
|
||||||
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets" />
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutDir>temp\$(ProjectName).$(Platform).$(Configuration)\</OutDir>
|
||||||
|
<IntDir>temp\$(ProjectName).$(Platform).$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||||
|
<ClCompile>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||||
|
<ClCompile>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>..\include;..\..\atlex\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<LinkTimeCodeGeneration>false</LinkTimeCodeGeneration>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
</Project>
|
@ -1,95 +1,104 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|ARM64">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>ARM64</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>x64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|ARM64">
|
<ProjectConfiguration Include="Release|x64">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>ARM64</Platform>
|
<Platform>x64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
</ItemGroup>
|
||||||
<Configuration>Release</Configuration>
|
<PropertyGroup Label="Globals">
|
||||||
<Platform>Win32</Platform>
|
<ProjectGuid>{8552EE55-177E-4F51-B51B-BAF7D6462CDE}</ProjectGuid>
|
||||||
</ProjectConfiguration>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<ProjectConfiguration Include="Release|x64">
|
<RootNamespace>MSICALib</RootNamespace>
|
||||||
<Configuration>Release</Configuration>
|
<ProjectName>MSICALib</ProjectName>
|
||||||
<Platform>x64</Platform>
|
</PropertyGroup>
|
||||||
</ProjectConfiguration>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
</ItemGroup>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<PropertyGroup Label="Globals">
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<ProjectGuid>{8552EE55-177E-4F51-B51B-BAF7D6462CDE}</ProjectGuid>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<RootNamespace>MSICALib</RootNamespace>
|
<UseOfAtl>Static</UseOfAtl>
|
||||||
<ProjectName>MSICALib</ProjectName>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<PropertyGroup Label="Configuration">
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<UseOfAtl>Static</UseOfAtl>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
</PropertyGroup>
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
</PropertyGroup>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Debug'">
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseOfAtl>Static</UseOfAtl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Platform)'=='ARM64'">
|
<UseOfAtl>Static</UseOfAtl>
|
||||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<ImportGroup Label="ExtensionSettings">
|
||||||
<ImportGroup Label="ExtensionSettings" />
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\..\..\include\$(Platform).props" Condition="exists('..\..\..\include\$(Platform).props')" />
|
<Import Project="..\..\..\include\Win32.props" />
|
||||||
<Import Project="..\..\..\include\$(Configuration).props" Condition="exists('..\..\..\include\$(Configuration).props')" />
|
<Import Project="..\..\..\include\Release.props" />
|
||||||
</ImportGroup>
|
<Import Project="MSICALib.props" />
|
||||||
<PropertyGroup Label="UserMacros" />
|
</ImportGroup>
|
||||||
<PropertyGroup>
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
<OutDir>..\..\..\output\$(Platform).$(Configuration)\</OutDir>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</PropertyGroup>
|
<Import Project="..\..\..\include\Win32.props" />
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
<Import Project="..\..\..\include\Debug.props" />
|
||||||
<ClCompile>
|
<Import Project="MSICALib.props" />
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
</ImportGroup>
|
||||||
</ClCompile>
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
</ItemDefinitionGroup>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
<Import Project="..\..\..\include\x64.props" />
|
||||||
<ClCompile>
|
<Import Project="..\..\..\include\Release.props" />
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<Import Project="MSICALib.props" />
|
||||||
</ClCompile>
|
</ImportGroup>
|
||||||
</ItemDefinitionGroup>
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
<ItemDefinitionGroup>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<ClCompile>
|
<Import Project="..\..\..\include\x64.props" />
|
||||||
<AdditionalIncludeDirectories>..\include;..\..\WinStd\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<Import Project="..\..\..\include\Debug.props" />
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<Import Project="MSICALib.props" />
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
</ImportGroup>
|
||||||
</ClCompile>
|
<PropertyGroup Label="UserMacros" />
|
||||||
</ItemDefinitionGroup>
|
<PropertyGroup>
|
||||||
<ItemGroup>
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
<ClCompile Include="..\src\OpCert.cpp" />
|
</PropertyGroup>
|
||||||
<ClCompile Include="..\src\MSICALib.cpp" />
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\OpFile.cpp" />
|
<ClCompile Include="..\src\OpCert.cpp" />
|
||||||
<ClCompile Include="..\src\OpSvc.cpp" />
|
<ClCompile Include="..\src\MSICALib.cpp" />
|
||||||
<ClCompile Include="..\src\OpTS.cpp" />
|
<ClCompile Include="..\src\OpFile.cpp" />
|
||||||
<ClCompile Include="..\src\OpReg.cpp" />
|
<ClCompile Include="..\src\OpSvc.cpp" />
|
||||||
<ClCompile Include="..\src\OpWLAN.cpp" />
|
<ClCompile Include="..\src\OpTS.cpp" />
|
||||||
<ClCompile Include="..\src\pch.cpp">
|
<ClCompile Include="..\src\OpReg.cpp" />
|
||||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
<ClCompile Include="..\src\OpWLAN.cpp" />
|
||||||
</ClCompile>
|
<ClCompile Include="..\src\stdafx.cpp">
|
||||||
</ItemGroup>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
<ItemGroup>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
<ClInclude Include="..\include\MSICALib.h" />
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
<ClInclude Include="..\src\pch.h" />
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
</ItemGroup>
|
</ClCompile>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
</ItemGroup>
|
||||||
<ImportGroup Label="ExtensionTargets" />
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\include\MSICALib.h" />
|
||||||
|
<ClInclude Include="..\src\stdafx.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\locale\sl_SI.po" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,47 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
<Filter Include="Resource Files">
|
||||||
<ItemGroup>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<ClCompile Include="..\src\MSICALib.cpp">
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
<Filter>Source Files</Filter>
|
</Filter>
|
||||||
</ClCompile>
|
</ItemGroup>
|
||||||
<ClCompile Include="..\src\OpFile.cpp">
|
<ItemGroup>
|
||||||
<Filter>Source Files</Filter>
|
<ClCompile Include="..\src\MSICALib.cpp">
|
||||||
</ClCompile>
|
<Filter>Source Files</Filter>
|
||||||
<ClCompile Include="..\src\OpTS.cpp">
|
</ClCompile>
|
||||||
<Filter>Source Files</Filter>
|
<ClCompile Include="..\src\OpFile.cpp">
|
||||||
</ClCompile>
|
<Filter>Source Files</Filter>
|
||||||
<ClCompile Include="..\src\pch.cpp">
|
</ClCompile>
|
||||||
<Filter>Source Files</Filter>
|
<ClCompile Include="..\src\OpTS.cpp">
|
||||||
</ClCompile>
|
<Filter>Source Files</Filter>
|
||||||
<ClCompile Include="..\src\OpReg.cpp">
|
</ClCompile>
|
||||||
<Filter>Source Files</Filter>
|
<ClCompile Include="..\src\stdafx.cpp">
|
||||||
</ClCompile>
|
<Filter>Source Files</Filter>
|
||||||
<ClCompile Include="..\src\OpCert.cpp">
|
</ClCompile>
|
||||||
<Filter>Source Files</Filter>
|
<ClCompile Include="..\src\OpReg.cpp">
|
||||||
</ClCompile>
|
<Filter>Source Files</Filter>
|
||||||
<ClCompile Include="..\src\OpSvc.cpp">
|
</ClCompile>
|
||||||
<Filter>Source Files</Filter>
|
<ClCompile Include="..\src\OpCert.cpp">
|
||||||
</ClCompile>
|
<Filter>Source Files</Filter>
|
||||||
<ClCompile Include="..\src\OpWLAN.cpp">
|
</ClCompile>
|
||||||
<Filter>Source Files</Filter>
|
<ClCompile Include="..\src\OpSvc.cpp">
|
||||||
</ClCompile>
|
<Filter>Source Files</Filter>
|
||||||
</ItemGroup>
|
</ClCompile>
|
||||||
<ItemGroup>
|
<ClCompile Include="..\src\OpWLAN.cpp">
|
||||||
<ClInclude Include="..\include\MSICALib.h">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Header Files</Filter>
|
</ClCompile>
|
||||||
</ClInclude>
|
</ItemGroup>
|
||||||
<ClInclude Include="..\src\pch.h">
|
<ItemGroup>
|
||||||
<Filter>Header Files</Filter>
|
<ClInclude Include="..\include\MSICALib.h">
|
||||||
</ClInclude>
|
<Filter>Header Files</Filter>
|
||||||
</ItemGroup>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\src\stdafx.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\locale\sl_SI.po">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
1131
include/MSICALib.h
1131
include/MSICALib.h
File diff suppressed because it is too large
Load Diff
@ -1,226 +0,0 @@
|
|||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: MSICALib\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2022-02-17 13:30+0100\n"
|
|
||||||
"PO-Revision-Date: \n"
|
|
||||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
|
||||||
"Language-Team: Amebis, d. o. o., Kamnik <simon.rozman@amebis.si>\n"
|
|
||||||
"Language: sl_SI\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
|
||||||
"X-Poedit-KeywordsList: __\n"
|
|
||||||
"X-Poedit-Basepath: ..\n"
|
|
||||||
"X-Generator: Poedit 2.4.2\n"
|
|
||||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
|
||||||
"X-Poedit-SearchPath-0: MSIBuild\n"
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:4
|
|
||||||
msgid "Error opening installation package. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:5
|
|
||||||
msgid "Error [2] creating task list. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:6
|
|
||||||
msgid "Error [3] writing to \"[2]\" task list file. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:7
|
|
||||||
msgid "Error [3] reading from \"[2]\" task list file. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:8
|
|
||||||
msgid "Error [3] setting \"[2]\" parameter. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:9
|
|
||||||
msgid "Error [3] deleting \"[2]\" file. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:10
|
|
||||||
msgid "Error [4] moving \"[2]\" file to \"[3]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:11
|
|
||||||
msgid "Error [3] creating \"[2]\" scheduled task. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:12
|
|
||||||
msgid "Error [3] deleting \"[2]\" scheduled task. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:13
|
|
||||||
msgid "Error [3] enabling/disabling \"[2]\" scheduled task. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:14
|
|
||||||
msgid "Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:15
|
|
||||||
msgid "Error [3] installing certificate to certificate store \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:16
|
|
||||||
msgid "Error [3] removing certificate from certificate store \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:17
|
|
||||||
msgid "Error [3] changing service \"[2]\" start type. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:18
|
|
||||||
msgid "Error [3] starting service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:19
|
|
||||||
msgid "Error [3] stopping service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:20
|
|
||||||
msgid "Error installing WLAN profiles, because WLAN is not installed. Please, install Wireless LAN Service Windows feature, or contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:21
|
|
||||||
msgid "Error opening WLAN handle, because WLAN AutoConfig service is not started. Please, enable and start WLAN AutoConfig service, or contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:22
|
|
||||||
msgid "Error [2] opening WLAN handle. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:23
|
|
||||||
msgid "WLAN profile \"[2]\" XML data is not UTF-16 encoded. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:24
|
|
||||||
msgid "Error [4] deleting profile \"[3]\" on WLAN interface [2]. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:25
|
|
||||||
msgid "Error [5] renaming profile \"[3]\" to \"[4]\" on WLAN interface [2]. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.ARM64.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.ARM64.Release.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:26
|
|
||||||
msgid "Error [5] setting profile \"[3]\" on WLAN interface [2] (WLAN reason is [4]). Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
218
locale/de_DE.po
218
locale/de_DE.po
@ -1,218 +0,0 @@
|
|||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: MSICALib\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-09-19 08:58+0200\n"
|
|
||||||
"PO-Revision-Date: \n"
|
|
||||||
"Language-Team: German (Germany) (https://www.transifex.com/amebis/teams/91600/de_DE/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: de_DE\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
"X-Generator: Poedit 2.1.1\n"
|
|
||||||
"X-Poedit-Basepath: ..\n"
|
|
||||||
"X-Poedit-KeywordsList: __\n"
|
|
||||||
"X-Poedit-SearchPath-0: MSIBuild\n"
|
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:4
|
|
||||||
msgid ""
|
|
||||||
"Error opening installation package. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:5
|
|
||||||
msgid "Error [2] creating task list. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:6
|
|
||||||
msgid ""
|
|
||||||
"Error [3] writing to \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:7
|
|
||||||
msgid ""
|
|
||||||
"Error [3] reading from \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:8
|
|
||||||
msgid ""
|
|
||||||
"Error [3] setting \"[2]\" parameter. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:9
|
|
||||||
msgid "Error [3] deleting \"[2]\" file. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:10
|
|
||||||
msgid ""
|
|
||||||
"Error [4] moving \"[2]\" file to \"[3]\". Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:11
|
|
||||||
msgid ""
|
|
||||||
"Error [3] creating \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:12
|
|
||||||
msgid ""
|
|
||||||
"Error [3] deleting \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:13
|
|
||||||
msgid ""
|
|
||||||
"Error [3] enabling/disabling \"[2]\" scheduled task. Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:14
|
|
||||||
msgid ""
|
|
||||||
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:15
|
|
||||||
msgid ""
|
|
||||||
"Error [3] installing certificate to certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:16
|
|
||||||
msgid ""
|
|
||||||
"Error [3] removing certificate from certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:17
|
|
||||||
msgid ""
|
|
||||||
"Error [3] changing service \"[2]\" start type. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:18
|
|
||||||
msgid ""
|
|
||||||
"Error [3] starting service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:19
|
|
||||||
msgid ""
|
|
||||||
"Error [3] stopping service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:20
|
|
||||||
msgid ""
|
|
||||||
"Error installing WLAN profiles, because WLAN is not installed. Please, "
|
|
||||||
"install Wireless LAN Service Windows feature, or contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:21
|
|
||||||
msgid ""
|
|
||||||
"Error opening WLAN handle, because WLAN AutoConfig service is not started. "
|
|
||||||
"Please, enable and start WLAN AutoConfig service, or contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:22
|
|
||||||
msgid "Error [2] opening WLAN handle. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:23
|
|
||||||
msgid ""
|
|
||||||
"WLAN profile \"[2]\" XML data is not UTF-16 encoded. Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:24
|
|
||||||
msgid ""
|
|
||||||
"Error [4] deleting profile \"[3]\" on WLAN interface [2]. Please, contact "
|
|
||||||
"your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:25
|
|
||||||
msgid ""
|
|
||||||
"Error [5] renaming profile \"[3]\" to \"[4]\" on WLAN interface [2]. Please,"
|
|
||||||
" contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:26
|
|
||||||
msgid ""
|
|
||||||
"Error [5] setting profile \"[3]\" on WLAN interface [2] (WLAN reason is "
|
|
||||||
"[4]). Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
270
locale/it_IT.po
270
locale/it_IT.po
@ -1,270 +0,0 @@
|
|||||||
# Translators:
|
|
||||||
# Denis Renzi <itis05@virgilio.it>, 2020
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: MSICALib\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-09-19 08:58+0200\n"
|
|
||||||
"PO-Revision-Date: 2018-09-19 09:02+0000\n"
|
|
||||||
"Last-Translator: Denis Renzi <itis05@virgilio.it>, 2020\n"
|
|
||||||
"Language-Team: Italian (Italy) (https://www.transifex.com/amebis/teams/91600/it_IT/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: it_IT\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
"X-Generator: Poedit 2.1.1\n"
|
|
||||||
"X-Poedit-Basepath: ..\n"
|
|
||||||
"X-Poedit-KeywordsList: __\n"
|
|
||||||
"X-Poedit-SearchPath-0: MSIBuild\n"
|
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:4
|
|
||||||
msgid ""
|
|
||||||
"Error opening installation package. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore durante l'apertura del pacchetto di installazione. Si prega di "
|
|
||||||
"contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:5
|
|
||||||
msgid "Error [2] creating task list. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [2] durante la creazione dell'elenco attività. Si prega di contattare"
|
|
||||||
" il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:6
|
|
||||||
msgid ""
|
|
||||||
"Error [3] writing to \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante la scrittura nel file dell'elenco attività \"[2]\". Si "
|
|
||||||
"prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:7
|
|
||||||
msgid ""
|
|
||||||
"Error [3] reading from \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante la lettura dal file dell'elenco attività \"[2]\". Si "
|
|
||||||
"prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:8
|
|
||||||
msgid ""
|
|
||||||
"Error [3] setting \"[2]\" parameter. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante l'impostazione del parametro \"[2]\". Si prega di "
|
|
||||||
"contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:9
|
|
||||||
msgid "Error [3] deleting \"[2]\" file. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante l'eliminazione del file \"[2]\". Si prega di contattare "
|
|
||||||
"il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:10
|
|
||||||
msgid ""
|
|
||||||
"Error [4] moving \"[2]\" file to \"[3]\". Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [4] durante lo spostamento del file \"[2]\" su \"[3]\". Si prega di "
|
|
||||||
"contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:11
|
|
||||||
msgid ""
|
|
||||||
"Error [3] creating \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante la creazione dell'attività \"[2]\" pianificata. Si prega "
|
|
||||||
"di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:12
|
|
||||||
msgid ""
|
|
||||||
"Error [3] deleting \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante l'eliminazione dell'attività pianificata \"[2]\". Si "
|
|
||||||
"prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:13
|
|
||||||
msgid ""
|
|
||||||
"Error [3] enabling/disabling \"[2]\" scheduled task. Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] abilitazione / disabilitazione dell'attività pianificata \"[2]\"."
|
|
||||||
" Si prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:14
|
|
||||||
msgid ""
|
|
||||||
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [4] durante la copia dell'attività pianificata \"[2]\" su \"[3]\". Si"
|
|
||||||
" prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:15
|
|
||||||
msgid ""
|
|
||||||
"Error [3] installing certificate to certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante l'installazione del certificato nell'archivio certificati"
|
|
||||||
" \"[2]\". Si prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:16
|
|
||||||
msgid ""
|
|
||||||
"Error [3] removing certificate from certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante la rimozione del certificato dall'archivio certificati "
|
|
||||||
"\"[2]\". Si prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:17
|
|
||||||
msgid ""
|
|
||||||
"Error [3] changing service \"[2]\" start type. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante la modifica del tipo di avvio del servizio \"[2]\". Si "
|
|
||||||
"prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:18
|
|
||||||
msgid ""
|
|
||||||
"Error [3] starting service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] durante l'avvio del servizio \"[2]\". Si prega di contattare il "
|
|
||||||
"personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:19
|
|
||||||
msgid ""
|
|
||||||
"Error [3] stopping service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [3] arresto del servizio \"[2]\". Si prega di contattare il personale"
|
|
||||||
" di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:20
|
|
||||||
msgid ""
|
|
||||||
"Error installing WLAN profiles, because WLAN is not installed. Please, "
|
|
||||||
"install Wireless LAN Service Windows feature, or contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore durante l'installazione dei profili WLAN, poiché la WLAN non è "
|
|
||||||
"installata. Installa la funzione Windows del servizio LAN wireless o "
|
|
||||||
"contatta il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:21
|
|
||||||
msgid ""
|
|
||||||
"Error opening WLAN handle, because WLAN AutoConfig service is not started. "
|
|
||||||
"Please, enable and start WLAN AutoConfig service, or contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore durante l'apertura dell'handle WLAN, perché il servizio di "
|
|
||||||
"configurazione automatica della WLAN non è stato avviato. Abilitare e "
|
|
||||||
"avviare il servizio di configurazione automatica della WLAN o contattare il "
|
|
||||||
"personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:22
|
|
||||||
msgid "Error [2] opening WLAN handle. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [2] durante l'apertura dell'handle WLAN. Si prega di contattare il "
|
|
||||||
"personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:23
|
|
||||||
msgid ""
|
|
||||||
"WLAN profile \"[2]\" XML data is not UTF-16 encoded. Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"I dati XML del profilo WLAN \"[2]\" non sono codificati UTF-16. Si prega di "
|
|
||||||
"contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:24
|
|
||||||
msgid ""
|
|
||||||
"Error [4] deleting profile \"[3]\" on WLAN interface [2]. Please, contact "
|
|
||||||
"your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [4] durante l'eliminazione del profilo \"[3]\" sull'interfaccia WLAN "
|
|
||||||
"[2]. Si prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:25
|
|
||||||
msgid ""
|
|
||||||
"Error [5] renaming profile \"[3]\" to \"[4]\" on WLAN interface [2]. Please,"
|
|
||||||
" contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [5] che rinomina il profilo \"[3]\" in \"[4]\" sull'interfaccia WLAN "
|
|
||||||
"[2]. Si prega di contattare il personale di supporto."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:26
|
|
||||||
msgid ""
|
|
||||||
"Error [5] setting profile \"[3]\" on WLAN interface [2] (WLAN reason is "
|
|
||||||
"[4]). Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Errore [5] impostazione profilo \"[3]\" sull'interfaccia WLAN [2] (motivo "
|
|
||||||
"WLAN è [4]). Si prega di contattare il personale di supporto."
|
|
218
locale/ru_RU.po
218
locale/ru_RU.po
@ -1,218 +0,0 @@
|
|||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: MSICALib\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-09-19 08:58+0200\n"
|
|
||||||
"PO-Revision-Date: \n"
|
|
||||||
"Language-Team: Russian (Russia) (https://www.transifex.com/amebis/teams/91600/ru_RU/)\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Language: ru_RU\n"
|
|
||||||
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
|
|
||||||
"X-Generator: Poedit 2.1.1\n"
|
|
||||||
"X-Poedit-Basepath: ..\n"
|
|
||||||
"X-Poedit-KeywordsList: __\n"
|
|
||||||
"X-Poedit-SearchPath-0: MSIBuild\n"
|
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:4
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:4
|
|
||||||
msgid ""
|
|
||||||
"Error opening installation package. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:5
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:5
|
|
||||||
msgid "Error [2] creating task list. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:6
|
|
||||||
msgid ""
|
|
||||||
"Error [3] writing to \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:7
|
|
||||||
msgid ""
|
|
||||||
"Error [3] reading from \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:8
|
|
||||||
msgid ""
|
|
||||||
"Error [3] setting \"[2]\" parameter. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:9
|
|
||||||
msgid "Error [3] deleting \"[2]\" file. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:10
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:10
|
|
||||||
msgid ""
|
|
||||||
"Error [4] moving \"[2]\" file to \"[3]\". Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:11
|
|
||||||
msgid ""
|
|
||||||
"Error [3] creating \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:12
|
|
||||||
msgid ""
|
|
||||||
"Error [3] deleting \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:13
|
|
||||||
msgid ""
|
|
||||||
"Error [3] enabling/disabling \"[2]\" scheduled task. Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:14
|
|
||||||
msgid ""
|
|
||||||
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:15
|
|
||||||
msgid ""
|
|
||||||
"Error [3] installing certificate to certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:16
|
|
||||||
msgid ""
|
|
||||||
"Error [3] removing certificate from certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:17
|
|
||||||
msgid ""
|
|
||||||
"Error [3] changing service \"[2]\" start type. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:18
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:18
|
|
||||||
msgid ""
|
|
||||||
"Error [3] starting service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:19
|
|
||||||
msgid ""
|
|
||||||
"Error [3] stopping service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:20
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:20
|
|
||||||
msgid ""
|
|
||||||
"Error installing WLAN profiles, because WLAN is not installed. Please, "
|
|
||||||
"install Wireless LAN Service Windows feature, or contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:21
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:21
|
|
||||||
msgid ""
|
|
||||||
"Error opening WLAN handle, because WLAN AutoConfig service is not started. "
|
|
||||||
"Please, enable and start WLAN AutoConfig service, or contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:22
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:22
|
|
||||||
msgid "Error [2] opening WLAN handle. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:23
|
|
||||||
msgid ""
|
|
||||||
"WLAN profile \"[2]\" XML data is not UTF-16 encoded. Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:24
|
|
||||||
msgid ""
|
|
||||||
"Error [4] deleting profile \"[3]\" on WLAN interface [2]. Please, contact "
|
|
||||||
"your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:25
|
|
||||||
msgid ""
|
|
||||||
"Error [5] renaming profile \"[3]\" to \"[4]\" on WLAN interface [2]. Please,"
|
|
||||||
" contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:26
|
|
||||||
msgid ""
|
|
||||||
"Error [5] setting profile \"[3]\" on WLAN interface [2] (WLAN reason is "
|
|
||||||
"[4]). Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
411
locale/sl_SI.po
411
locale/sl_SI.po
@ -1,165 +1,51 @@
|
|||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: MSICALib\n"
|
"Project-Id-Version: MSICALib\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-09-19 08:58+0200\n"
|
"POT-Creation-Date: 2016-03-14 17:15+0100\n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
||||||
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n"
|
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
||||||
"Language-Team: Slovenian (Slovenia) (https://www.transifex.com/amebis/teams/91600/sl_SI/)\n"
|
"Language-Team: Amebis, d. o. o., Kamnik <simon.rozman@amebis.si>\n"
|
||||||
|
"Language: sl_SI\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Language: sl_SI\n"
|
|
||||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
|
||||||
"X-Generator: Poedit 2.1.1\n"
|
|
||||||
"X-Poedit-Basepath: ..\n"
|
|
||||||
"X-Poedit-KeywordsList: __\n"
|
|
||||||
"X-Poedit-SearchPath-0: MSIBuild\n"
|
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||||||
|
"X-Poedit-KeywordsList: __\n"
|
||||||
|
"X-Poedit-Basepath: ..\n"
|
||||||
|
"X-Generator: Poedit 1.8.7\n"
|
||||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||||
|
"%100==4 ? 2 : 3);\n"
|
||||||
|
"X-Poedit-SearchPath-0: MSIBuild\n"
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:4
|
# Windows charset for this language (decimal)
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:4
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:3
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:4
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:3
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:4
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:3 MSIBuild/En.x64.Release.Error-2.idtx:3
|
||||||
msgid ""
|
msgid "1252"
|
||||||
"Error opening installation package. Please, contact your support personnel."
|
msgstr "1250"
|
||||||
msgstr ""
|
|
||||||
"Pri odpiranju namestitvenega paketa je prišlo do napake. Obrnite se na svojo"
|
|
||||||
" tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:5
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:5
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:5
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:5
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:5
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:5 MSIBuild/En.x64.Release.Error-2.idtx:5
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:5
|
|
||||||
msgid "Error [2] creating task list. Please, contact your support personnel."
|
msgid "Error [2] creating task list. Please, contact your support personnel."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pri pripravi seznama opravil je prišlo do napake [2]. Obrnite se na svojo "
|
"Pri pripravi seznama opravil je prišlo do napake [2]. Obrnite se na svojo "
|
||||||
"tehnično službo."
|
"tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:6
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:22
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:6
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:22
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:6
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:22
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:6
|
#: MSIBuild/En.x64.Release.Error-2.idtx:22
|
||||||
msgid ""
|
msgid "Error [2] opening WLAN handle. Please, contact your support personnel."
|
||||||
"Error [3] writing to \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pri pisanju v datoteko seznama opravil »[2]« je prišlo do napake [3]. "
|
"Pri odpiranju ročice WLAN je prišlo do napake [2]. Obrnite se na svojo "
|
||||||
"Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:7
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:7
|
|
||||||
msgid ""
|
|
||||||
"Error [3] reading from \"[2]\" task list file. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri branju iz datoteke seznama opravil »[2]« je prišlo do napake [3]. "
|
|
||||||
"Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:8
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:8
|
|
||||||
msgid ""
|
|
||||||
"Error [3] setting \"[2]\" parameter. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri nastavljanju parametra »[2]« je prišlo do napake [3]. Obrnite se na "
|
|
||||||
"svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:9
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:9
|
|
||||||
msgid "Error [3] deleting \"[2]\" file. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri brisanju datoteke »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
|
||||||
"tehnično službo."
|
"tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:10
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:17
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:10
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:17
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:10
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:17
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:10
|
#: MSIBuild/En.x64.Release.Error-2.idtx:17
|
||||||
msgid ""
|
|
||||||
"Error [4] moving \"[2]\" file to \"[3]\". Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri premikanju datoteke »[2]« v »[3]« je prišlo do napake [4]. Obrnite se na"
|
|
||||||
" svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:11
|
|
||||||
msgid ""
|
|
||||||
"Error [3] creating \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri stvaritvi razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite "
|
|
||||||
"se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:12
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:12
|
|
||||||
msgid ""
|
|
||||||
"Error [3] deleting \"[2]\" scheduled task. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri brisanju razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite "
|
|
||||||
"se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:13
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:13
|
|
||||||
msgid ""
|
|
||||||
"Error [3] enabling/disabling \"[2]\" scheduled task. Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri o(ne)mogočanju razporejenega opravila »[2]« je prišlo do napake [3]. "
|
|
||||||
"Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:14
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:14
|
|
||||||
msgid ""
|
|
||||||
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your "
|
|
||||||
"support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri kopiranju razporejenega opravila »[2]« v »[3]« je prišlo do napake [4]. "
|
|
||||||
"Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:15
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:15
|
|
||||||
msgid ""
|
|
||||||
"Error [3] installing certificate to certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri nameščanju digitalnega potrdila v shrambo »[2]« je prišlo do napake [3]."
|
|
||||||
" Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:16
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:16
|
|
||||||
msgid ""
|
|
||||||
"Error [3] removing certificate from certificate store \"[2]\". Please, "
|
|
||||||
"contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri odstranjevanju digitalnega potrdila iz shrambe »[2]« je prišlo do napake"
|
|
||||||
" [3]. Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:17
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error [3] changing service \"[2]\" start type. Please, contact your support "
|
"Error [3] changing service \"[2]\" start type. Please, contact your support "
|
||||||
"personnel."
|
"personnel."
|
||||||
@ -167,30 +53,178 @@ msgstr ""
|
|||||||
"Pri nastavljanju servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
"Pri nastavljanju servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
"tehnično službo."
|
"tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:18
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:11
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:18
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:11
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:18
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:11
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:18
|
#: MSIBuild/En.x64.Release.Error-2.idtx:11
|
||||||
|
msgid ""
|
||||||
|
"Error [3] creating \"[2]\" scheduled task. Please, contact your support "
|
||||||
|
"personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri stvaritvi razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite "
|
||||||
|
"se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:9
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:9
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:9 MSIBuild/En.x64.Release.Error-2.idtx:9
|
||||||
|
msgid ""
|
||||||
|
"Error [3] deleting \"[2]\" file. Please, contact your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri brisanju datoteke »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
|
"tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:12
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:12
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:12
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:12
|
||||||
|
msgid ""
|
||||||
|
"Error [3] deleting \"[2]\" scheduled task. Please, contact your support "
|
||||||
|
"personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri brisanju razporejenega opravila »[2]« je prišlo do napake [3]. Obrnite "
|
||||||
|
"se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:13
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:13
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:13
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:13
|
||||||
|
msgid ""
|
||||||
|
"Error [3] enabling/disabling \"[2]\" scheduled task. Please, contact your "
|
||||||
|
"support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri o(ne)mogočanju razporejenega opravila »[2]« je prišlo do napake [3]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:15
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:15
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:15
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:15
|
||||||
|
msgid ""
|
||||||
|
"Error [3] installing certificate to certificate store \"[2]\". Please, "
|
||||||
|
"contact your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri nameščanju digitalnega potrdila v shrambo »[2]« je prišlo do napake [3]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:7
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:7
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:7 MSIBuild/En.x64.Release.Error-2.idtx:7
|
||||||
|
msgid ""
|
||||||
|
"Error [3] reading from \"[2]\" task list file. Please, contact your support "
|
||||||
|
"personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri branju iz datoteke seznama opravil »[2]« je prišlo do napake [3]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:16
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:16
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:16
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:16
|
||||||
|
msgid ""
|
||||||
|
"Error [3] removing certificate from certificate store \"[2]\". Please, "
|
||||||
|
"contact your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri odstranjevanju digitalnega potrdila iz shrambe »[2]« je prišlo do napake "
|
||||||
|
"[3]. Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:8
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:8
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:8 MSIBuild/En.x64.Release.Error-2.idtx:8
|
||||||
|
msgid ""
|
||||||
|
"Error [3] setting \"[2]\" parameter. Please, contact your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri nastavljanju parametra »[2]« je prišlo do napake [3]. Obrnite se na "
|
||||||
|
"svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:18
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:18
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:18
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:18
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error [3] starting service \"[2]\". Please, contact your support personnel."
|
"Error [3] starting service \"[2]\". Please, contact your support personnel."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pri zagonu servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
"Pri zagonu servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
"tehnično službo."
|
"tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:19
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:19
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:19
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:19
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:19
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:19
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:19
|
#: MSIBuild/En.x64.Release.Error-2.idtx:19
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error [3] stopping service \"[2]\". Please, contact your support personnel."
|
"Error [3] stopping service \"[2]\". Please, contact your support personnel."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pri zaustavitvi servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
"Pri zaustavitvi servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
"tehnično službo."
|
"tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:20
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:6
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:20
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:6
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:20
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:6 MSIBuild/En.x64.Release.Error-2.idtx:6
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:20
|
msgid ""
|
||||||
|
"Error [3] writing to \"[2]\" task list file. Please, contact your support "
|
||||||
|
"personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri pisanju v datoteko seznama opravil »[2]« je prišlo do napake [3]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:14
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:14
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:14
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:14
|
||||||
|
msgid ""
|
||||||
|
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your "
|
||||||
|
"support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri kopiranju razporejenega opravila »[2]« v »[3]« je prišlo do napake [4]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:24
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:24
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:24
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:24
|
||||||
|
msgid ""
|
||||||
|
"Error [4] deleting profile \"[3]\" on WLAN interface [2]. Please, contact "
|
||||||
|
"your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri brisanju profila »[3]« na vmesniku WLAN [2] je prišlo do napake [4]. "
|
||||||
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:10
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:10
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:10
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:10
|
||||||
|
msgid ""
|
||||||
|
"Error [4] moving \"[2]\" file to \"[3]\". Please, contact your support "
|
||||||
|
"personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri premikanju datoteke »[2]« v »[3]« je prišlo do napake [4]. Obrnite se na "
|
||||||
|
"svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:25
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:25
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:25
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:25
|
||||||
|
msgid ""
|
||||||
|
"Error [5] renaming profile \"[3]\" to \"[4]\" on WLAN interface [2]. Please, "
|
||||||
|
"contact your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri preimenovanju profila »[3]« v »[4]« na vmesniku WLAN [2] je prišlo do "
|
||||||
|
"napake [5]. Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:26
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:26
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:26
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:26
|
||||||
|
msgid ""
|
||||||
|
"Error [5] setting profile \"[3]\" on WLAN interface [2] (WLAN reason is "
|
||||||
|
"[4]). Please, contact your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri nastavljanju profila »[3]« na vmesniku WLAN [2] je prišlo do napake [5] "
|
||||||
|
"(vzrok WLAN je [4]). Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:20
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:20
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:20
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:20
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error installing WLAN profiles, because WLAN is not installed. Please, "
|
"Error installing WLAN profiles, because WLAN is not installed. Please, "
|
||||||
"install Wireless LAN Service Windows feature, or contact your support "
|
"install Wireless LAN Service Windows feature, or contact your support "
|
||||||
@ -200,10 +234,19 @@ msgstr ""
|
|||||||
"Namestite Windowsov del Wireless LAN Service, ali se obrnite na svojo "
|
"Namestite Windowsov del Wireless LAN Service, ali se obrnite na svojo "
|
||||||
"tehnično službo."
|
"tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:21
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:4
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:21
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:4
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:21
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:4 MSIBuild/En.x64.Release.Error-2.idtx:4
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:21
|
msgid ""
|
||||||
|
"Error opening installation package. Please, contact your support personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri odpiranju namestitvenega paketa je prišlo do napake. Obrnite se na svojo "
|
||||||
|
"tehnično službo."
|
||||||
|
|
||||||
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:21
|
||||||
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:21
|
||||||
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:21
|
||||||
|
#: MSIBuild/En.x64.Release.Error-2.idtx:21
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error opening WLAN handle, because WLAN AutoConfig service is not started. "
|
"Error opening WLAN handle, because WLAN AutoConfig service is not started. "
|
||||||
"Please, enable and start WLAN AutoConfig service, or contact your support "
|
"Please, enable and start WLAN AutoConfig service, or contact your support "
|
||||||
@ -213,55 +256,13 @@ msgstr ""
|
|||||||
"ni zagnana. Omogočite in zaženite storitev WLAN AutoConfig, ali se obrnite "
|
"ni zagnana. Omogočite in zaženite storitev WLAN AutoConfig, ali se obrnite "
|
||||||
"na svojo tehnično službo."
|
"na svojo tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:22
|
#: MSIBuild/En.Win32.Debug.Error-2.idtx:23
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:22
|
#: MSIBuild/En.Win32.Release.Error-2.idtx:23
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:22
|
#: MSIBuild/En.x64.Debug.Error-2.idtx:23
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:22
|
#: MSIBuild/En.x64.Release.Error-2.idtx:23
|
||||||
msgid "Error [2] opening WLAN handle. Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri odpiranju ročice WLAN je prišlo do napake [2]. Obrnite se na svojo "
|
|
||||||
"tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:23
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:23
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"WLAN profile \"[2]\" XML data is not UTF-16 encoded. Please, contact your "
|
"WLAN profile \"[2]\" XML data is not UTF-16 encoded. Please, contact your "
|
||||||
"support personnel."
|
"support personnel."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Zapis XML profila WLAN »[2]« ni zapisan v UTF-16. Obrnite se na svojo "
|
"Zapis XML profila WLAN »[2]« ni zapisan v UTF-16. Obrnite se na svojo "
|
||||||
"tehnično službo."
|
"tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:24
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:24
|
|
||||||
msgid ""
|
|
||||||
"Error [4] deleting profile \"[3]\" on WLAN interface [2]. Please, contact "
|
|
||||||
"your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri brisanju profila »[3]« na vmesniku WLAN [2] je prišlo do napake [4]. "
|
|
||||||
"Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:25
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:25
|
|
||||||
msgid ""
|
|
||||||
"Error [5] renaming profile \"[3]\" to \"[4]\" on WLAN interface [2]. Please,"
|
|
||||||
" contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri preimenovanju profila »[3]« v »[4]« na vmesniku WLAN [2] je prišlo do "
|
|
||||||
"napake [5]. Obrnite se na svojo tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:26
|
|
||||||
#: MSIBuild/en_US.x64.Release.Error-2.idtx:26
|
|
||||||
msgid ""
|
|
||||||
"Error [5] setting profile \"[3]\" on WLAN interface [2] (WLAN reason is "
|
|
||||||
"[4]). Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri nastavljanju profila »[3]« na vmesniku WLAN [2] je prišlo do napake [5] "
|
|
||||||
"(vzrok WLAN je [4]). Obrnite se na svojo tehnično službo."
|
|
||||||
|
202
src/MSICALib.cpp
202
src/MSICALib.cpp
@ -1,12 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#pragma comment(lib, "msi.lib")
|
#pragma comment(lib, "msi.lib")
|
||||||
#pragma comment(lib, "shlwapi.lib")
|
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -20,10 +33,6 @@ COperation::COperation(int iTicks) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
COperation::~COperation()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// COpTypeSingleString
|
// COpTypeSingleString
|
||||||
@ -80,42 +89,65 @@ HRESULT COpRollbackEnable::Execute(CSession *pSession)
|
|||||||
// COpList
|
// COpList
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
COpList::COpList(int iTicks) : COperation(iTicks)
|
COpList::COpList(int iTicks) :
|
||||||
|
COperation(iTicks),
|
||||||
|
ATL::CAtlList<COperation*>(sizeof(COperation*))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD COpList::LoadFromFile(LPCTSTR pszFileName)
|
void COpList::Free()
|
||||||
{
|
{
|
||||||
CStream fSequence(CreateFile(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL));
|
POSITION pos;
|
||||||
if (!fSequence)
|
|
||||||
return GetLastError();
|
for (pos = GetHeadPosition(); pos;) {
|
||||||
|
COperation *pOp = GetNext(pos);
|
||||||
|
COpList *pOpList = dynamic_cast<COpList*>(pOp);
|
||||||
|
|
||||||
|
if (pOpList) {
|
||||||
|
// Recursivelly free sublists.
|
||||||
|
pOpList->Free();
|
||||||
|
}
|
||||||
|
delete pOp;
|
||||||
|
}
|
||||||
|
|
||||||
|
RemoveAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT COpList::LoadFromFile(LPCTSTR pszFileName)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
ATL::CAtlFile fSequence;
|
||||||
|
|
||||||
|
hr = fSequence.Create(pszFileName, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN);
|
||||||
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
// Load operation sequence.
|
// Load operation sequence.
|
||||||
if (!(fSequence >> *this))
|
return fSequence >> *this;
|
||||||
return GetLastError();
|
|
||||||
|
|
||||||
return NO_ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD COpList::SaveToFile(LPCTSTR pszFileName) const
|
HRESULT COpList::SaveToFile(LPCTSTR pszFileName) const
|
||||||
{
|
{
|
||||||
CStream fSequence(CreateFile(pszFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL));
|
HRESULT hr;
|
||||||
if (!fSequence)
|
ATL::CAtlFile fSequence;
|
||||||
return GetLastError();
|
|
||||||
|
hr = fSequence.Create(pszFileName, GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN);
|
||||||
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
// Save execute sequence to file.
|
// Save execute sequence to file.
|
||||||
DWORD dwResult = (fSequence << *this) ? NO_ERROR : GetLastError();
|
hr = fSequence << *this;
|
||||||
fSequence.free();
|
fSequence.Close();
|
||||||
|
|
||||||
if (dwResult != NO_ERROR) ::DeleteFile(pszFileName);
|
if (FAILED(hr)) ::DeleteFile(pszFileName);
|
||||||
return dwResult;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT COpList::Execute(CSession *pSession)
|
HRESULT COpList::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
|
POSITION pos;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
|
|
||||||
@ -129,8 +161,8 @@ HRESULT COpList::Execute(CSession *pSession)
|
|||||||
::MsiRecordSetInteger(hRecordProg, 1, 2);
|
::MsiRecordSetInteger(hRecordProg, 1, 2);
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, 0);
|
::MsiRecordSetInteger(hRecordProg, 3, 0);
|
||||||
|
|
||||||
for (auto op = cbegin(), op_end = cend(); op != op_end; ++op) {
|
for (pos = GetHeadPosition(); pos;) {
|
||||||
COperation *pOp = op->get();
|
COperation *pOp = GetNext(pos);
|
||||||
|
|
||||||
hr = pOp->Execute(pSession);
|
hr = pOp->Execute(pSession);
|
||||||
if (!pSession->m_bContinueOnError && FAILED(hr)) {
|
if (!pSession->m_bContinueOnError && FAILED(hr)) {
|
||||||
@ -141,7 +173,7 @@ HRESULT COpList::Execute(CSession *pSession)
|
|||||||
|
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, pOp->m_iTicks);
|
::MsiRecordSetInteger(hRecordProg, 2, pOp->m_iTicks);
|
||||||
if (::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg) == IDCANCEL)
|
if (::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_PROGRESS, hRecordProg) == IDCANCEL)
|
||||||
return HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
|
return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, m_iTicks);
|
::MsiRecordSetInteger(hRecordProg, 2, m_iTicks);
|
||||||
@ -163,41 +195,48 @@ CSession::CSession() :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CSession::~CSession()
|
||||||
|
{
|
||||||
|
m_olRollback.Free();
|
||||||
|
m_olCommit.Free();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// Helper functions
|
// Helper functions
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
UINT SaveSequence(MSIHANDLE hInstall, LPCTSTR szActionExecute, LPCTSTR szActionCommit, LPCTSTR szActionRollback, const COpList &olExecute)
|
UINT SaveSequence(MSIHANDLE hInstall, LPCTSTR szActionExecute, LPCTSTR szActionCommit, LPCTSTR szActionRollback, const COpList &olExecute)
|
||||||
{
|
{
|
||||||
|
HRESULT hr;
|
||||||
UINT uiResult;
|
UINT uiResult;
|
||||||
DWORD dwResult;
|
ATL::CAtlString sSequenceFilename;
|
||||||
winstd::tstring sSequenceFilename;
|
ATL::CAtlFile fSequence;
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
|
|
||||||
// Prepare our own sequence script file.
|
// Prepare our own sequence script file.
|
||||||
// The InstallCertificates is a deferred custom action, thus all this information will be unavailable to it.
|
// The InstallCertificates is a deferred custom action, thus all this information will be unavailable to it.
|
||||||
// Therefore save all required info to file now.
|
// Therefore save all required info to file now.
|
||||||
{
|
{
|
||||||
std::unique_ptr<TCHAR> szBuffer(new TCHAR[MAX_PATH]);
|
LPTSTR szBuffer = sSequenceFilename.GetBuffer(MAX_PATH);
|
||||||
if (!szBuffer) return ERROR_OUTOFMEMORY;
|
::GetTempPath(MAX_PATH, szBuffer);
|
||||||
::GetTempPath(MAX_PATH, szBuffer.get());
|
::GetTempFileName(szBuffer, _T("MSICA"), 0, szBuffer);
|
||||||
::GetTempFileName(szBuffer.get(), _T("MSICA"), 0, szBuffer.get());
|
sSequenceFilename.ReleaseBuffer();
|
||||||
sSequenceFilename.assign(szBuffer.get(), wcsnlen(szBuffer.get(), MAX_PATH));
|
|
||||||
}
|
}
|
||||||
// Save execute sequence to file.
|
// Save execute sequence to file.
|
||||||
dwResult = olExecute.SaveToFile(sSequenceFilename.c_str());
|
hr = olExecute.SaveToFile(sSequenceFilename);
|
||||||
if (dwResult == NO_ERROR) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Store sequence script file names to properties for deferred custiom actions.
|
// Store sequence script file names to properties for deferred custiom actions.
|
||||||
uiResult = ::MsiSetProperty(hInstall, szActionExecute, sSequenceFilename.c_str());
|
uiResult = ::MsiSetProperty(hInstall, szActionExecute, sSequenceFilename);
|
||||||
if (uiResult == NO_ERROR) {
|
if (uiResult == NO_ERROR) {
|
||||||
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename.c_str());
|
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename);
|
||||||
winstd::tstring sSequenceFilename2;
|
ATL::CAtlString sSequenceFilename2;
|
||||||
|
|
||||||
sprintf(sSequenceFilename2, _T("%.*ls-rb%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
sSequenceFilename2.Format(_T("%.*ls-rb%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
||||||
uiResult = ::MsiSetProperty(hInstall, szActionRollback, sSequenceFilename2.c_str());
|
uiResult = ::MsiSetProperty(hInstall, szActionRollback, sSequenceFilename2);
|
||||||
if (uiResult == NO_ERROR) {
|
if (uiResult == NO_ERROR) {
|
||||||
sprintf(sSequenceFilename2, _T("%.*ls-cm%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
sSequenceFilename2.Format(_T("%.*ls-cm%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
||||||
uiResult = ::MsiSetProperty(hInstall, szActionCommit, sSequenceFilename2.c_str());
|
uiResult = ::MsiSetProperty(hInstall, szActionCommit, sSequenceFilename2);
|
||||||
if (uiResult != NO_ERROR) {
|
if (uiResult != NO_ERROR) {
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_PROPERTY_SET);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_PROPERTY_SET);
|
||||||
::MsiRecordSetString (hRecordProg, 2, szActionCommit );
|
::MsiRecordSetString (hRecordProg, 2, szActionCommit );
|
||||||
@ -216,12 +255,12 @@ UINT SaveSequence(MSIHANDLE hInstall, LPCTSTR szActionExecute, LPCTSTR szActionC
|
|||||||
::MsiRecordSetInteger(hRecordProg, 3, uiResult );
|
::MsiRecordSetInteger(hRecordProg, 3, uiResult );
|
||||||
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
if (uiResult != NO_ERROR) ::DeleteFile(sSequenceFilename.c_str());
|
if (uiResult != NO_ERROR) ::DeleteFile(sSequenceFilename);
|
||||||
} else {
|
} else {
|
||||||
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
||||||
::MsiRecordSetString (hRecordProg, 2, sSequenceFilename.c_str());
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilename);
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,10 +271,9 @@ UINT SaveSequence(MSIHANDLE hInstall, LPCTSTR szActionExecute, LPCTSTR szActionC
|
|||||||
UINT ExecuteSequence(MSIHANDLE hInstall)
|
UINT ExecuteSequence(MSIHANDLE hInstall)
|
||||||
{
|
{
|
||||||
UINT uiResult;
|
UINT uiResult;
|
||||||
DWORD dwResult;
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
winstd::com_initializer com_init(NULL);
|
BOOL bIsCoInitialized = SUCCEEDED(::CoInitialize(NULL));
|
||||||
winstd::tstring sSequenceFilename;
|
ATL::CAtlString sSequenceFilename;
|
||||||
|
|
||||||
uiResult = ::MsiGetProperty(hInstall, _T("CustomActionData"), sSequenceFilename);
|
uiResult = ::MsiGetProperty(hInstall, _T("CustomActionData"), sSequenceFilename);
|
||||||
if (uiResult == NO_ERROR) {
|
if (uiResult == NO_ERROR) {
|
||||||
@ -243,8 +281,8 @@ UINT ExecuteSequence(MSIHANDLE hInstall)
|
|||||||
BOOL bIsCleanup = ::MsiGetMode(hInstall, MSIRUNMODE_COMMIT) || ::MsiGetMode(hInstall, MSIRUNMODE_ROLLBACK);
|
BOOL bIsCleanup = ::MsiGetMode(hInstall, MSIRUNMODE_COMMIT) || ::MsiGetMode(hInstall, MSIRUNMODE_ROLLBACK);
|
||||||
|
|
||||||
// Load operation sequence.
|
// Load operation sequence.
|
||||||
dwResult = lstOperations.LoadFromFile(sSequenceFilename.c_str());
|
hr = lstOperations.LoadFromFile(sSequenceFilename);
|
||||||
if (dwResult == NO_ERROR) {
|
if (SUCCEEDED(hr)) {
|
||||||
MSICA::CSession session;
|
MSICA::CSession session;
|
||||||
|
|
||||||
session.m_hInstall = hInstall;
|
session.m_hInstall = hInstall;
|
||||||
@ -257,51 +295,52 @@ UINT ExecuteSequence(MSIHANDLE hInstall)
|
|||||||
if (!bIsCleanup) {
|
if (!bIsCleanup) {
|
||||||
// Save cleanup scripts of delayed action regardless of action's execution status.
|
// Save cleanup scripts of delayed action regardless of action's execution status.
|
||||||
// Rollback action MUST be scheduled in InstallExecuteSequence before this action! Otherwise cleanup won't be performed in case this action execution failed.
|
// Rollback action MUST be scheduled in InstallExecuteSequence before this action! Otherwise cleanup won't be performed in case this action execution failed.
|
||||||
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename.c_str());
|
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename);
|
||||||
winstd::tstring sSequenceFilenameCM, sSequenceFilenameRB;
|
ATL::CAtlString sSequenceFilenameCM, sSequenceFilenameRB;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
sprintf(sSequenceFilenameRB, _T("%.*ls-rb%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
sSequenceFilenameRB.Format(_T("%.*ls-rb%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
||||||
sprintf(sSequenceFilenameCM, _T("%.*ls-cm%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
sSequenceFilenameCM.Format(_T("%.*ls-cm%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
||||||
|
|
||||||
// After commit, delete rollback file. After rollback, delete commit file.
|
// After commit, delete rollback file. After rollback, delete commit file.
|
||||||
session.m_olCommit.push_back(new MSICA::COpFileDelete(
|
session.m_olCommit.AddTail(new MSICA::COpFileDelete(
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
sSequenceFilenameRB.c_str()
|
sSequenceFilenameRB
|
||||||
#else
|
#else
|
||||||
std::wstring(sSequenceFilenameRB)
|
ATL::CAtlStringW(sSequenceFilenameRB)
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
session.m_olRollback.push_back(new MSICA::COpFileDelete(
|
session.m_olRollback.AddTail(new MSICA::COpFileDelete(
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
sSequenceFilenameCM.c_str()
|
sSequenceFilenameCM
|
||||||
#else
|
#else
|
||||||
std::wstring(sSequenceFilenameCM)
|
ATL::CAtlStringW(sSequenceFilenameCM)
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
||||||
// Save commit file first.
|
// Save commit file first.
|
||||||
dwResult = session.m_olCommit.SaveToFile(sSequenceFilenameCM.c_str());
|
hr = session.m_olCommit.SaveToFile(sSequenceFilenameCM);
|
||||||
if (dwResult == NO_ERROR) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Save rollback file next.
|
// Save rollback file next.
|
||||||
dwResult = session.m_olRollback.SaveToFile(sSequenceFilenameRB.c_str());
|
hr = session.m_olRollback.SaveToFile(sSequenceFilenameRB);
|
||||||
if (dwResult == NO_ERROR) {
|
if (SUCCEEDED(hr)) {
|
||||||
uiResult = NO_ERROR;
|
uiResult = NO_ERROR;
|
||||||
} else {
|
} else {
|
||||||
// Saving rollback file failed.
|
// Saving rollback file failed.
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
||||||
::MsiRecordSetString (hRecordProg, 2, sSequenceFilenameRB.c_str());
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilenameRB);
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Saving commit file failed.
|
// Saving commit file failed.
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
||||||
::MsiRecordSetString (hRecordProg, 2, sSequenceFilenameCM.c_str());
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilenameCM);
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,7 +349,7 @@ UINT ExecuteSequence(MSIHANDLE hInstall)
|
|||||||
session.m_bContinueOnError = TRUE;
|
session.m_bContinueOnError = TRUE;
|
||||||
session.m_bRollbackEnabled = FALSE;
|
session.m_bRollbackEnabled = FALSE;
|
||||||
session.m_olRollback.Execute(&session);
|
session.m_olRollback.Execute(&session);
|
||||||
::DeleteFile(sSequenceFilenameRB.c_str());
|
::DeleteFile(sSequenceFilenameRB);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No cleanup after cleanup support.
|
// No cleanup after cleanup support.
|
||||||
@ -322,8 +361,8 @@ UINT ExecuteSequence(MSIHANDLE hInstall)
|
|||||||
uiResult = HRESULT_CODE(hr);
|
uiResult = HRESULT_CODE(hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
::DeleteFile(sSequenceFilename.c_str());
|
::DeleteFile(sSequenceFilename);
|
||||||
} else if (dwResult == ERROR_FILE_NOT_FOUND && bIsCleanup) {
|
} else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) && bIsCleanup) {
|
||||||
// Sequence file not found and this is rollback/commit action. Either of the following scenarios are possible:
|
// Sequence file not found and this is rollback/commit action. Either of the following scenarios are possible:
|
||||||
// - The delayed action failed to save the rollback/commit file. The delayed action performed cleanup itself. No further action is required.
|
// - The delayed action failed to save the rollback/commit file. The delayed action performed cleanup itself. No further action is required.
|
||||||
// - Somebody removed the rollback/commit file between delayed action and rollback/commit action. No further action is possible.
|
// - Somebody removed the rollback/commit file between delayed action and rollback/commit action. No further action is possible.
|
||||||
@ -332,15 +371,18 @@ UINT ExecuteSequence(MSIHANDLE hInstall)
|
|||||||
// Sequence loading failed. Probably, LOCAL SYSTEM doesn't have read access to user's temp directory.
|
// Sequence loading failed. Probably, LOCAL SYSTEM doesn't have read access to user's temp directory.
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
uiResult = ERROR_INSTALL_SCRIPT_READ;
|
uiResult = ERROR_INSTALL_SCRIPT_READ;
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
||||||
::MsiRecordSetString (hRecordProg, 2, sSequenceFilename.c_str());
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilename);
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lstOperations.Free();
|
||||||
} else {
|
} else {
|
||||||
// Couldn't get CustomActionData property. uiResult has the error code.
|
// Couldn't get CustomActionData property. uiResult has the error code.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bIsCoInitialized) ::CoUninitialize();
|
||||||
return uiResult;
|
return uiResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#pragma comment(lib, "crypt32.lib")
|
#pragma comment(lib, "crypt32.lib")
|
||||||
|
|
||||||
@ -27,9 +41,10 @@ COpCertStore::COpCertStore(LPCWSTR pszStore, DWORD dwEncodingType, DWORD dwFlags
|
|||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
COpCert::COpCert(LPCVOID lpCert, SIZE_T nSize, LPCWSTR pszStore, DWORD dwEncodingType, DWORD dwFlags, int iTicks) :
|
COpCert::COpCert(LPCVOID lpCert, SIZE_T nSize, LPCWSTR pszStore, DWORD dwEncodingType, DWORD dwFlags, int iTicks) :
|
||||||
m_binCert(reinterpret_cast<LPCBYTE>(lpCert), reinterpret_cast<LPCBYTE>(lpCert) + nSize),
|
|
||||||
COpCertStore(pszStore, dwEncodingType, dwFlags, iTicks)
|
COpCertStore(pszStore, dwEncodingType, dwFlags, iTicks)
|
||||||
{
|
{
|
||||||
|
m_binCert.SetCount(nSize);
|
||||||
|
memcpy(m_binCert.GetData(), lpCert, nSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -48,25 +63,25 @@ HRESULT COpCertInstall::Execute(CSession *pSession)
|
|||||||
HCERTSTORE hCertStore;
|
HCERTSTORE hCertStore;
|
||||||
|
|
||||||
// Open certificate store.
|
// Open certificate store.
|
||||||
hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_W, m_dwEncodingType, NULL, m_dwFlags, m_sValue.c_str());
|
hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_W, m_dwEncodingType, NULL, m_dwFlags, m_sValue);
|
||||||
if (hCertStore) {
|
if (hCertStore) {
|
||||||
// Create certificate context.
|
// Create certificate context.
|
||||||
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.data(), static_cast<DWORD>(m_binCert.size()));
|
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.GetData(), (DWORD)(m_binCert.GetCount()));
|
||||||
if (pCertContext) {
|
if (pCertContext) {
|
||||||
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
||||||
std::wstring sCertName;
|
ATL::CAtlStringW sCertName;
|
||||||
|
|
||||||
// Display our custom message in the progress bar.
|
// Display our custom message in the progress bar.
|
||||||
::CertGetNameStringW(pCertContext, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, sCertName);
|
::CertGetNameStringW(pCertContext, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, sCertName);
|
||||||
::MsiRecordSetStringW(hRecordMsg, 1, sCertName.c_str());
|
::MsiRecordSetStringW(hRecordMsg, 1, sCertName);
|
||||||
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
||||||
return HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
|
return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
||||||
|
|
||||||
// Add certificate to certificate store.
|
// Add certificate to certificate store.
|
||||||
if (::CertAddCertificateContextToStore(hCertStore, pCertContext, CERT_STORE_ADD_NEW, NULL)) {
|
if (::CertAddCertificateContextToStore(hCertStore, pCertContext, CERT_STORE_ADD_NEW, NULL)) {
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to delete the certificate.
|
// Order rollback action to delete the certificate.
|
||||||
pSession->m_olRollback.push_front(new COpCertRemove(m_binCert.data(), m_binCert.size(), m_sValue.c_str(), m_dwEncodingType, m_dwFlags));
|
pSession->m_olRollback.AddHead(new COpCertRemove(m_binCert.GetData(), m_binCert.GetCount(), m_sValue, m_dwEncodingType, m_dwFlags));
|
||||||
}
|
}
|
||||||
dwError = NO_ERROR;
|
dwError = NO_ERROR;
|
||||||
} else {
|
} else {
|
||||||
@ -88,10 +103,10 @@ HRESULT COpCertInstall::Execute(CSession *pSession)
|
|||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_CERT_INSTALL);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_CERT_INSTALL);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,20 +126,20 @@ HRESULT COpCertRemove::Execute(CSession *pSession)
|
|||||||
HCERTSTORE hCertStore;
|
HCERTSTORE hCertStore;
|
||||||
|
|
||||||
// Open certificate store.
|
// Open certificate store.
|
||||||
hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_W, m_dwEncodingType, NULL, m_dwFlags, m_sValue.c_str());
|
hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_W, m_dwEncodingType, NULL, m_dwFlags, m_sValue);
|
||||||
if (hCertStore) {
|
if (hCertStore) {
|
||||||
// Create certificate context.
|
// Create certificate context.
|
||||||
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.data(), static_cast<DWORD>(m_binCert.size()));
|
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.GetData(), (DWORD)(m_binCert.GetCount()));
|
||||||
if (pCertContext) {
|
if (pCertContext) {
|
||||||
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
||||||
std::wstring sCertName;
|
ATL::CAtlStringW sCertName;
|
||||||
PCCERT_CONTEXT pCertContextExisting;
|
PCCERT_CONTEXT pCertContextExisting;
|
||||||
|
|
||||||
// Display our custom message in the progress bar.
|
// Display our custom message in the progress bar.
|
||||||
::CertGetNameStringW(pCertContext, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, sCertName);
|
::CertGetNameStringW(pCertContext, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, sCertName);
|
||||||
::MsiRecordSetStringW(hRecordMsg, 1, sCertName.c_str());
|
::MsiRecordSetStringW(hRecordMsg, 1, sCertName);
|
||||||
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
||||||
return HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
|
return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
||||||
|
|
||||||
pCertContextExisting = ::CertFindCertificateInStore(hCertStore, m_dwEncodingType, 0, CERT_FIND_EXISTING, pCertContext, NULL);
|
pCertContextExisting = ::CertFindCertificateInStore(hCertStore, m_dwEncodingType, 0, CERT_FIND_EXISTING, pCertContext, NULL);
|
||||||
if (pCertContextExisting) {
|
if (pCertContextExisting) {
|
||||||
@ -132,7 +147,7 @@ HRESULT COpCertRemove::Execute(CSession *pSession)
|
|||||||
if (::CertDeleteCertificateFromStore(pCertContextExisting)) {
|
if (::CertDeleteCertificateFromStore(pCertContextExisting)) {
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to reinstall the certificate.
|
// Order rollback action to reinstall the certificate.
|
||||||
pSession->m_olRollback.push_front(new COpCertInstall(m_binCert.data(), m_binCert.size(), m_sValue.c_str(), m_dwEncodingType, m_dwFlags));
|
pSession->m_olRollback.AddHead(new COpCertInstall(m_binCert.GetData(), m_binCert.GetCount(), m_sValue, m_dwEncodingType, m_dwFlags));
|
||||||
}
|
}
|
||||||
dwError = NO_ERROR;
|
dwError = NO_ERROR;
|
||||||
} else {
|
} else {
|
||||||
@ -155,10 +170,10 @@ HRESULT COpCertRemove::Execute(CSession *pSession)
|
|||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_CERT_REMOVE);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_CERT_REMOVE);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -23,24 +37,24 @@ HRESULT COpFileDelete::Execute(CSession *pSession)
|
|||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
std::wstring sBackupName;
|
ATL::CAtlStringW sBackupName;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Rename the file to make a backup.
|
// Rename the file to make a backup.
|
||||||
sprintf(sBackupName, L"%ls (orig %u)", m_sValue.c_str(), ++uiCount);
|
sBackupName.Format(L"%ls (orig %u)", (LPCWSTR)m_sValue, ++uiCount);
|
||||||
dwError = ::MoveFileW(m_sValue.c_str(), sBackupName.c_str()) ? NO_ERROR : ::GetLastError();
|
dwError = ::MoveFileW(m_sValue, sBackupName) ? NO_ERROR : ::GetLastError();
|
||||||
} while (dwError == ERROR_ALREADY_EXISTS);
|
} while (dwError == ERROR_ALREADY_EXISTS);
|
||||||
if (dwError == NO_ERROR) {
|
if (dwError == NO_ERROR) {
|
||||||
// Order rollback action to restore from backup copy.
|
// Order rollback action to restore from backup copy.
|
||||||
pSession->m_olRollback.push_front(new COpFileMove(sBackupName.c_str(), m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpFileMove(sBackupName, m_sValue));
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.push_back(new COpFileDelete(sBackupName.c_str()));
|
pSession->m_olCommit.AddTail(new COpFileDelete(sBackupName));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Delete the file.
|
// Delete the file.
|
||||||
dwError = ::DeleteFileW(m_sValue.c_str()) ? NO_ERROR : ::GetLastError();
|
dwError = ::DeleteFileW(m_sValue) ? NO_ERROR : ::GetLastError();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwError == NO_ERROR || dwError == ERROR_FILE_NOT_FOUND)
|
if (dwError == NO_ERROR || dwError == ERROR_FILE_NOT_FOUND)
|
||||||
@ -48,10 +62,10 @@ HRESULT COpFileDelete::Execute(CSession *pSession)
|
|||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_FILE_DELETE);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_FILE_DELETE);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,22 +85,22 @@ HRESULT COpFileMove::Execute(CSession *pSession)
|
|||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
// Move the file.
|
// Move the file.
|
||||||
dwError = ::MoveFileW(m_sValue1.c_str(), m_sValue2.c_str()) ? NO_ERROR : ::GetLastError();
|
dwError = ::MoveFileW(m_sValue1, m_sValue2) ? NO_ERROR : ::GetLastError();
|
||||||
if (dwError == NO_ERROR) {
|
if (dwError == NO_ERROR) {
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to move it back.
|
// Order rollback action to move it back.
|
||||||
pSession->m_olRollback.push_front(new COpFileMove(m_sValue2.c_str(), m_sValue1.c_str()));
|
pSession->m_olRollback.AddHead(new COpFileMove(m_sValue2, m_sValue1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
} else {
|
} else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_FILE_MOVE);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_FILE_MOVE);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue1.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue1 );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2 );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
409
src/OpReg.cpp
409
src/OpReg.cpp
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -44,8 +58,8 @@ HRESULT COpRegKeyCreate::Execute(CSession *pSession)
|
|||||||
{
|
{
|
||||||
LONG lResult;
|
LONG lResult;
|
||||||
REGSAM samAdditional = 0;
|
REGSAM samAdditional = 0;
|
||||||
std::wstring sPartialName;
|
ATL::CAtlStringW sPartialName;
|
||||||
size_t iStart = 0;
|
int iStart = 0;
|
||||||
|
|
||||||
#ifndef _WIN64
|
#ifndef _WIN64
|
||||||
if (IsWow64Process()) {
|
if (IsWow64Process()) {
|
||||||
@ -57,24 +71,24 @@ HRESULT COpRegKeyCreate::Execute(CSession *pSession)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
|
|
||||||
size_t iStartNext = m_sValue.find(L'\\', iStart);
|
int iStartNext = m_sValue.Find(L'\\', iStart);
|
||||||
if (iStartNext != std::wstring::npos)
|
if (iStartNext >= 0)
|
||||||
sPartialName.assign(m_sValue.c_str(), iStartNext);
|
sPartialName.SetString(m_sValue, iStartNext);
|
||||||
else
|
else
|
||||||
sPartialName = m_sValue;
|
sPartialName = m_sValue;
|
||||||
|
|
||||||
// Try to open the key, to see if it exists.
|
// Try to open the key, to see if it exists.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, sPartialName.c_str(), 0, KEY_ENUMERATE_SUB_KEYS | samAdditional, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, sPartialName, 0, KEY_ENUMERATE_SUB_KEYS | samAdditional, &hKey);
|
||||||
if (lResult == ERROR_FILE_NOT_FOUND) {
|
if (lResult == ERROR_FILE_NOT_FOUND) {
|
||||||
// The key doesn't exist yet. Create it.
|
// The key doesn't exist yet. Create it.
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to delete the key. ::RegCreateEx() might create a key but return failure.
|
// Order rollback action to delete the key. ::RegCreateEx() might create a key but return failure.
|
||||||
pSession->m_olRollback.push_front(new COpRegKeyDelete(m_hKeyRoot, sPartialName.c_str()));
|
pSession->m_olRollback.AddHead(new COpRegKeyDelete(m_hKeyRoot, sPartialName));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the key.
|
// Create the key.
|
||||||
lResult = ::RegCreateKeyExW(m_hKeyRoot, sPartialName.c_str(), NULL, NULL, REG_OPTION_NON_VOLATILE, KEY_ENUMERATE_SUB_KEYS | samAdditional, NULL, &hKey, NULL);
|
lResult = ::RegCreateKeyExW(m_hKeyRoot, sPartialName, NULL, NULL, REG_OPTION_NON_VOLATILE, KEY_ENUMERATE_SUB_KEYS | samAdditional, NULL, &hKey, NULL);
|
||||||
if (lResult != NO_ERROR) break;
|
if (lResult != NO_ERROR) break;
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
} else if (lResult == NO_ERROR) {
|
} else if (lResult == NO_ERROR) {
|
||||||
@ -83,7 +97,7 @@ HRESULT COpRegKeyCreate::Execute(CSession *pSession)
|
|||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (iStartNext == std::wstring::npos) break;
|
if (iStartNext < 0) break;
|
||||||
iStart = iStartNext + 1;
|
iStart = iStartNext + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,12 +105,12 @@ HRESULT COpRegKeyCreate::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_CREATE );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_CREATE );
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +133,7 @@ HRESULT COpRegKeyCopy::Execute(CSession *pSession)
|
|||||||
// Delete existing destination key first.
|
// Delete existing destination key first.
|
||||||
// Since deleting registry key is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
// Since deleting registry key is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
||||||
// Don't worry, COpRegKeyDelete::Execute() returns S_OK if key doesn't exist.
|
// Don't worry, COpRegKeyDelete::Execute() returns S_OK if key doesn't exist.
|
||||||
COpRegKeyDelete opDelete(m_hKeyRoot, m_sValue2.c_str());
|
COpRegKeyDelete opDelete(m_hKeyRoot, m_sValue2);
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -133,22 +147,22 @@ HRESULT COpRegKeyCopy::Execute(CSession *pSession)
|
|||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to delete the destination key.
|
// Order rollback action to delete the destination key.
|
||||||
pSession->m_olRollback.push_front(new COpRegKeyDelete(m_hKeyRoot, m_sValue2.c_str()));
|
pSession->m_olRollback.AddHead(new COpRegKeyDelete(m_hKeyRoot, m_sValue2));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the registry key.
|
// Copy the registry key.
|
||||||
lResult = CopyKeyRecursively(m_hKeyRoot, m_sValue1.c_str(), m_sValue2.c_str(), samAdditional);
|
lResult = CopyKeyRecursively(m_hKeyRoot, m_sValue1, m_sValue2, samAdditional);
|
||||||
if (lResult == NO_ERROR)
|
if (lResult == NO_ERROR)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_COPY );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_COPY );
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue1.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue1 );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValue2.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValue2 );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,23 +179,29 @@ LONG COpRegKeyCopy::CopyKeyRecursively(HKEY hKeyRoot, LPCWSTR pszKeyNameSrc, LPC
|
|||||||
{
|
{
|
||||||
DWORD dwSecurityDescriptorSize, dwClassLen = MAX_PATH;
|
DWORD dwSecurityDescriptorSize, dwClassLen = MAX_PATH;
|
||||||
SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
|
SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
|
||||||
std::unique_ptr<WCHAR[]> pszClass(new WCHAR[dwClassLen]);
|
LPWSTR pszClass = new WCHAR[dwClassLen];
|
||||||
if (!pszClass) return ERROR_OUTOFMEMORY;
|
|
||||||
|
|
||||||
// Get source key class length and security descriptor size.
|
// Get source key class length and security descriptor size.
|
||||||
lResult = ::RegQueryInfoKeyW(hKeySrc, pszClass.get(), &dwClassLen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &dwSecurityDescriptorSize, NULL);
|
lResult = ::RegQueryInfoKeyW(hKeySrc, pszClass, &dwClassLen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &dwSecurityDescriptorSize, NULL);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
if (lResult != NO_ERROR) {
|
||||||
pszClass.get()[dwClassLen] = 0;
|
delete [] pszClass;
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
pszClass[dwClassLen] = 0;
|
||||||
|
|
||||||
// Get source key security descriptor.
|
// Get source key security descriptor.
|
||||||
std::unique_ptr<BYTE[]> sd(new BYTE[dwSecurityDescriptorSize]);
|
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)(new BYTE[dwSecurityDescriptorSize]);
|
||||||
if (!sd) return ERROR_OUTOFMEMORY;
|
|
||||||
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)sd.get();
|
|
||||||
lResult = ::RegGetKeySecurity(hKeySrc, DACL_SECURITY_INFORMATION, sa.lpSecurityDescriptor, &dwSecurityDescriptorSize);
|
lResult = ::RegGetKeySecurity(hKeySrc, DACL_SECURITY_INFORMATION, sa.lpSecurityDescriptor, &dwSecurityDescriptorSize);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
if (lResult != NO_ERROR) {
|
||||||
|
delete [] (LPBYTE)(sa.lpSecurityDescriptor);
|
||||||
|
delete [] pszClass;
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
// Create new destination key of the same class and security.
|
// Create new destination key of the same class and security.
|
||||||
lResult = ::RegCreateKeyExW(hKeyRoot, pszKeyNameDst, 0, pszClass.get(), REG_OPTION_NON_VOLATILE, KEY_WRITE | samAdditional, &sa, &hKeyDst, NULL);
|
lResult = ::RegCreateKeyExW(hKeyRoot, pszKeyNameDst, 0, pszClass, REG_OPTION_NON_VOLATILE, KEY_WRITE | samAdditional, &sa, &hKeyDst, NULL);
|
||||||
|
delete [] (LPBYTE)(sa.lpSecurityDescriptor);
|
||||||
|
delete [] pszClass;
|
||||||
if (lResult != NO_ERROR) return lResult;
|
if (lResult != NO_ERROR) return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,80 +214,88 @@ LONG COpRegKeyCopy::CopyKeyRecursively(HKEY hKeySrc, HKEY hKeyDst, REGSAM samAdd
|
|||||||
{
|
{
|
||||||
LONG lResult;
|
LONG lResult;
|
||||||
DWORD dwMaxSubKeyLen, dwMaxValueNameLen, dwMaxClassLen, dwMaxDataSize, dwIndex;
|
DWORD dwMaxSubKeyLen, dwMaxValueNameLen, dwMaxClassLen, dwMaxDataSize, dwIndex;
|
||||||
|
LPWSTR pszName, pszClass;
|
||||||
|
LPBYTE lpData;
|
||||||
|
|
||||||
// Query the source key.
|
// Query the source key.
|
||||||
lResult = ::RegQueryInfoKeyW(hKeySrc, NULL, NULL, NULL, NULL, &dwMaxSubKeyLen, &dwMaxClassLen, NULL, &dwMaxValueNameLen, &dwMaxDataSize, NULL, NULL);
|
lResult = ::RegQueryInfoKeyW(hKeySrc, NULL, NULL, NULL, NULL, &dwMaxSubKeyLen, &dwMaxClassLen, NULL, &dwMaxValueNameLen, &dwMaxDataSize, NULL, NULL);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
if (lResult != NO_ERROR) return lResult;
|
||||||
|
|
||||||
{
|
// Copy values first.
|
||||||
// Copy values first.
|
dwMaxValueNameLen++;
|
||||||
dwMaxValueNameLen++;
|
pszName = new WCHAR[dwMaxValueNameLen];
|
||||||
std::unique_ptr<WCHAR[]> pszName(new WCHAR[dwMaxValueNameLen]);
|
lpData = new BYTE[dwMaxDataSize];
|
||||||
if (!pszName) return ERROR_OUTOFMEMORY;
|
for (dwIndex = 0; ; dwIndex++) {
|
||||||
std::unique_ptr<BYTE[]> lpData(new BYTE[dwMaxDataSize]);
|
DWORD dwNameLen = dwMaxValueNameLen, dwType, dwValueSize = dwMaxDataSize;
|
||||||
if (!lpData) return ERROR_OUTOFMEMORY;
|
|
||||||
for (dwIndex = 0; ; dwIndex++) {
|
|
||||||
DWORD dwNameLen = dwMaxValueNameLen, dwType, dwValueSize = dwMaxDataSize;
|
|
||||||
|
|
||||||
// Read value.
|
// Read value.
|
||||||
lResult = ::RegEnumValueW(hKeySrc, dwIndex, pszName.get(), &dwNameLen, NULL, &dwType, lpData.get(), &dwValueSize);
|
lResult = ::RegEnumValueW(hKeySrc, dwIndex, pszName, &dwNameLen, NULL, &dwType, lpData, &dwValueSize);
|
||||||
if (lResult == ERROR_NO_MORE_ITEMS) break;
|
if (lResult == ERROR_NO_MORE_ITEMS) {
|
||||||
else if (lResult != NO_ERROR ) return lResult;
|
lResult = NO_ERROR;
|
||||||
|
break;
|
||||||
|
} else if (lResult != NO_ERROR)
|
||||||
|
break;
|
||||||
|
|
||||||
// Save value.
|
// Save value.
|
||||||
lResult = ::RegSetValueExW(hKeyDst, pszName.get(), 0, dwType, lpData.get(), dwValueSize);
|
lResult = ::RegSetValueExW(hKeyDst, pszName, 0, dwType, lpData, dwValueSize);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
if (lResult != NO_ERROR)
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
delete [] lpData;
|
||||||
|
delete [] pszName;
|
||||||
|
if (lResult != NO_ERROR) return lResult;
|
||||||
|
|
||||||
{
|
// Iterate over all subkeys and copy them.
|
||||||
// Iterate over all subkeys and copy them.
|
dwMaxSubKeyLen++;
|
||||||
dwMaxSubKeyLen++;
|
pszName = new WCHAR[dwMaxSubKeyLen];
|
||||||
std::unique_ptr<WCHAR[]> pszName(new WCHAR[dwMaxSubKeyLen]);
|
dwMaxClassLen++;
|
||||||
if (!pszName) return ERROR_OUTOFMEMORY;
|
pszClass = new WCHAR[dwMaxClassLen];
|
||||||
dwMaxClassLen++;
|
for (dwIndex = 0; ; dwIndex++) {
|
||||||
std::unique_ptr<WCHAR[]> pszClass(new WCHAR[dwMaxClassLen]);
|
DWORD dwNameLen = dwMaxSubKeyLen, dwClassLen = dwMaxClassLen;
|
||||||
if (!pszClass) return ERROR_OUTOFMEMORY;
|
HKEY hKeySrcSub, hKeyDstSub;
|
||||||
for (dwIndex = 0; ; dwIndex++) {
|
|
||||||
DWORD dwNameLen = dwMaxSubKeyLen, dwClassLen = dwMaxClassLen;
|
|
||||||
HKEY hKeySrcSub, hKeyDstSub;
|
|
||||||
|
|
||||||
// Read subkey.
|
// Read subkey.
|
||||||
lResult = ::RegEnumKeyExW(hKeySrc, dwIndex, pszName.get(), &dwNameLen, NULL, pszClass.get(), &dwClassLen, NULL);
|
lResult = ::RegEnumKeyExW(hKeySrc, dwIndex, pszName, &dwNameLen, NULL, pszClass, &dwClassLen, NULL);
|
||||||
if (lResult == ERROR_NO_MORE_ITEMS) break;
|
if (lResult == ERROR_NO_MORE_ITEMS) {
|
||||||
else if (lResult != NO_ERROR ) return lResult;
|
lResult = NO_ERROR;
|
||||||
|
break;
|
||||||
|
} else if (lResult != NO_ERROR)
|
||||||
|
break;
|
||||||
|
|
||||||
// Open source subkey.
|
// Open source subkey.
|
||||||
lResult = ::RegOpenKeyExW(hKeySrc, pszName.get(), 0, READ_CONTROL | KEY_READ | samAdditional, &hKeySrcSub);
|
lResult = ::RegOpenKeyExW(hKeySrc, pszName, 0, READ_CONTROL | KEY_READ | samAdditional, &hKeySrcSub);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
if (lResult != NO_ERROR) break;
|
||||||
|
|
||||||
{
|
{
|
||||||
DWORD dwSecurityDescriptorSize;
|
DWORD dwSecurityDescriptorSize;
|
||||||
SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
|
SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
|
||||||
|
|
||||||
// Get source subkey security descriptor size.
|
// Get source subkey security descriptor size.
|
||||||
lResult = ::RegQueryInfoKeyW(hKeySrcSub, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &dwSecurityDescriptorSize, NULL);
|
lResult = ::RegQueryInfoKeyW(hKeySrcSub, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &dwSecurityDescriptorSize, NULL);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
if (lResult != NO_ERROR) break;
|
||||||
|
|
||||||
// Get source subkey security descriptor.
|
// Get source subkey security descriptor.
|
||||||
std::unique_ptr<BYTE[]> sd(new BYTE[dwSecurityDescriptorSize]);
|
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)(new BYTE[dwSecurityDescriptorSize]);
|
||||||
if (!sd) return ERROR_OUTOFMEMORY;
|
lResult = ::RegGetKeySecurity(hKeySrc, DACL_SECURITY_INFORMATION, sa.lpSecurityDescriptor, &dwSecurityDescriptorSize);
|
||||||
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)sd.get();
|
if (lResult != NO_ERROR) {
|
||||||
lResult = ::RegGetKeySecurity(hKeySrc, DACL_SECURITY_INFORMATION, sa.lpSecurityDescriptor, &dwSecurityDescriptorSize);
|
delete [] (LPBYTE)(sa.lpSecurityDescriptor);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
break;
|
||||||
|
|
||||||
// Create new destination subkey of the same class and security.
|
|
||||||
lResult = ::RegCreateKeyExW(hKeyDst, pszName.get(), 0, pszClass.get(), REG_OPTION_NON_VOLATILE, KEY_WRITE | samAdditional, &sa, &hKeyDstSub, NULL);
|
|
||||||
if (lResult != NO_ERROR) return lResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy subkey recursively.
|
// Create new destination subkey of the same class and security.
|
||||||
lResult = CopyKeyRecursively(hKeySrcSub, hKeyDstSub, samAdditional);
|
lResult = ::RegCreateKeyExW(hKeyDst, pszName, 0, pszClass, REG_OPTION_NON_VOLATILE, KEY_WRITE | samAdditional, &sa, &hKeyDstSub, NULL);
|
||||||
if (lResult != NO_ERROR) return lResult;
|
delete [] (LPBYTE)(sa.lpSecurityDescriptor);
|
||||||
|
if (lResult != NO_ERROR) break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return NO_ERROR;
|
// Copy subkey recursively.
|
||||||
|
lResult = CopyKeyRecursively(hKeySrcSub, hKeyDstSub, samAdditional);
|
||||||
|
if (lResult != NO_ERROR) break;
|
||||||
|
}
|
||||||
|
delete [] pszClass;
|
||||||
|
delete [] pszName;
|
||||||
|
|
||||||
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -294,62 +322,62 @@ HRESULT COpRegKeyDelete::Execute(CSession *pSession)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Probe to see if the key exists.
|
// Probe to see if the key exists.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 0, DELETE | samAdditional, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue, 0, DELETE | samAdditional, &hKey);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Make a backup of the key first.
|
// Make a backup of the key first.
|
||||||
std::wstring sBackupName;
|
ATL::CAtlStringW sBackupName;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
auto iLength = m_sValue.length();
|
int iLength = m_sValue.GetLength();
|
||||||
|
|
||||||
// Trim trailing backslashes.
|
// Trim trailing backslashes.
|
||||||
while (iLength && m_sValue[iLength - 1] == L'\\') iLength--;
|
while (iLength && m_sValue.GetAt(iLength - 1) == L'\\') iLength--;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
HKEY hKeyTest;
|
HKEY hKey;
|
||||||
sprintf(sBackupName, L"%.*ls (orig %u)", (unsigned int)iLength, m_sValue.c_str(), ++uiCount);
|
sBackupName.Format(L"%.*ls (orig %u)", iLength, (LPCWSTR)m_sValue, ++uiCount);
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, sBackupName.c_str(), 0, KEY_ENUMERATE_SUB_KEYS | samAdditional, &hKeyTest);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, sBackupName, 0, KEY_ENUMERATE_SUB_KEYS | samAdditional, &hKey);
|
||||||
if (lResult != NO_ERROR) break;
|
if (lResult != NO_ERROR) break;
|
||||||
::RegCloseKey(hKeyTest);
|
::RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
if (lResult == ERROR_FILE_NOT_FOUND) {
|
if (lResult == ERROR_FILE_NOT_FOUND) {
|
||||||
// Since copying registry key is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
// Since copying registry key is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
||||||
COpRegKeyCopy opCopy(m_hKeyRoot, m_sValue.c_str(), sBackupName.c_str());
|
COpRegKeyCopy opCopy(m_hKeyRoot, m_sValue, sBackupName);
|
||||||
HRESULT hr = opCopy.Execute(pSession);
|
HRESULT hr = opCopy.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
// Order rollback action to restore the key from backup copy.
|
// Order rollback action to restore the key from backup copy.
|
||||||
pSession->m_olRollback.push_front(new COpRegKeyCopy(m_hKeyRoot, sBackupName.c_str(), m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpRegKeyCopy(m_hKeyRoot, sBackupName, m_sValue));
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.push_back(new COpRegKeyDelete(m_hKeyRoot, sBackupName.c_str()));
|
pSession->m_olCommit.AddTail(new COpRegKeyDelete(m_hKeyRoot, sBackupName));
|
||||||
} else {
|
} else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_PROBING );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_PROBING );
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, sBackupName.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, sBackupName );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the registry key.
|
// Delete the registry key.
|
||||||
lResult = DeleteKeyRecursively(m_hKeyRoot, m_sValue.c_str(), samAdditional);
|
lResult = DeleteKeyRecursively(m_hKeyRoot, m_sValue, samAdditional);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lResult == NO_ERROR || lResult == ERROR_FILE_NOT_FOUND)
|
if (lResult == NO_ERROR || lResult == ERROR_FILE_NOT_FOUND)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_DELETE );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_DELETE );
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,18 +395,20 @@ LONG COpRegKeyDelete::DeleteKeyRecursively(HKEY hKeyRoot, LPCWSTR pszKeyName, RE
|
|||||||
// Determine the largest subkey name.
|
// Determine the largest subkey name.
|
||||||
lResult = ::RegQueryInfoKeyW(hKey, NULL, NULL, NULL, NULL, &dwMaxSubKeyLen, NULL, NULL, NULL, NULL, NULL, NULL);
|
lResult = ::RegQueryInfoKeyW(hKey, NULL, NULL, NULL, NULL, &dwMaxSubKeyLen, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
|
LPWSTR pszSubKeyName;
|
||||||
|
|
||||||
// Prepare buffer to hold the subkey names (including zero terminator).
|
// Prepare buffer to hold the subkey names (including zero terminator).
|
||||||
dwMaxSubKeyLen++;
|
dwMaxSubKeyLen++;
|
||||||
std::unique_ptr<WCHAR[]> pszSubKeyName(new WCHAR[dwMaxSubKeyLen]);
|
pszSubKeyName = new WCHAR[dwMaxSubKeyLen];
|
||||||
if (pszSubKeyName) {
|
if (pszSubKeyName) {
|
||||||
DWORD dwIndex;
|
DWORD dwIndex;
|
||||||
|
|
||||||
// Iterate over all subkeys and delete them. Skip failed.
|
// Iterate over all subkeys and delete them. Skip failed.
|
||||||
for (dwIndex = 0; ;) {
|
for (dwIndex = 0; ;) {
|
||||||
DWORD dwNameLen = dwMaxSubKeyLen;
|
DWORD dwNameLen = dwMaxSubKeyLen;
|
||||||
lResult = ::RegEnumKeyExW(hKey, dwIndex, pszSubKeyName.get(), &dwNameLen, NULL, NULL, NULL, NULL);
|
lResult = ::RegEnumKeyExW(hKey, dwIndex, pszSubKeyName, &dwNameLen, NULL, NULL, NULL, NULL);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
lResult = DeleteKeyRecursively(hKey, pszSubKeyName.get(), samAdditional);
|
lResult = DeleteKeyRecursively(hKey, pszSubKeyName, samAdditional);
|
||||||
if (lResult != NO_ERROR)
|
if (lResult != NO_ERROR)
|
||||||
dwIndex++;
|
dwIndex++;
|
||||||
} else if (lResult == ERROR_NO_MORE_ITEMS) {
|
} else if (lResult == ERROR_NO_MORE_ITEMS) {
|
||||||
@ -387,6 +417,8 @@ LONG COpRegKeyDelete::DeleteKeyRecursively(HKEY hKeyRoot, LPCWSTR pszKeyName, RE
|
|||||||
} else
|
} else
|
||||||
dwIndex++;
|
dwIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete [] pszSubKeyName;
|
||||||
} else
|
} else
|
||||||
lResult = ERROR_OUTOFMEMORY;
|
lResult = ERROR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
@ -440,7 +472,7 @@ COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR
|
|||||||
|
|
||||||
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, DWORD dwData, int iTicks) :
|
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, DWORD dwData, int iTicks) :
|
||||||
m_dwType(REG_DWORD),
|
m_dwType(REG_DWORD),
|
||||||
m_binData(reinterpret_cast<LPCBYTE>(&dwData), reinterpret_cast<LPCBYTE>(&dwData + 1)),
|
m_dwData(dwData),
|
||||||
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -448,15 +480,16 @@ COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR
|
|||||||
|
|
||||||
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, LPCVOID lpData, SIZE_T nSize, int iTicks) :
|
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, LPCVOID lpData, SIZE_T nSize, int iTicks) :
|
||||||
m_dwType(REG_BINARY),
|
m_dwType(REG_BINARY),
|
||||||
m_binData(reinterpret_cast<LPCBYTE>(lpData), reinterpret_cast<LPCBYTE>(lpData) + nSize),
|
|
||||||
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
||||||
{
|
{
|
||||||
|
m_binData.SetCount(nSize);
|
||||||
|
memcpy(m_binData.GetData(), lpData, nSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, LPCWSTR pszData, int iTicks) :
|
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, LPCWSTR pszData, int iTicks) :
|
||||||
m_dwType(REG_SZ),
|
m_dwType(REG_SZ),
|
||||||
m_binData(reinterpret_cast<LPCBYTE>(pszData), reinterpret_cast<LPCBYTE>(pszData + wcslen(pszData) + 1)),
|
m_sData(pszData),
|
||||||
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -464,7 +497,7 @@ COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR
|
|||||||
|
|
||||||
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, DWORDLONG qwData, int iTicks) :
|
COpRegValueCreate::COpRegValueCreate(HKEY hKeyRoot, LPCWSTR pszKeyName, LPCWSTR pszValueName, DWORDLONG qwData, int iTicks) :
|
||||||
m_dwType(REG_QWORD),
|
m_dwType(REG_QWORD),
|
||||||
m_binData(reinterpret_cast<LPCBYTE>(&qwData), reinterpret_cast<LPCBYTE>(&qwData + 1)),
|
m_qwData(qwData),
|
||||||
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -480,7 +513,7 @@ HRESULT COpRegValueCreate::Execute(CSession *pSession)
|
|||||||
// Delete existing value first.
|
// Delete existing value first.
|
||||||
// Since deleting registry value is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
// Since deleting registry value is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
||||||
// Don't worry, COpRegValueDelete::Execute() returns S_OK if key doesn't exist.
|
// Don't worry, COpRegValueDelete::Execute() returns S_OK if key doesn't exist.
|
||||||
COpRegValueDelete opDelete(m_hKeyRoot, m_sValue.c_str(), m_sValueName.c_str());
|
COpRegValueDelete opDelete(m_hKeyRoot, m_sValue, m_sValueName);
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -493,15 +526,41 @@ HRESULT COpRegValueCreate::Execute(CSession *pSession)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Open the key.
|
// Open the key.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 0, sam, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue, 0, sam, &hKey);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to delete the value.
|
// Order rollback action to delete the value.
|
||||||
pSession->m_olRollback.push_front(new COpRegValueDelete(m_hKeyRoot, m_sValue.c_str(), m_sValueName.c_str()));
|
pSession->m_olRollback.AddHead(new COpRegValueDelete(m_hKeyRoot, m_sValue, m_sValueName));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the registry value.
|
// Set the registry value.
|
||||||
lResult = ::RegSetValueExW(hKey, m_sValueName.c_str(), 0, m_dwType, m_binData.data(), static_cast<DWORD>(m_binData.size() * sizeof(BYTE)));
|
switch (m_dwType) {
|
||||||
|
case REG_SZ:
|
||||||
|
case REG_EXPAND_SZ:
|
||||||
|
case REG_LINK:
|
||||||
|
lResult = ::RegSetValueExW(hKey, m_sValueName, 0, m_dwType, (const BYTE*)(LPCWSTR)m_sData, (m_sData.GetLength() + 1) * sizeof(WCHAR)); break;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case REG_BINARY:
|
||||||
|
lResult = ::RegSetValueExW(hKey, m_sValueName, 0, m_dwType, m_binData.GetData(), (DWORD)m_binData.GetCount() * sizeof(BYTE)); break;
|
||||||
|
|
||||||
|
case REG_DWORD_LITTLE_ENDIAN:
|
||||||
|
case REG_DWORD_BIG_ENDIAN:
|
||||||
|
lResult = ::RegSetValueExW(hKey, m_sValueName, 0, m_dwType, (const BYTE*)&m_dwData, sizeof(DWORD)); break;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case REG_MULTI_SZ:
|
||||||
|
lResult = ::RegSetValueExW(hKey, m_sValueName, 0, m_dwType, (const BYTE*)m_szData.GetData(), (DWORD)m_szData.GetCount() * sizeof(WCHAR)); break;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case REG_QWORD_LITTLE_ENDIAN:
|
||||||
|
lResult = ::RegSetValueExW(hKey, m_sValueName, 0, m_dwType, (const BYTE*)&m_qwData, sizeof(DWORDLONG)); break;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
lResult = ERROR_UNSUPPORTED_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,13 +568,13 @@ HRESULT COpRegValueCreate::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_SETVALUE );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_SETVALUE);
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,7 +598,7 @@ HRESULT COpRegValueCopy::Execute(CSession *pSession)
|
|||||||
// Delete existing destination value first.
|
// Delete existing destination value first.
|
||||||
// Since deleting registry value is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
// Since deleting registry value is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
||||||
// Don't worry, COpRegValueDelete::Execute() returns S_OK if key doesn't exist.
|
// Don't worry, COpRegValueDelete::Execute() returns S_OK if key doesn't exist.
|
||||||
COpRegValueDelete opDelete(m_hKeyRoot, m_sValue.c_str(), m_sValueName2.c_str());
|
COpRegValueDelete opDelete(m_hKeyRoot, m_sValue, m_sValueName2);
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -552,28 +611,26 @@ HRESULT COpRegValueCopy::Execute(CSession *pSession)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Open the key.
|
// Open the key.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 0, sam, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue, 0, sam, &hKey);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
DWORD dwType, dwSize;
|
DWORD dwType, dwSize;
|
||||||
|
|
||||||
// Query the source registry value size.
|
// Query the source registry value size.
|
||||||
lResult = ::RegQueryValueExW(hKey, m_sValueName1.c_str(), 0, NULL, NULL, &dwSize);
|
lResult = ::RegQueryValueExW(hKey, m_sValueName1, 0, NULL, NULL, &dwSize);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
|
LPBYTE lpData = new BYTE[dwSize];
|
||||||
// Read the source registry value.
|
// Read the source registry value.
|
||||||
std::unique_ptr<BYTE> lpData(new BYTE[dwSize]);
|
lResult = ::RegQueryValueExW(hKey, m_sValueName1, 0, &dwType, lpData, &dwSize);
|
||||||
if (lpData) {
|
if (lResult == NO_ERROR) {
|
||||||
lResult = ::RegQueryValueExW(hKey, m_sValueName1.c_str(), 0, &dwType, lpData.get(), &dwSize);
|
if (pSession->m_bRollbackEnabled) {
|
||||||
if (lResult == NO_ERROR) {
|
// Order rollback action to delete the destination copy.
|
||||||
if (pSession->m_bRollbackEnabled) {
|
pSession->m_olRollback.AddHead(new COpRegValueDelete(m_hKeyRoot, m_sValue, m_sValueName2));
|
||||||
// Order rollback action to delete the destination copy.
|
|
||||||
pSession->m_olRollback.push_front(new COpRegValueDelete(m_hKeyRoot, m_sValue.c_str(), m_sValueName2.c_str()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Store the value to destination.
|
|
||||||
lResult = ::RegSetValueExW(hKey, m_sValueName2.c_str(), 0, dwType, lpData.get(), dwSize);
|
|
||||||
}
|
}
|
||||||
} else
|
|
||||||
lResult = ERROR_OUTOFMEMORY;
|
// Store the value to destination.
|
||||||
|
lResult = ::RegSetValueExW(hKey, m_sValueName2, 0, dwType, lpData, dwSize);
|
||||||
|
}
|
||||||
|
delete [] lpData;
|
||||||
}
|
}
|
||||||
|
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
@ -583,14 +640,14 @@ HRESULT COpRegValueCopy::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(6);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(6);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_COPYVALUE );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_COPYVALUE);
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName1.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName1 );
|
||||||
::MsiRecordSetStringW(hRecordProg, 5, m_sValueName2.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 5, m_sValueName2 );
|
||||||
::MsiRecordSetInteger(hRecordProg, 6, lResult );
|
::MsiRecordSetInteger(hRecordProg, 6, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,26 +675,26 @@ HRESULT COpRegValueDelete::Execute(CSession *pSession)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Open the key.
|
// Open the key.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 0, sam, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue, 0, sam, &hKey);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
DWORD dwType;
|
DWORD dwType;
|
||||||
|
|
||||||
// See if the value exists at all.
|
// See if the value exists at all.
|
||||||
lResult = ::RegQueryValueExW(hKey, m_sValueName.c_str(), 0, &dwType, NULL, NULL);
|
lResult = ::RegQueryValueExW(hKey, m_sValueName, 0, &dwType, NULL, NULL);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Make a backup of the value first.
|
// Make a backup of the value first.
|
||||||
std::wstring sBackupName;
|
ATL::CAtlStringW sBackupName;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
sprintf(sBackupName, L"%ls (orig %u)", m_sValueName.c_str(), ++uiCount);
|
sBackupName.Format(L"%ls (orig %u)", (LPCWSTR)m_sValueName, ++uiCount);
|
||||||
lResult = ::RegQueryValueExW(hKey, sBackupName.c_str(), 0, &dwType, NULL, NULL);
|
lResult = ::RegQueryValueExW(hKey, sBackupName, 0, &dwType, NULL, NULL);
|
||||||
if (lResult != NO_ERROR) break;
|
if (lResult != NO_ERROR) break;
|
||||||
}
|
}
|
||||||
if (lResult == ERROR_FILE_NOT_FOUND) {
|
if (lResult == ERROR_FILE_NOT_FOUND) {
|
||||||
// Since copying registry value is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
// Since copying registry value is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
||||||
COpRegValueCopy opCopy(m_hKeyRoot, m_sValue.c_str(), m_sValueName.c_str(), sBackupName.c_str());
|
COpRegValueCopy opCopy(m_hKeyRoot, m_sValue, m_sValueName, sBackupName);
|
||||||
HRESULT hr = opCopy.Execute(pSession);
|
HRESULT hr = opCopy.Execute(pSession);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
@ -645,25 +702,25 @@ HRESULT COpRegValueDelete::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Order rollback action to restore the key from backup copy.
|
// Order rollback action to restore the key from backup copy.
|
||||||
pSession->m_olRollback.push_front(new COpRegValueCopy(m_hKeyRoot, m_sValue.c_str(), sBackupName.c_str(), m_sValueName.c_str()));
|
pSession->m_olRollback.AddHead(new COpRegValueCopy(m_hKeyRoot, m_sValue, sBackupName, m_sValueName));
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.push_back(new COpRegValueDelete(m_hKeyRoot, m_sValue.c_str(), sBackupName.c_str()));
|
pSession->m_olCommit.AddTail(new COpRegValueDelete(m_hKeyRoot, m_sValue, sBackupName));
|
||||||
} else {
|
} else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_PROBINGVAL );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_PROBINGVAL);
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, sBackupName.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, sBackupName );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the registry value.
|
// Delete the registry value.
|
||||||
lResult = ::RegDeleteValueW(hKey, m_sValueName.c_str());
|
lResult = ::RegDeleteValueW(hKey, m_sValueName);
|
||||||
}
|
}
|
||||||
|
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
@ -673,13 +730,13 @@ HRESULT COpRegValueDelete::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_DELETEVALUE );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_REGKEY_DELETEVALUE);
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (UINT)m_hKeyRoot & 0x7fffffff );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(lResult);
|
return AtlHresultFromWin32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#pragma comment(lib, "advapi32.lib")
|
#pragma comment(lib, "advapi32.lib")
|
||||||
|
|
||||||
@ -32,7 +46,7 @@ HRESULT COpSvcSetStart::Execute(CSession *pSession)
|
|||||||
SC_HANDLE hService;
|
SC_HANDLE hService;
|
||||||
|
|
||||||
// Open the specified service.
|
// Open the specified service.
|
||||||
hService = ::OpenServiceW(hSCM, m_sValue.c_str(), SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG);
|
hService = ::OpenServiceW(hSCM, m_sValue, SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG);
|
||||||
if (hService) {
|
if (hService) {
|
||||||
QUERY_SERVICE_CONFIG *sc;
|
QUERY_SERVICE_CONFIG *sc;
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
@ -48,7 +62,7 @@ HRESULT COpSvcSetStart::Execute(CSession *pSession)
|
|||||||
if (::ChangeServiceConfig(hService, SERVICE_NO_CHANGE, m_dwStartType, SERVICE_NO_CHANGE, NULL, NULL, NULL, NULL, NULL, NULL, NULL)) {
|
if (::ChangeServiceConfig(hService, SERVICE_NO_CHANGE, m_dwStartType, SERVICE_NO_CHANGE, NULL, NULL, NULL, NULL, NULL, NULL, NULL)) {
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to revert the service start change.
|
// Order rollback action to revert the service start change.
|
||||||
pSession->m_olRollback.push_front(new COpSvcSetStart(m_sValue.c_str(), sc->dwStartType));
|
pSession->m_olRollback.AddHead(new COpSvcSetStart(m_sValue, sc->dwStartType));
|
||||||
}
|
}
|
||||||
dwError = NO_ERROR;
|
dwError = NO_ERROR;
|
||||||
} else
|
} else
|
||||||
@ -73,10 +87,10 @@ HRESULT COpSvcSetStart::Execute(CSession *pSession)
|
|||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_SVC_SET_START);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_SVC_SET_START);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,14 +164,14 @@ HRESULT COpSvcStart::Execute(CSession *pSession)
|
|||||||
SC_HANDLE hService;
|
SC_HANDLE hService;
|
||||||
|
|
||||||
// Open the specified service.
|
// Open the specified service.
|
||||||
hService = ::OpenServiceW(hSCM, m_sValue.c_str(), SERVICE_START | (m_bWait ? SERVICE_QUERY_STATUS : 0));
|
hService = ::OpenServiceW(hSCM, m_sValue, SERVICE_START | (m_bWait ? SERVICE_QUERY_STATUS : 0));
|
||||||
if (hService) {
|
if (hService) {
|
||||||
// Start the service.
|
// Start the service.
|
||||||
if (::StartService(hService, 0, NULL)) {
|
if (::StartService(hService, 0, NULL)) {
|
||||||
dwError = m_bWait ? WaitForState(pSession, hService, SERVICE_START_PENDING, SERVICE_RUNNING) : NO_ERROR;
|
dwError = m_bWait ? WaitForState(pSession, hService, SERVICE_START_PENDING, SERVICE_RUNNING) : NO_ERROR;
|
||||||
if (dwError == NO_ERROR && pSession->m_bRollbackEnabled) {
|
if (dwError == NO_ERROR && pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to stop the service.
|
// Order rollback action to stop the service.
|
||||||
pSession->m_olRollback.push_front(new COpSvcStop(m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpSvcStop(m_sValue));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dwError = ::GetLastError();
|
dwError = ::GetLastError();
|
||||||
@ -176,10 +190,10 @@ HRESULT COpSvcStart::Execute(CSession *pSession)
|
|||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_SVC_START);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_SVC_START);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +218,7 @@ HRESULT COpSvcStop::Execute(CSession *pSession)
|
|||||||
SC_HANDLE hService;
|
SC_HANDLE hService;
|
||||||
|
|
||||||
// Open the specified service.
|
// Open the specified service.
|
||||||
hService = ::OpenServiceW(hSCM, m_sValue.c_str(), SERVICE_STOP | (m_bWait ? SERVICE_QUERY_STATUS : 0));
|
hService = ::OpenServiceW(hSCM, m_sValue, SERVICE_STOP | (m_bWait ? SERVICE_QUERY_STATUS : 0));
|
||||||
if (hService) {
|
if (hService) {
|
||||||
SERVICE_STATUS ss;
|
SERVICE_STATUS ss;
|
||||||
// Stop the service.
|
// Stop the service.
|
||||||
@ -212,7 +226,7 @@ HRESULT COpSvcStop::Execute(CSession *pSession)
|
|||||||
dwError = m_bWait ? WaitForState(pSession, hService, SERVICE_STOP_PENDING, SERVICE_STOPPED) : NO_ERROR;
|
dwError = m_bWait ? WaitForState(pSession, hService, SERVICE_STOP_PENDING, SERVICE_STOPPED) : NO_ERROR;
|
||||||
if (dwError == NO_ERROR && pSession->m_bRollbackEnabled) {
|
if (dwError == NO_ERROR && pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to start the service.
|
// Order rollback action to start the service.
|
||||||
pSession->m_olRollback.push_front(new COpSvcStart(m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpSvcStart(m_sValue));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dwError = ::GetLastError();
|
dwError = ::GetLastError();
|
||||||
@ -231,10 +245,10 @@ HRESULT COpSvcStop::Execute(CSession *pSession)
|
|||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_SVC_STOP);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_SVC_STOP);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
480
src/OpTS.cpp
480
src/OpTS.cpp
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#pragma comment(lib, "mstask.lib")
|
#pragma comment(lib, "mstask.lib")
|
||||||
#pragma comment(lib, "taskschd.lib")
|
#pragma comment(lib, "taskschd.lib")
|
||||||
@ -26,45 +40,55 @@ COpTaskCreate::COpTaskCreate(LPCWSTR pszTaskName, int iTicks) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
COpTaskCreate::~COpTaskCreate()
|
||||||
|
{
|
||||||
|
// Clear the password in memory.
|
||||||
|
int iLength = m_sPassword.GetLength();
|
||||||
|
::SecureZeroMemory(m_sPassword.GetBuffer(iLength), sizeof(WCHAR) * iLength);
|
||||||
|
m_sPassword.ReleaseBuffer(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT COpTaskCreate::Execute(CSession *pSession)
|
HRESULT COpTaskCreate::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
||||||
winstd::com_obj<ITaskService> pService;
|
CComPtr<ITaskService> pService;
|
||||||
|
POSITION pos;
|
||||||
|
|
||||||
// Display our custom message in the progress bar.
|
// Display our custom message in the progress bar.
|
||||||
::MsiRecordSetStringW(hRecordMsg, 1, m_sValue.c_str());
|
::MsiRecordSetStringW(hRecordMsg, 1, m_sValue);
|
||||||
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
||||||
return HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
|
return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
||||||
|
|
||||||
{
|
{
|
||||||
// Delete existing task first.
|
// Delete existing task first.
|
||||||
// Since task deleting is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
// Since task deleting is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
||||||
// Don't worry, COpTaskDelete::Execute() returns S_OK if task doesn't exist.
|
// Don't worry, COpTaskDelete::Execute() returns S_OK if task doesn't exist.
|
||||||
COpTaskDelete opDelete(m_sValue.c_str());
|
COpTaskDelete opDelete(m_sValue);
|
||||||
hr = opDelete.Execute(pSession);
|
hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
winstd::variant vEmpty;
|
CComVariant vEmpty;
|
||||||
winstd::com_obj<ITaskDefinition> pTaskDefinition;
|
CComPtr<ITaskDefinition> pTaskDefinition;
|
||||||
winstd::com_obj<ITaskSettings> pTaskSettings;
|
CComPtr<ITaskSettings> pTaskSettings;
|
||||||
winstd::com_obj<IPrincipal> pPrincipal;
|
CComPtr<IPrincipal> pPrincipal;
|
||||||
winstd::com_obj<IActionCollection> pActionCollection;
|
CComPtr<IActionCollection> pActionCollection;
|
||||||
winstd::com_obj<IAction> pAction;
|
CComPtr<IAction> pAction;
|
||||||
winstd::com_obj<IIdleSettings> pIdleSettings;
|
CComPtr<IIdleSettings> pIdleSettings;
|
||||||
winstd::com_obj<IExecAction> pExecAction;
|
CComPtr<IExecAction> pExecAction;
|
||||||
winstd::com_obj<IRegistrationInfo> pRegististrationInfo;
|
CComPtr<IRegistrationInfo> pRegististrationInfo;
|
||||||
winstd::com_obj<ITriggerCollection> pTriggerCollection;
|
CComPtr<ITriggerCollection> pTriggerCollection;
|
||||||
winstd::com_obj<ITaskFolder> pTaskFolder;
|
CComPtr<ITaskFolder> pTaskFolder;
|
||||||
winstd::com_obj<IRegisteredTask> pTask;
|
CComPtr<IRegisteredTask> pTask;
|
||||||
std::wstring str;
|
ATL::CAtlStringW str;
|
||||||
UINT iTrigger;
|
UINT iTrigger;
|
||||||
TASK_LOGON_TYPE logonType;
|
TASK_LOGON_TYPE logonType;
|
||||||
winstd::bstr bstrContext(L"Author");
|
CComBSTR bstrContext(L"Author");
|
||||||
|
|
||||||
// Connect to local task service.
|
// Connect to local task service.
|
||||||
hr = pService->Connect(vEmpty, vEmpty, vEmpty, vEmpty);
|
hr = pService->Connect(vEmpty, vEmpty, vEmpty, vEmpty);
|
||||||
@ -82,7 +106,7 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
if (pSession->m_bRollbackEnabled && (m_dwFlags & TASK_FLAG_DISABLED) == 0) {
|
if (pSession->m_bRollbackEnabled && (m_dwFlags & TASK_FLAG_DISABLED) == 0) {
|
||||||
// The task is supposed to be enabled.
|
// The task is supposed to be enabled.
|
||||||
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
||||||
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olCommit.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
||||||
m_dwFlags |= TASK_FLAG_DISABLED;
|
m_dwFlags |= TASK_FLAG_DISABLED;
|
||||||
}
|
}
|
||||||
hr = pTaskSettings->put_Enabled(m_dwFlags & TASK_FLAG_DISABLED ? VARIANT_FALSE : VARIANT_TRUE); if (FAILED(hr)) goto finish;
|
hr = pTaskSettings->put_Enabled(m_dwFlags & TASK_FLAG_DISABLED ? VARIANT_FALSE : VARIANT_TRUE); if (FAILED(hr)) goto finish;
|
||||||
@ -94,28 +118,35 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
// Add execute action.
|
// Add execute action.
|
||||||
hr = pActionCollection->Create(TASK_ACTION_EXEC, &pAction);
|
hr = pActionCollection->Create(TASK_ACTION_EXEC, &pAction);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
hr = pAction.query_interface(&pExecAction);
|
hr = pAction.QueryInterface(&pExecAction);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Configure the action.
|
// Configure the action.
|
||||||
hr = pExecAction->put_Path (winstd::bstr(m_sApplicationName )); if (FAILED(hr)) goto finish;
|
hr = pExecAction->put_Path (CComBSTR(m_sApplicationName )); if (FAILED(hr)) goto finish;
|
||||||
hr = pExecAction->put_Arguments (winstd::bstr(m_sParameters )); if (FAILED(hr)) goto finish;
|
hr = pExecAction->put_Arguments (CComBSTR(m_sParameters )); if (FAILED(hr)) goto finish;
|
||||||
hr = pExecAction->put_WorkingDirectory(winstd::bstr(m_sWorkingDirectory)); if (FAILED(hr)) goto finish;
|
hr = pExecAction->put_WorkingDirectory(CComBSTR(m_sWorkingDirectory)); if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Set task description.
|
// Set task description.
|
||||||
hr = pTaskDefinition->get_RegistrationInfo(&pRegististrationInfo); if (FAILED(hr)) goto finish;
|
hr = pTaskDefinition->get_RegistrationInfo(&pRegististrationInfo);
|
||||||
hr = pRegististrationInfo->put_Author(winstd::bstr(m_sAuthor)); if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
hr = pRegististrationInfo->put_Description(winstd::bstr(m_sComment)); if (FAILED(hr)) goto finish;
|
hr = pRegististrationInfo->put_Author(CComBSTR(m_sAuthor));
|
||||||
|
if (FAILED(hr)) goto finish;
|
||||||
|
hr = pRegististrationInfo->put_Description(CComBSTR(m_sComment));
|
||||||
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Configure task "flags".
|
// Configure task "flags".
|
||||||
if (m_dwFlags & TASK_FLAG_DELETE_WHEN_DONE) {
|
if (m_dwFlags & TASK_FLAG_DELETE_WHEN_DONE) {
|
||||||
hr = pTaskSettings->put_DeleteExpiredTaskAfter(winstd::bstr(L"PT24H"));
|
hr = pTaskSettings->put_DeleteExpiredTaskAfter(CComBSTR(L"PT24H"));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
}
|
}
|
||||||
hr = pTaskSettings->put_Hidden(m_dwFlags & TASK_FLAG_HIDDEN ? VARIANT_TRUE : VARIANT_FALSE); if (FAILED(hr)) goto finish;
|
hr = pTaskSettings->put_Hidden(m_dwFlags & TASK_FLAG_HIDDEN ? VARIANT_TRUE : VARIANT_FALSE);
|
||||||
hr = pTaskSettings->put_WakeToRun(m_dwFlags & TASK_FLAG_SYSTEM_REQUIRED ? VARIANT_TRUE : VARIANT_FALSE); if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
hr = pTaskSettings->put_DisallowStartIfOnBatteries(m_dwFlags & TASK_FLAG_DONT_START_IF_ON_BATTERIES ? VARIANT_TRUE : VARIANT_FALSE); if (FAILED(hr)) goto finish;
|
hr = pTaskSettings->put_WakeToRun(m_dwFlags & TASK_FLAG_SYSTEM_REQUIRED ? VARIANT_TRUE : VARIANT_FALSE);
|
||||||
hr = pTaskSettings->put_StopIfGoingOnBatteries(m_dwFlags & TASK_FLAG_KILL_IF_GOING_ON_BATTERIES ? VARIANT_TRUE : VARIANT_FALSE); if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
hr = pTaskSettings->put_DisallowStartIfOnBatteries(m_dwFlags & TASK_FLAG_DONT_START_IF_ON_BATTERIES ? VARIANT_TRUE : VARIANT_FALSE);
|
||||||
|
if (FAILED(hr)) goto finish;
|
||||||
|
hr = pTaskSettings->put_StopIfGoingOnBatteries(m_dwFlags & TASK_FLAG_KILL_IF_GOING_ON_BATTERIES ? VARIANT_TRUE : VARIANT_FALSE);
|
||||||
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Configure task priority.
|
// Configure task priority.
|
||||||
hr = pTaskSettings->put_Priority(
|
hr = pTaskSettings->put_Priority(
|
||||||
@ -131,36 +162,38 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
hr = pTaskDefinition->get_Principal(&pPrincipal);
|
hr = pTaskDefinition->get_Principal(&pPrincipal);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
if (m_sAccountName.empty()) {
|
if (m_sAccountName.IsEmpty()) {
|
||||||
logonType = TASK_LOGON_SERVICE_ACCOUNT;
|
logonType = TASK_LOGON_SERVICE_ACCOUNT;
|
||||||
hr = pPrincipal->put_LogonType(logonType); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_LogonType(logonType); if (FAILED(hr)) goto finish;
|
||||||
hr = pPrincipal->put_UserId(winstd::bstr(L"S-1-5-18")); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_UserId(CComBSTR(L"S-1-5-18")); if (FAILED(hr)) goto finish;
|
||||||
hr = pPrincipal->put_RunLevel(TASK_RUNLEVEL_HIGHEST); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_RunLevel(TASK_RUNLEVEL_HIGHEST); if (FAILED(hr)) goto finish;
|
||||||
} else if (m_dwFlags & TASK_FLAG_RUN_ONLY_IF_LOGGED_ON) {
|
} else if (m_dwFlags & TASK_FLAG_RUN_ONLY_IF_LOGGED_ON) {
|
||||||
logonType = TASK_LOGON_INTERACTIVE_TOKEN;
|
logonType = TASK_LOGON_INTERACTIVE_TOKEN;
|
||||||
hr = pPrincipal->put_LogonType(logonType); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_LogonType(logonType); if (FAILED(hr)) goto finish;
|
||||||
hr = pPrincipal->put_RunLevel(TASK_RUNLEVEL_LUA); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_RunLevel(TASK_RUNLEVEL_LUA); if (FAILED(hr)) goto finish;
|
||||||
} else {
|
} else {
|
||||||
logonType = TASK_LOGON_PASSWORD;
|
logonType = TASK_LOGON_PASSWORD;
|
||||||
hr = pPrincipal->put_LogonType(logonType); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_LogonType(logonType); if (FAILED(hr)) goto finish;
|
||||||
hr = pPrincipal->put_UserId(winstd::bstr(m_sAccountName)); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_UserId(CComBSTR(m_sAccountName)); if (FAILED(hr)) goto finish;
|
||||||
hr = pPrincipal->put_RunLevel(TASK_RUNLEVEL_HIGHEST); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_RunLevel(TASK_RUNLEVEL_HIGHEST); if (FAILED(hr)) goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect principal and action collection.
|
// Connect principal and action collection.
|
||||||
hr = pPrincipal->put_Id(bstrContext); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_Id(bstrContext);
|
||||||
hr = pActionCollection->put_Context(bstrContext); if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
hr = pActionCollection->put_Context(bstrContext);
|
||||||
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Configure idle settings.
|
// Configure idle settings.
|
||||||
hr = pTaskSettings->put_RunOnlyIfIdle(m_dwFlags & TASK_FLAG_START_ONLY_IF_IDLE ? VARIANT_TRUE : VARIANT_FALSE);
|
hr = pTaskSettings->put_RunOnlyIfIdle(m_dwFlags & TASK_FLAG_START_ONLY_IF_IDLE ? VARIANT_TRUE : VARIANT_FALSE);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
hr = pTaskSettings->get_IdleSettings(&pIdleSettings);
|
hr = pTaskSettings->get_IdleSettings(&pIdleSettings);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uS", m_wIdleMinutes*60);
|
str.Format(L"PT%uS", m_wIdleMinutes*60);
|
||||||
hr = pIdleSettings->put_IdleDuration(winstd::bstr(str));
|
hr = pIdleSettings->put_IdleDuration(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uS", m_wDeadlineMinutes*60);
|
str.Format(L"PT%uS", m_wDeadlineMinutes*60);
|
||||||
hr = pIdleSettings->put_WaitTimeout(winstd::bstr(str));
|
hr = pIdleSettings->put_WaitTimeout(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
hr = pIdleSettings->put_RestartOnIdle(m_dwFlags & TASK_FLAG_RESTART_ON_IDLE_RESUME ? VARIANT_TRUE : VARIANT_FALSE);
|
hr = pIdleSettings->put_RestartOnIdle(m_dwFlags & TASK_FLAG_RESTART_ON_IDLE_RESUME ? VARIANT_TRUE : VARIANT_FALSE);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
@ -168,8 +201,8 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Configure task runtime limit.
|
// Configure task runtime limit.
|
||||||
sprintf(str, L"PT%uS", m_dwMaxRuntimeMS != INFINITE ? (m_dwMaxRuntimeMS + 500) / 1000 : 0);
|
str.Format(L"PT%uS", m_dwMaxRuntimeMS != INFINITE ? (m_dwMaxRuntimeMS + 500) / 1000 : 0);
|
||||||
hr = pTaskSettings->put_ExecutionTimeLimit(winstd::bstr(str));
|
hr = pTaskSettings->put_ExecutionTimeLimit(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task trigger colection.
|
// Get task trigger colection.
|
||||||
@ -177,57 +210,56 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Add triggers.
|
// Add triggers.
|
||||||
iTrigger = 0;
|
for (pos = m_lTriggers.GetHeadPosition(), iTrigger = 0; pos; iTrigger++) {
|
||||||
for (auto t = m_lTriggers.cbegin(), t_end = m_lTriggers.cend(); t != t_end; ++t, iTrigger++) {
|
CComPtr<ITrigger> pTrigger;
|
||||||
winstd::com_obj<ITrigger> pTrigger;
|
TASK_TRIGGER &ttData = m_lTriggers.GetNext(pos);
|
||||||
const TASK_TRIGGER &ttData = *t;
|
|
||||||
|
|
||||||
switch (ttData.TriggerType) {
|
switch (ttData.TriggerType) {
|
||||||
case TASK_TIME_TRIGGER_ONCE: {
|
case TASK_TIME_TRIGGER_ONCE: {
|
||||||
winstd::com_obj<ITimeTrigger> pTriggerTime;
|
CComPtr<ITimeTrigger> pTriggerTime;
|
||||||
hr = pTriggerCollection->Create(TASK_TRIGGER_TIME, &pTrigger); if (FAILED(hr)) goto finish;
|
hr = pTriggerCollection->Create(TASK_TRIGGER_TIME, &pTrigger); if (FAILED(hr)) goto finish;
|
||||||
hr = pTrigger.query_interface(&pTriggerTime); if (FAILED(hr)) goto finish;
|
hr = pTrigger.QueryInterface(&pTriggerTime); if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerTime->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerTime->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_DAILY: {
|
case TASK_TIME_TRIGGER_DAILY: {
|
||||||
winstd::com_obj<IDailyTrigger> pTriggerDaily;
|
CComPtr<IDailyTrigger> pTriggerDaily;
|
||||||
hr = pTriggerCollection->Create(TASK_TRIGGER_DAILY, &pTrigger); if (FAILED(hr)) goto finish;
|
hr = pTriggerCollection->Create(TASK_TRIGGER_DAILY, &pTrigger); if (FAILED(hr)) goto finish;
|
||||||
hr = pTrigger.query_interface(&pTriggerDaily); if (FAILED(hr)) goto finish;
|
hr = pTrigger.QueryInterface(&pTriggerDaily); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerDaily->put_DaysInterval(ttData.Type.Daily.DaysInterval); if (FAILED(hr)) goto finish;
|
hr = pTriggerDaily->put_DaysInterval(ttData.Type.Daily.DaysInterval); if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerDaily->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerDaily->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_WEEKLY: {
|
case TASK_TIME_TRIGGER_WEEKLY: {
|
||||||
winstd::com_obj<IWeeklyTrigger> pTriggerWeekly;
|
CComPtr<IWeeklyTrigger> pTriggerWeekly;
|
||||||
hr = pTriggerCollection->Create(TASK_TRIGGER_WEEKLY, &pTrigger); if (FAILED(hr)) goto finish;
|
hr = pTriggerCollection->Create(TASK_TRIGGER_WEEKLY, &pTrigger); if (FAILED(hr)) goto finish;
|
||||||
hr = pTrigger.query_interface(&pTriggerWeekly); if (FAILED(hr)) goto finish;
|
hr = pTrigger.QueryInterface(&pTriggerWeekly); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerWeekly->put_WeeksInterval(ttData.Type.Weekly.WeeksInterval); if (FAILED(hr)) goto finish;
|
hr = pTriggerWeekly->put_WeeksInterval(ttData.Type.Weekly.WeeksInterval); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerWeekly->put_DaysOfWeek(ttData.Type.Weekly.rgfDaysOfTheWeek); if (FAILED(hr)) goto finish;
|
hr = pTriggerWeekly->put_DaysOfWeek(ttData.Type.Weekly.rgfDaysOfTheWeek); if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerWeekly->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerWeekly->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_MONTHLYDATE: {
|
case TASK_TIME_TRIGGER_MONTHLYDATE: {
|
||||||
winstd::com_obj<IMonthlyTrigger> pTriggerMonthly;
|
CComPtr<IMonthlyTrigger> pTriggerMonthly;
|
||||||
hr = pTriggerCollection->Create(TASK_TRIGGER_MONTHLY, &pTrigger); if (FAILED(hr)) goto finish;
|
hr = pTriggerCollection->Create(TASK_TRIGGER_MONTHLY, &pTrigger); if (FAILED(hr)) goto finish;
|
||||||
hr = pTrigger.query_interface(&pTriggerMonthly); if (FAILED(hr)) goto finish;
|
hr = pTrigger.QueryInterface(&pTriggerMonthly); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerMonthly->put_DaysOfMonth(ttData.Type.MonthlyDate.rgfDays); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthly->put_DaysOfMonth(ttData.Type.MonthlyDate.rgfDays); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerMonthly->put_MonthsOfYear(ttData.Type.MonthlyDate.rgfMonths); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthly->put_MonthsOfYear(ttData.Type.MonthlyDate.rgfMonths); if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerMonthly->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthly->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_MONTHLYDOW: {
|
case TASK_TIME_TRIGGER_MONTHLYDOW: {
|
||||||
winstd::com_obj<IMonthlyDOWTrigger> pTriggerMonthlyDOW;
|
CComPtr<IMonthlyDOWTrigger> pTriggerMonthlyDOW;
|
||||||
hr = pTriggerCollection->Create(TASK_TRIGGER_MONTHLYDOW, &pTrigger); if (FAILED(hr)) goto finish;
|
hr = pTriggerCollection->Create(TASK_TRIGGER_MONTHLYDOW, &pTrigger); if (FAILED(hr)) goto finish;
|
||||||
hr = pTrigger.query_interface(&pTriggerMonthlyDOW); if (FAILED(hr)) goto finish;
|
hr = pTrigger.QueryInterface(&pTriggerMonthlyDOW); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerMonthlyDOW->put_WeeksOfMonth(
|
hr = pTriggerMonthlyDOW->put_WeeksOfMonth(
|
||||||
ttData.Type.MonthlyDOW.wWhichWeek == TASK_FIRST_WEEK ? 0x01 :
|
ttData.Type.MonthlyDOW.wWhichWeek == TASK_FIRST_WEEK ? 0x01 :
|
||||||
ttData.Type.MonthlyDOW.wWhichWeek == TASK_SECOND_WEEK ? 0x02 :
|
ttData.Type.MonthlyDOW.wWhichWeek == TASK_SECOND_WEEK ? 0x02 :
|
||||||
@ -236,8 +268,8 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
ttData.Type.MonthlyDOW.wWhichWeek == TASK_LAST_WEEK ? 0x10 : 0x00); if (FAILED(hr)) goto finish;
|
ttData.Type.MonthlyDOW.wWhichWeek == TASK_LAST_WEEK ? 0x10 : 0x00); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerMonthlyDOW->put_DaysOfWeek(ttData.Type.MonthlyDOW.rgfDaysOfTheWeek); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthlyDOW->put_DaysOfWeek(ttData.Type.MonthlyDOW.rgfDaysOfTheWeek); if (FAILED(hr)) goto finish;
|
||||||
hr = pTriggerMonthlyDOW->put_MonthsOfYear(ttData.Type.MonthlyDOW.rgfMonths); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthlyDOW->put_MonthsOfYear(ttData.Type.MonthlyDOW.rgfMonths); if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerMonthlyDOW->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthlyDOW->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,52 +279,52 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case TASK_EVENT_TRIGGER_AT_SYSTEMSTART: {
|
case TASK_EVENT_TRIGGER_AT_SYSTEMSTART: {
|
||||||
winstd::com_obj<IBootTrigger> pTriggerBoot;
|
CComPtr<IBootTrigger> pTriggerBoot;
|
||||||
hr = pTriggerCollection->Create(TASK_TRIGGER_BOOT, &pTrigger); if (FAILED(hr)) goto finish;
|
hr = pTriggerCollection->Create(TASK_TRIGGER_BOOT, &pTrigger); if (FAILED(hr)) goto finish;
|
||||||
hr = pTrigger.query_interface(&pTriggerBoot); if (FAILED(hr)) goto finish;
|
hr = pTrigger.QueryInterface(&pTriggerBoot); if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerBoot->put_Delay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerBoot->put_Delay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_EVENT_TRIGGER_AT_LOGON: {
|
case TASK_EVENT_TRIGGER_AT_LOGON: {
|
||||||
winstd::com_obj<ILogonTrigger> pTriggerLogon;
|
CComPtr<ILogonTrigger> pTriggerLogon;
|
||||||
hr = pTriggerCollection->Create(TASK_TRIGGER_LOGON, &pTrigger); if (FAILED(hr)) goto finish;
|
hr = pTriggerCollection->Create(TASK_TRIGGER_LOGON, &pTrigger); if (FAILED(hr)) goto finish;
|
||||||
hr = pTrigger.query_interface(&pTriggerLogon); if (FAILED(hr)) goto finish;
|
hr = pTrigger.QueryInterface(&pTriggerLogon); if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerLogon->put_Delay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerLogon->put_Delay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set trigger ID.
|
// Set trigger ID.
|
||||||
sprintf(str, L"%u", iTrigger);
|
str.Format(L"%u", iTrigger);
|
||||||
hr = pTrigger->put_Id(winstd::bstr(str));
|
hr = pTrigger->put_Id(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Set trigger start date.
|
// Set trigger start date.
|
||||||
sprintf(str, L"%04u-%02u-%02uT%02u:%02u:00", ttData.wBeginYear, ttData.wBeginMonth, ttData.wBeginDay, ttData.wStartHour, ttData.wStartMinute);
|
str.Format(L"%04u-%02u-%02uT%02u:%02u:00", ttData.wBeginYear, ttData.wBeginMonth, ttData.wBeginDay, ttData.wStartHour, ttData.wStartMinute);
|
||||||
hr = pTrigger->put_StartBoundary(winstd::bstr(str));
|
hr = pTrigger->put_StartBoundary(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
if (ttData.rgFlags & TASK_TRIGGER_FLAG_HAS_END_DATE) {
|
if (ttData.rgFlags & TASK_TRIGGER_FLAG_HAS_END_DATE) {
|
||||||
// Set trigger end date.
|
// Set trigger end date.
|
||||||
sprintf(str, L"%04u-%02u-%02u", ttData.wEndYear, ttData.wEndMonth, ttData.wEndDay);
|
str.Format(L"%04u-%02u-%02u", ttData.wEndYear, ttData.wEndMonth, ttData.wEndDay);
|
||||||
hr = pTrigger->put_EndBoundary(winstd::bstr(str));
|
hr = pTrigger->put_EndBoundary(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set trigger repetition duration and interval.
|
// Set trigger repetition duration and interval.
|
||||||
if (ttData.MinutesDuration || ttData.MinutesInterval) {
|
if (ttData.MinutesDuration || ttData.MinutesInterval) {
|
||||||
winstd::com_obj<IRepetitionPattern> pRepetitionPattern;
|
CComPtr<IRepetitionPattern> pRepetitionPattern;
|
||||||
|
|
||||||
hr = pTrigger->get_Repetition(&pRepetitionPattern);
|
hr = pTrigger->get_Repetition(&pRepetitionPattern);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.MinutesDuration);
|
str.Format(L"PT%uM", ttData.MinutesDuration);
|
||||||
hr = pRepetitionPattern->put_Duration(winstd::bstr(str));
|
hr = pRepetitionPattern->put_Duration(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
sprintf(str, L"PT%uM", ttData.MinutesInterval);
|
str.Format(L"PT%uM", ttData.MinutesInterval);
|
||||||
hr = pRepetitionPattern->put_Interval(winstd::bstr(str));
|
hr = pRepetitionPattern->put_Interval(CComBSTR(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
hr = pRepetitionPattern->put_StopAtDurationEnd(ttData.rgFlags & TASK_TRIGGER_FLAG_KILL_AT_DURATION_END ? VARIANT_TRUE : VARIANT_FALSE);
|
hr = pRepetitionPattern->put_StopAtDurationEnd(ttData.rgFlags & TASK_TRIGGER_FLAG_KILL_AT_DURATION_END ? VARIANT_TRUE : VARIANT_FALSE);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
@ -304,69 +336,69 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the task folder.
|
// Get the task folder.
|
||||||
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(CComBSTR(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
winstd::bstr xml;
|
CComBSTR xml;
|
||||||
hr = pTaskDefinition->get_XmlText(&xml);
|
hr = pTaskDefinition->get_XmlText(&xml);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Register the task.
|
// Register the task.
|
||||||
hr = pTaskFolder->RegisterTaskDefinition(
|
hr = pTaskFolder->RegisterTaskDefinition(
|
||||||
winstd::bstr(m_sValue), // path
|
CComBSTR(m_sValue), // path
|
||||||
pTaskDefinition, // pDefinition
|
pTaskDefinition, // pDefinition
|
||||||
TASK_CREATE, // flags
|
TASK_CREATE, // flags
|
||||||
vEmpty, // userId
|
vEmpty, // userId
|
||||||
logonType != TASK_LOGON_SERVICE_ACCOUNT && !m_sPassword.empty() ? winstd::variant(m_sPassword.c_str()) : vEmpty, // password
|
logonType != TASK_LOGON_SERVICE_ACCOUNT && !m_sPassword.IsEmpty() ? CComVariant(m_sPassword) : vEmpty, // password
|
||||||
logonType, // logonType
|
logonType, // logonType
|
||||||
vEmpty, // sddl
|
vEmpty, // sddl
|
||||||
&pTask); // ppTask
|
&pTask); // ppTask
|
||||||
} else {
|
} else {
|
||||||
// Windows XP or older.
|
// Windows XP or older.
|
||||||
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
CComPtr<ITaskScheduler> pTaskScheduler;
|
||||||
winstd::com_obj<ITask> pTask;
|
CComPtr<ITask> pTask;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Create the new task.
|
// Create the new task.
|
||||||
hr = pTaskScheduler->NewWorkItem(m_sValue.c_str(), CLSID_CTask, IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->NewWorkItem(m_sValue, CLSID_CTask, IID_ITask, (IUnknown**)&pTask);
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to delete the task. ITask::NewWorkItem() might made a blank task already.
|
// Order rollback action to delete the task. ITask::NewWorkItem() might made a blank task already.
|
||||||
pSession->m_olRollback.push_front(new COpTaskDelete(m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpTaskDelete(m_sValue));
|
||||||
}
|
}
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Set its properties.
|
// Set its properties.
|
||||||
hr = pTask->SetApplicationName (m_sApplicationName.c_str() ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetApplicationName (m_sApplicationName ); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetParameters (m_sParameters.c_str() ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetParameters (m_sParameters ); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetWorkingDirectory(m_sWorkingDirectory.c_str()); if (FAILED(hr)) goto finish;
|
hr = pTask->SetWorkingDirectory(m_sWorkingDirectory); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetComment (m_sComment.c_str() ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetComment (m_sComment ); if (FAILED(hr)) goto finish;
|
||||||
if (pSession->m_bRollbackEnabled && (m_dwFlags & TASK_FLAG_DISABLED) == 0) {
|
if (pSession->m_bRollbackEnabled && (m_dwFlags & TASK_FLAG_DISABLED) == 0) {
|
||||||
// The task is supposed to be enabled.
|
// The task is supposed to be enabled.
|
||||||
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
||||||
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olCommit.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
||||||
m_dwFlags |= TASK_FLAG_DISABLED;
|
m_dwFlags |= TASK_FLAG_DISABLED;
|
||||||
}
|
}
|
||||||
hr = pTask->SetFlags (m_dwFlags ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetFlags (m_dwFlags ); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetPriority (m_dwPriority ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetPriority (m_dwPriority ); if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Set task credentials.
|
// Set task credentials.
|
||||||
hr = m_sAccountName.empty() ?
|
hr = m_sAccountName.IsEmpty() ?
|
||||||
pTask->SetAccountInformation(L"" , NULL ) :
|
pTask->SetAccountInformation(L"", NULL ) :
|
||||||
pTask->SetAccountInformation(m_sAccountName.c_str(), m_sPassword.c_str());
|
pTask->SetAccountInformation(m_sAccountName, m_sPassword);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
hr = pTask->SetIdleWait (m_wIdleMinutes, m_wDeadlineMinutes); if (FAILED(hr)) goto finish;
|
hr = pTask->SetIdleWait (m_wIdleMinutes, m_wDeadlineMinutes); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetMaxRunTime(m_dwMaxRuntimeMS ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetMaxRunTime(m_dwMaxRuntimeMS ); if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Add triggers.
|
// Add triggers.
|
||||||
for (auto t = m_lTriggers.cbegin(), t_end = m_lTriggers.cend(); t != t_end; ++t) {
|
for (pos = m_lTriggers.GetHeadPosition(); pos;) {
|
||||||
WORD wTriggerIdx;
|
WORD wTriggerIdx;
|
||||||
winstd::com_obj<ITaskTrigger> pTrigger;
|
CComPtr<ITaskTrigger> pTrigger;
|
||||||
TASK_TRIGGER ttData = *t; // Don't use reference! We don't want to modify original trigger data by adding random startup delay.
|
TASK_TRIGGER ttData = m_lTriggers.GetNext(pos); // Don't use reference! We don't want to modify original trigger data by adding random startup delay.
|
||||||
|
|
||||||
hr = pTask->CreateTrigger(&wTriggerIdx, &pTrigger);
|
hr = pTask->CreateTrigger(&wTriggerIdx, &pTrigger);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
@ -394,8 +426,8 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert numerical date to DMY (ULONGLONG -> FILETIME -> SYSTEMTIME).
|
// Convert numerical date to DMY (ULONGLONG -> FILETIME -> SYSTEMTIME).
|
||||||
ftValue.dwHighDateTime = static_cast<DWORD>((ullValue >> 32) & 0xffffffff);
|
ftValue.dwHighDateTime = (DWORD)((ullValue >> 32) & 0xffffffff);
|
||||||
ftValue.dwLowDateTime = static_cast<DWORD>( ullValue & 0xffffffff);
|
ftValue.dwLowDateTime = (DWORD)( ullValue & 0xffffffff);
|
||||||
::FileTimeToSystemTime(&ftValue, &stValue);
|
::FileTimeToSystemTime(&ftValue, &stValue);
|
||||||
|
|
||||||
// Set new trigger date and time.
|
// Set new trigger date and time.
|
||||||
@ -411,7 +443,7 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save the task.
|
// Save the task.
|
||||||
winstd::com_obj<IPersistFile> pTaskFile(pTask);
|
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
||||||
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
||||||
hr = pTaskFile->Save(NULL, TRUE);
|
hr = pTaskFile->Save(NULL, TRUE);
|
||||||
}
|
}
|
||||||
@ -420,7 +452,7 @@ finish:
|
|||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_CREATE);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_CREATE);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
@ -432,7 +464,7 @@ UINT COpTaskCreate::SetFromRecord(MSIHANDLE hInstall, MSIHANDLE hRecord)
|
|||||||
{
|
{
|
||||||
UINT uiResult;
|
UINT uiResult;
|
||||||
int iValue;
|
int iValue;
|
||||||
std::wstring sFolder;
|
ATL::CAtlStringW sFolder;
|
||||||
|
|
||||||
uiResult = ::MsiRecordFormatStringW(hInstall, hRecord, 3, m_sApplicationName);
|
uiResult = ::MsiRecordFormatStringW(hInstall, hRecord, 3, m_sApplicationName);
|
||||||
if (uiResult != NO_ERROR) return uiResult;
|
if (uiResult != NO_ERROR) return uiResult;
|
||||||
@ -442,11 +474,11 @@ UINT COpTaskCreate::SetFromRecord(MSIHANDLE hInstall, MSIHANDLE hRecord)
|
|||||||
|
|
||||||
uiResult = ::MsiRecordGetStringW(hRecord, 5, sFolder);
|
uiResult = ::MsiRecordGetStringW(hRecord, 5, sFolder);
|
||||||
if (uiResult != NO_ERROR) return uiResult;
|
if (uiResult != NO_ERROR) return uiResult;
|
||||||
uiResult = ::MsiGetTargetPathW(hInstall, sFolder.c_str(), m_sWorkingDirectory);
|
uiResult = ::MsiGetTargetPathW(hInstall, sFolder, m_sWorkingDirectory);
|
||||||
if (uiResult != NO_ERROR) return uiResult;
|
if (uiResult != NO_ERROR) return uiResult;
|
||||||
if (!m_sWorkingDirectory.empty() && m_sWorkingDirectory.back() == L'\\') {
|
if (!m_sWorkingDirectory.IsEmpty() && m_sWorkingDirectory.GetAt(m_sWorkingDirectory.GetLength() - 1) == L'\\') {
|
||||||
// Trim trailing backslash.
|
// Trim trailing backslash.
|
||||||
m_sWorkingDirectory.resize(m_sWorkingDirectory.length() - 1);
|
m_sWorkingDirectory.Truncate(m_sWorkingDirectory.GetLength() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
uiResult = ::MsiRecordFormatStringW(hInstall, hRecord, 10, m_sAuthor);
|
uiResult = ::MsiRecordFormatStringW(hInstall, hRecord, 10, m_sAuthor);
|
||||||
@ -500,8 +532,8 @@ UINT COpTaskCreate::SetTriggersFromView(MSIHANDLE hView)
|
|||||||
iValue = ::MsiRecordGetInteger(hRecord, 2);
|
iValue = ::MsiRecordGetInteger(hRecord, 2);
|
||||||
if (iValue == MSI_NULL_INTEGER) return ERROR_INVALID_FIELD;
|
if (iValue == MSI_NULL_INTEGER) return ERROR_INVALID_FIELD;
|
||||||
ullValue = ((ULONGLONG)iValue + 138426) * 864000000000;
|
ullValue = ((ULONGLONG)iValue + 138426) * 864000000000;
|
||||||
ftValue.dwHighDateTime = static_cast<DWORD>((ullValue >> 32) & 0xffffffff);
|
ftValue.dwHighDateTime = (DWORD)((ullValue >> 32) & 0xffffffff);
|
||||||
ftValue.dwLowDateTime = static_cast<DWORD>( ullValue & 0xffffffff);
|
ftValue.dwLowDateTime = (DWORD)( ullValue & 0xffffffff);
|
||||||
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
||||||
return ::GetLastError();
|
return ::GetLastError();
|
||||||
ttData.wBeginYear = stValue.wYear;
|
ttData.wBeginYear = stValue.wYear;
|
||||||
@ -512,8 +544,8 @@ UINT COpTaskCreate::SetTriggersFromView(MSIHANDLE hView)
|
|||||||
iValue = ::MsiRecordGetInteger(hRecord, 3);
|
iValue = ::MsiRecordGetInteger(hRecord, 3);
|
||||||
if (iValue != MSI_NULL_INTEGER) {
|
if (iValue != MSI_NULL_INTEGER) {
|
||||||
ullValue = ((ULONGLONG)iValue + 138426) * 864000000000;
|
ullValue = ((ULONGLONG)iValue + 138426) * 864000000000;
|
||||||
ftValue.dwHighDateTime = static_cast<DWORD>((ullValue >> 32) & 0xffffffff);
|
ftValue.dwHighDateTime = (DWORD)((ullValue >> 32) & 0xffffffff);
|
||||||
ftValue.dwLowDateTime = static_cast<DWORD>( ullValue & 0xffffffff);
|
ftValue.dwLowDateTime = (DWORD)( ullValue & 0xffffffff);
|
||||||
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
||||||
return ::GetLastError();
|
return ::GetLastError();
|
||||||
ttData.wEndYear = stValue.wYear;
|
ttData.wEndYear = stValue.wYear;
|
||||||
@ -600,8 +632,10 @@ UINT COpTaskCreate::SetTriggersFromView(MSIHANDLE hView)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lTriggers.push_back(ttData);
|
m_lTriggers.AddTail(ttData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -618,35 +652,35 @@ COpTaskDelete::COpTaskDelete(LPCWSTR pszTaskName, int iTicks) :
|
|||||||
HRESULT COpTaskDelete::Execute(CSession *pSession)
|
HRESULT COpTaskDelete::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
winstd::com_obj<ITaskService> pService;
|
CComPtr<ITaskService> pService;
|
||||||
|
|
||||||
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
winstd::variant vEmpty;
|
CComVariant vEmpty;
|
||||||
winstd::com_obj<ITaskFolder> pTaskFolder;
|
CComPtr<ITaskFolder> pTaskFolder;
|
||||||
|
|
||||||
// Connect to local task service.
|
// Connect to local task service.
|
||||||
hr = pService->Connect(vEmpty, vEmpty, vEmpty, vEmpty);
|
hr = pService->Connect(vEmpty, vEmpty, vEmpty, vEmpty);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task folder.
|
// Get task folder.
|
||||||
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(CComBSTR(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
winstd::com_obj<IRegisteredTask> pTask, pTaskOrig;
|
CComPtr<IRegisteredTask> pTask, pTaskOrig;
|
||||||
winstd::com_obj<ITaskDefinition> pTaskDefinition;
|
CComPtr<ITaskDefinition> pTaskDefinition;
|
||||||
winstd::com_obj<IPrincipal> pPrincipal;
|
CComPtr<IPrincipal> pPrincipal;
|
||||||
VARIANT_BOOL bEnabled;
|
VARIANT_BOOL bEnabled;
|
||||||
TASK_LOGON_TYPE logonType;
|
TASK_LOGON_TYPE logonType;
|
||||||
winstd::bstr sSSDL;
|
CComBSTR sSSDL;
|
||||||
winstd::variant vSSDL;
|
CComVariant vSSDL;
|
||||||
std::wstring sDisplayNameOrig;
|
ATL::CAtlStringW sDisplayNameOrig;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
// Get the source task.
|
// Get the source task.
|
||||||
hr = pTaskFolder->GetTask(winstd::bstr(m_sValue), &pTask);
|
hr = pTaskFolder->GetTask(CComBSTR(m_sValue), &pTask);
|
||||||
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) { hr = S_OK; goto finish; }
|
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) { hr = S_OK; goto finish; }
|
||||||
else if (FAILED(hr)) goto finish;
|
else if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
@ -657,7 +691,7 @@ HRESULT COpTaskDelete::Execute(CSession *pSession)
|
|||||||
// The task is enabled.
|
// The task is enabled.
|
||||||
|
|
||||||
// In case the task disabling fails halfway, try to re-enable it anyway on rollback.
|
// In case the task disabling fails halfway, try to re-enable it anyway on rollback.
|
||||||
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olRollback.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
||||||
|
|
||||||
// Disable it.
|
// Disable it.
|
||||||
hr = pTask->put_Enabled(VARIANT_FALSE);
|
hr = pTask->put_Enabled(VARIANT_FALSE);
|
||||||
@ -678,60 +712,60 @@ HRESULT COpTaskDelete::Execute(CSession *pSession)
|
|||||||
|
|
||||||
// Get task security descriptor.
|
// Get task security descriptor.
|
||||||
hr = pTask->GetSecurityDescriptor(DACL_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, &sSSDL);
|
hr = pTask->GetSecurityDescriptor(DACL_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, &sSSDL);
|
||||||
if (hr == HRESULT_FROM_WIN32(ERROR_PRIVILEGE_NOT_HELD)) ::VariantClear(&vSSDL);
|
if (hr == HRESULT_FROM_WIN32(ERROR_PRIVILEGE_NOT_HELD)) vSSDL.Clear();
|
||||||
else if (FAILED(hr)) goto finish;
|
else if (FAILED(hr)) goto finish;
|
||||||
else {
|
else {
|
||||||
V_VT (&vSSDL) = VT_BSTR;
|
V_VT (&vSSDL) = VT_BSTR;
|
||||||
V_BSTR(&vSSDL) = sSSDL.detach();
|
V_BSTR(&vSSDL) = sSSDL.Detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register a backup copy of task.
|
// Register a backup copy of task.
|
||||||
do {
|
do {
|
||||||
sprintf(sDisplayNameOrig, L"%ls (orig %u)", m_sValue.c_str(), ++uiCount);
|
sDisplayNameOrig.Format(L"%ls (orig %u)", (LPCWSTR)m_sValue, ++uiCount);
|
||||||
hr = pTaskFolder->RegisterTaskDefinition(
|
hr = pTaskFolder->RegisterTaskDefinition(
|
||||||
winstd::bstr(sDisplayNameOrig), // path
|
CComBSTR(sDisplayNameOrig), // path
|
||||||
pTaskDefinition, // pDefinition
|
pTaskDefinition, // pDefinition
|
||||||
TASK_CREATE, // flags
|
TASK_CREATE, // flags
|
||||||
vEmpty, // userId
|
vEmpty, // userId
|
||||||
vEmpty, // password
|
vEmpty, // password
|
||||||
logonType, // logonType
|
logonType, // logonType
|
||||||
vSSDL, // sddl
|
vSSDL, // sddl
|
||||||
&pTaskOrig); // ppTask
|
&pTaskOrig); // ppTask
|
||||||
} while (hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS));
|
} while (hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS));
|
||||||
// In case the backup copy creation failed halfway, try to delete its remains anyway on rollback.
|
// In case the backup copy creation failed halfway, try to delete its remains anyway on rollback.
|
||||||
pSession->m_olRollback.push_front(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
pSession->m_olRollback.AddHead(new COpTaskDelete(sDisplayNameOrig));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Order rollback action to restore from backup copy.
|
// Order rollback action to restore from backup copy.
|
||||||
pSession->m_olRollback.push_front(new COpTaskCopy(sDisplayNameOrig.c_str(), m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpTaskCopy(sDisplayNameOrig, m_sValue));
|
||||||
|
|
||||||
// Delete it.
|
// Delete it.
|
||||||
hr = pTaskFolder->DeleteTask(winstd::bstr(m_sValue), 0);
|
hr = pTaskFolder->DeleteTask(CComBSTR(m_sValue), 0);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.push_back(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
pSession->m_olCommit.AddTail(new COpTaskDelete(sDisplayNameOrig));
|
||||||
} else {
|
} else {
|
||||||
// Delete the task.
|
// Delete the task.
|
||||||
hr = pTaskFolder->DeleteTask(winstd::bstr(m_sValue), 0);
|
hr = pTaskFolder->DeleteTask(CComBSTR(m_sValue), 0);
|
||||||
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) hr = S_OK;
|
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) hr = S_OK;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Windows XP or older.
|
// Windows XP or older.
|
||||||
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
CComPtr<ITaskScheduler> pTaskScheduler;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
winstd::com_obj<ITask> pTask;
|
CComPtr<ITask> pTask;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
std::wstring sDisplayNameOrig;
|
ATL::CAtlStringW sDisplayNameOrig;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
// Load the task.
|
// Load the task.
|
||||||
hr = pTaskScheduler->Activate(m_sValue.c_str(), IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->Activate(m_sValue, IID_ITask, (IUnknown**)&pTask);
|
||||||
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) { hr = S_OK; goto finish; }
|
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) { hr = S_OK; goto finish; }
|
||||||
else if (FAILED(hr)) goto finish;
|
else if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
@ -742,7 +776,7 @@ HRESULT COpTaskDelete::Execute(CSession *pSession)
|
|||||||
// The task is enabled.
|
// The task is enabled.
|
||||||
|
|
||||||
// In case the task disabling fails halfway, try to re-enable it anyway on rollback.
|
// In case the task disabling fails halfway, try to re-enable it anyway on rollback.
|
||||||
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olRollback.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
||||||
|
|
||||||
// Disable it.
|
// Disable it.
|
||||||
dwFlags |= TASK_FLAG_DISABLED;
|
dwFlags |= TASK_FLAG_DISABLED;
|
||||||
@ -752,31 +786,31 @@ HRESULT COpTaskDelete::Execute(CSession *pSession)
|
|||||||
|
|
||||||
// Prepare a backup copy of task.
|
// Prepare a backup copy of task.
|
||||||
do {
|
do {
|
||||||
sprintf(sDisplayNameOrig, L"%ls (orig %u)", m_sValue.c_str(), ++uiCount);
|
sDisplayNameOrig.Format(L"%ls (orig %u)", (LPCWSTR)m_sValue, ++uiCount);
|
||||||
hr = pTaskScheduler->AddWorkItem(sDisplayNameOrig.c_str(), pTask);
|
hr = pTaskScheduler->AddWorkItem(sDisplayNameOrig, pTask);
|
||||||
} while (hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS));
|
} while (hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS));
|
||||||
// In case the backup copy creation failed halfway, try to delete its remains anyway on rollback.
|
// In case the backup copy creation failed halfway, try to delete its remains anyway on rollback.
|
||||||
pSession->m_olRollback.push_front(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
pSession->m_olRollback.AddHead(new COpTaskDelete(sDisplayNameOrig));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Save the backup copy.
|
// Save the backup copy.
|
||||||
winstd::com_obj<IPersistFile> pTaskFile(pTask);
|
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
||||||
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
||||||
hr = pTaskFile->Save(NULL, TRUE);
|
hr = pTaskFile->Save(NULL, TRUE);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Order rollback action to restore from backup copy.
|
// Order rollback action to restore from backup copy.
|
||||||
pSession->m_olRollback.push_front(new COpTaskCopy(sDisplayNameOrig.c_str(), m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpTaskCopy(sDisplayNameOrig, m_sValue));
|
||||||
|
|
||||||
// Delete it.
|
// Delete it.
|
||||||
hr = pTaskScheduler->Delete(m_sValue.c_str());
|
hr = pTaskScheduler->Delete(m_sValue);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.push_back(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
pSession->m_olCommit.AddTail(new COpTaskDelete(sDisplayNameOrig));
|
||||||
} else {
|
} else {
|
||||||
// Delete the task.
|
// Delete the task.
|
||||||
hr = pTaskScheduler->Delete(m_sValue.c_str());
|
hr = pTaskScheduler->Delete(m_sValue);
|
||||||
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) hr = S_OK;
|
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) hr = S_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -785,7 +819,7 @@ finish:
|
|||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_DELETE);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_DELETE);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
@ -807,14 +841,14 @@ COpTaskEnable::COpTaskEnable(LPCWSTR pszTaskName, BOOL bEnable, int iTicks) :
|
|||||||
HRESULT COpTaskEnable::Execute(CSession *pSession)
|
HRESULT COpTaskEnable::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
winstd::com_obj<ITaskService> pService;
|
CComPtr<ITaskService> pService;
|
||||||
|
|
||||||
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
winstd::variant vEmpty;
|
CComVariant vEmpty;
|
||||||
winstd::com_obj<ITaskFolder> pTaskFolder;
|
CComPtr<ITaskFolder> pTaskFolder;
|
||||||
winstd::com_obj<IRegisteredTask> pTask;
|
CComPtr<IRegisteredTask> pTask;
|
||||||
VARIANT_BOOL bEnabled;
|
VARIANT_BOOL bEnabled;
|
||||||
|
|
||||||
// Connect to local task service.
|
// Connect to local task service.
|
||||||
@ -822,11 +856,11 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task folder.
|
// Get task folder.
|
||||||
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(CComBSTR(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task.
|
// Get task.
|
||||||
hr = pTaskFolder->GetTask(winstd::bstr(m_sValue), &pTask);
|
hr = pTaskFolder->GetTask(CComBSTR(m_sValue), &pTask);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get currently enabled state.
|
// Get currently enabled state.
|
||||||
@ -838,7 +872,7 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (pSession->m_bRollbackEnabled && !bEnabled) {
|
if (pSession->m_bRollbackEnabled && !bEnabled) {
|
||||||
// The task is disabled and supposed to be enabled.
|
// The task is disabled and supposed to be enabled.
|
||||||
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
||||||
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olCommit.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
||||||
hr = S_OK; goto finish;
|
hr = S_OK; goto finish;
|
||||||
} else
|
} else
|
||||||
bEnabled = VARIANT_TRUE;
|
bEnabled = VARIANT_TRUE;
|
||||||
@ -846,7 +880,7 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (pSession->m_bRollbackEnabled && bEnabled) {
|
if (pSession->m_bRollbackEnabled && bEnabled) {
|
||||||
// The task is enabled and we will disable it now.
|
// The task is enabled and we will disable it now.
|
||||||
// Order rollback to re-enable it.
|
// Order rollback to re-enable it.
|
||||||
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olRollback.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
||||||
}
|
}
|
||||||
bEnabled = VARIANT_FALSE;
|
bEnabled = VARIANT_FALSE;
|
||||||
}
|
}
|
||||||
@ -856,16 +890,16 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
} else {
|
} else {
|
||||||
// Windows XP or older.
|
// Windows XP or older.
|
||||||
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
CComPtr<ITaskScheduler> pTaskScheduler;
|
||||||
winstd::com_obj<ITask> pTask;
|
CComPtr<ITask> pTask;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Load the task.
|
// Load the task.
|
||||||
hr = pTaskScheduler->Activate(m_sValue.c_str(), IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->Activate(m_sValue, IID_ITask, (IUnknown**)&pTask);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task's current flags.
|
// Get task's current flags.
|
||||||
@ -877,7 +911,7 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (pSession->m_bRollbackEnabled && (dwFlags & TASK_FLAG_DISABLED)) {
|
if (pSession->m_bRollbackEnabled && (dwFlags & TASK_FLAG_DISABLED)) {
|
||||||
// The task is disabled and supposed to be enabled.
|
// The task is disabled and supposed to be enabled.
|
||||||
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
// However, we shall enable it at commit to prevent it from accidentally starting in the very installation phase.
|
||||||
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olCommit.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
||||||
hr = S_OK; goto finish;
|
hr = S_OK; goto finish;
|
||||||
} else
|
} else
|
||||||
dwFlags &= ~TASK_FLAG_DISABLED;
|
dwFlags &= ~TASK_FLAG_DISABLED;
|
||||||
@ -885,7 +919,7 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (pSession->m_bRollbackEnabled && !(dwFlags & TASK_FLAG_DISABLED)) {
|
if (pSession->m_bRollbackEnabled && !(dwFlags & TASK_FLAG_DISABLED)) {
|
||||||
// The task is enabled and we will disable it now.
|
// The task is enabled and we will disable it now.
|
||||||
// Order rollback to re-enable it.
|
// Order rollback to re-enable it.
|
||||||
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
pSession->m_olRollback.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
||||||
}
|
}
|
||||||
dwFlags |= TASK_FLAG_DISABLED;
|
dwFlags |= TASK_FLAG_DISABLED;
|
||||||
}
|
}
|
||||||
@ -895,7 +929,7 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Save the task.
|
// Save the task.
|
||||||
winstd::com_obj<IPersistFile> pTaskFile(pTask);
|
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
||||||
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
||||||
hr = pTaskFile->Save(NULL, TRUE);
|
hr = pTaskFile->Save(NULL, TRUE);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
@ -905,7 +939,7 @@ finish:
|
|||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_ENABLE);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_ENABLE);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
@ -926,29 +960,29 @@ COpTaskCopy::COpTaskCopy(LPCWSTR pszTaskSrc, LPCWSTR pszTaskDst, int iTicks) :
|
|||||||
HRESULT COpTaskCopy::Execute(CSession *pSession)
|
HRESULT COpTaskCopy::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
winstd::com_obj<ITaskService> pService;
|
CComPtr<ITaskService> pService;
|
||||||
|
|
||||||
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
winstd::variant vEmpty;
|
CComVariant vEmpty;
|
||||||
winstd::com_obj<ITaskFolder> pTaskFolder;
|
CComPtr<ITaskFolder> pTaskFolder;
|
||||||
winstd::com_obj<IRegisteredTask> pTask, pTaskOrig;
|
CComPtr<IRegisteredTask> pTask, pTaskOrig;
|
||||||
winstd::com_obj<ITaskDefinition> pTaskDefinition;
|
CComPtr<ITaskDefinition> pTaskDefinition;
|
||||||
winstd::com_obj<IPrincipal> pPrincipal;
|
CComPtr<IPrincipal> pPrincipal;
|
||||||
TASK_LOGON_TYPE logonType;
|
TASK_LOGON_TYPE logonType;
|
||||||
winstd::bstr sSSDL;
|
CComBSTR sSSDL;
|
||||||
|
|
||||||
// Connect to local task service.
|
// Connect to local task service.
|
||||||
hr = pService->Connect(vEmpty, vEmpty, vEmpty, vEmpty);
|
hr = pService->Connect(vEmpty, vEmpty, vEmpty, vEmpty);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task folder.
|
// Get task folder.
|
||||||
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(CComBSTR(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get the source task.
|
// Get the source task.
|
||||||
hr = pTaskFolder->GetTask(winstd::bstr(m_sValue1), &pTask);
|
hr = pTaskFolder->GetTask(CComBSTR(m_sValue1), &pTask);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task's definition.
|
// Get task's definition.
|
||||||
@ -969,38 +1003,38 @@ HRESULT COpTaskCopy::Execute(CSession *pSession)
|
|||||||
|
|
||||||
// Register a new task.
|
// Register a new task.
|
||||||
hr = pTaskFolder->RegisterTaskDefinition(
|
hr = pTaskFolder->RegisterTaskDefinition(
|
||||||
winstd::bstr(m_sValue2), // path
|
CComBSTR(m_sValue2), // path
|
||||||
pTaskDefinition, // pDefinition
|
pTaskDefinition, // pDefinition
|
||||||
TASK_CREATE, // flags
|
TASK_CREATE, // flags
|
||||||
vEmpty, // userId
|
vEmpty, // userId
|
||||||
vEmpty, // password
|
vEmpty, // password
|
||||||
logonType, // logonType
|
logonType, // logonType
|
||||||
winstd::variant(sSSDL), // sddl
|
CComVariant(sSSDL), // sddl
|
||||||
&pTaskOrig); // ppTask
|
&pTaskOrig); // ppTask
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
} else {
|
} else {
|
||||||
// Windows XP or older.
|
// Windows XP or older.
|
||||||
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
CComPtr<ITaskScheduler> pTaskScheduler;
|
||||||
winstd::com_obj<ITask> pTask;
|
CComPtr<ITask> pTask;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Load the source task.
|
// Load the source task.
|
||||||
hr = pTaskScheduler->Activate(m_sValue1.c_str(), IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->Activate(m_sValue1, IID_ITask, (IUnknown**)&pTask);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Add with different name.
|
// Add with different name.
|
||||||
hr = pTaskScheduler->AddWorkItem(m_sValue2.c_str(), pTask);
|
hr = pTaskScheduler->AddWorkItem(m_sValue2, pTask);
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to delete the new copy. ITask::AddWorkItem() might made a blank task already.
|
// Order rollback action to delete the new copy. ITask::AddWorkItem() might made a blank task already.
|
||||||
pSession->m_olRollback.push_front(new COpTaskDelete(m_sValue2.c_str()));
|
pSession->m_olRollback.AddHead(new COpTaskDelete(m_sValue2));
|
||||||
}
|
}
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Save the task.
|
// Save the task.
|
||||||
winstd::com_obj<IPersistFile> pTaskFile(pTask);
|
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
||||||
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
if (!pTaskFile) { hr = E_NOINTERFACE; goto finish; }
|
||||||
hr = pTaskFile->Save(NULL, TRUE);
|
hr = pTaskFile->Save(NULL, TRUE);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
@ -1010,8 +1044,8 @@ finish:
|
|||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_COPY);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_TASK_COPY);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, m_sValue1.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue1 );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2 );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, hr );
|
::MsiRecordSetInteger(hRecordProg, 4, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -41,19 +55,19 @@ HRESULT COpWLANProfileDelete::Execute(CSession *pSession)
|
|||||||
DWORD dwFlags = 0, dwGrantedAccess = 0;
|
DWORD dwFlags = 0, dwGrantedAccess = 0;
|
||||||
|
|
||||||
// Get profile settings as XML first.
|
// Get profile settings as XML first.
|
||||||
dwError = ::pfnWlanGetProfile(hClientHandle, &m_guidInterface, m_sValue.c_str(), NULL, &pszProfileXML, &dwFlags, &dwGrantedAccess);
|
dwError = ::pfnWlanGetProfile(hClientHandle, &m_guidInterface, m_sValue, NULL, &pszProfileXML, &dwFlags, &dwGrantedAccess);
|
||||||
if (dwError == NO_ERROR) {
|
if (dwError == NO_ERROR) {
|
||||||
// Delete the profile.
|
// Delete the profile.
|
||||||
dwError = ::pfnWlanDeleteProfile(hClientHandle, &m_guidInterface, m_sValue.c_str(), NULL);
|
dwError = ::pfnWlanDeleteProfile(hClientHandle, &m_guidInterface, m_sValue, NULL);
|
||||||
if (dwError == NO_ERROR) {
|
if (dwError == NO_ERROR) {
|
||||||
// Order rollback action to recreate it.
|
// Order rollback action to recreate it.
|
||||||
pSession->m_olRollback.push_front(new COpWLANProfileSet(m_guidInterface, dwFlags, m_sValue.c_str(), pszProfileXML));
|
pSession->m_olRollback.AddHead(new COpWLANProfileSet(m_guidInterface, dwFlags, m_sValue, pszProfileXML));
|
||||||
}
|
}
|
||||||
::pfnWlanFreeMemory(pszProfileXML);
|
::pfnWlanFreeMemory(pszProfileXML);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Delete the profile.
|
// Delete the profile.
|
||||||
dwError = ::pfnWlanDeleteProfile(hClientHandle, &m_guidInterface, m_sValue.c_str(), NULL);
|
dwError = ::pfnWlanDeleteProfile(hClientHandle, &m_guidInterface, m_sValue, NULL);
|
||||||
}
|
}
|
||||||
::pfnWlanCloseHandle(hClientHandle, NULL);
|
::pfnWlanCloseHandle(hClientHandle, NULL);
|
||||||
}
|
}
|
||||||
@ -62,12 +76,14 @@ HRESULT COpWLANProfileDelete::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_WLAN_PROFILE_DELETE );
|
ATL::CAtlStringW sGUID;
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, winstd::wstring_guid(m_guidInterface).c_str());
|
GuidToString(&m_guidInterface, sGUID);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_WLAN_PROFILE_DELETE);
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
::MsiRecordSetStringW(hRecordProg, 2, sGUID );
|
||||||
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
|
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
||||||
@ -101,7 +117,7 @@ HRESULT COpWLANProfileSet::Execute(CSession *pSession)
|
|||||||
// Delete existing profile first.
|
// Delete existing profile first.
|
||||||
// Since deleting a profile is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
// Since deleting a profile is a complicated job (when rollback/commit support is required), and we do have an operation just for that, we use it.
|
||||||
// Don't worry, COpWLANProfileDelete::Execute() returns S_OK if profile doesn't exist.
|
// Don't worry, COpWLANProfileDelete::Execute() returns S_OK if profile doesn't exist.
|
||||||
COpWLANProfileDelete opDelete(m_guidInterface, m_sValue.c_str());
|
COpWLANProfileDelete opDelete(m_guidInterface, m_sValue);
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -109,10 +125,10 @@ HRESULT COpWLANProfileSet::Execute(CSession *pSession)
|
|||||||
dwError = ::pfnWlanOpenHandle(2, NULL, &dwNegotiatedVersion, &hClientHandle);
|
dwError = ::pfnWlanOpenHandle(2, NULL, &dwNegotiatedVersion, &hClientHandle);
|
||||||
if (dwError == NO_ERROR) {
|
if (dwError == NO_ERROR) {
|
||||||
// Set the profile.
|
// Set the profile.
|
||||||
dwError = ::pfnWlanSetProfile(hClientHandle, &m_guidInterface, m_dwFlags, m_sProfileXML.c_str(), NULL, TRUE, NULL, &wlrc);
|
dwError = ::pfnWlanSetProfile(hClientHandle, &m_guidInterface, m_dwFlags, m_sProfileXML, NULL, TRUE, NULL, &wlrc);
|
||||||
if (dwError == NO_ERROR && pSession->m_bRollbackEnabled) {
|
if (dwError == NO_ERROR && pSession->m_bRollbackEnabled) {
|
||||||
// Order rollback action to delete it.
|
// Order rollback action to delete it.
|
||||||
pSession->m_olRollback.push_front(new COpWLANProfileDelete(m_guidInterface, m_sValue.c_str()));
|
pSession->m_olRollback.AddHead(new COpWLANProfileDelete(m_guidInterface, m_sValue));
|
||||||
}
|
}
|
||||||
::pfnWlanCloseHandle(hClientHandle, NULL);
|
::pfnWlanCloseHandle(hClientHandle, NULL);
|
||||||
}
|
}
|
||||||
@ -121,20 +137,22 @@ HRESULT COpWLANProfileSet::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
||||||
std::wstring sReason;
|
ATL::CAtlStringW sGUID, sReason;
|
||||||
std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[1024]);
|
DWORD dwSize = 1024, dwResult;
|
||||||
if (szBuffer && ::pfnWlanReasonCodeToString(wlrc, 1024, szBuffer.get(), NULL) == NO_ERROR)
|
LPWSTR szBuffer = sReason.GetBuffer(dwSize);
|
||||||
sReason.assign(szBuffer.get(), wcsnlen(szBuffer.get(), 1024));
|
|
||||||
else
|
GuidToString(&m_guidInterface, sGUID);
|
||||||
sprintf(sReason, L"0x%x", wlrc);
|
dwResult = ::pfnWlanReasonCodeToString(wlrc, dwSize, szBuffer, NULL);
|
||||||
|
sReason.ReleaseBuffer(dwSize);
|
||||||
|
if (dwResult != NO_ERROR) sReason.Format(L"0x%x", wlrc);
|
||||||
|
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_WLAN_PROFILE_SET);
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_WLAN_PROFILE_SET);
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, winstd::wstring_guid(m_guidInterface).c_str());
|
::MsiRecordSetStringW(hRecordProg, 2, sGUID );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, sReason.c_str() );
|
::MsiRecordSetStringW(hRecordProg, 4, sReason );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, dwError );
|
::MsiRecordSetInteger(hRecordProg, 5, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return HRESULT_FROM_WIN32(dwError);
|
return AtlHresultFromWin32(dwError);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
/*
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "pch.h"
|
|
20
src/stdafx.cpp
Normal file
20
src/stdafx.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 1991-2016 Amebis
|
||||||
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
@ -1,19 +1,36 @@
|
|||||||
/*
|
/*
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
Copyright 1991-2016 Amebis
|
||||||
Copyright © 1991-2022 Amebis
|
|
||||||
|
This file is part of MSICA.
|
||||||
|
|
||||||
|
MSICA is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
MSICA is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with MSICA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <MSICALib.h>
|
#include <MSICALib.h>
|
||||||
|
|
||||||
#include <WinStd/COM.h>
|
#include <atlex/atlcrypt.h>
|
||||||
#include <WinStd/Crypt.h>
|
#include <atlex/atlwin.h>
|
||||||
|
|
||||||
|
#include <atlbase.h>
|
||||||
|
#include <atlfile.h>
|
||||||
|
#include <atlstr.h>
|
||||||
|
|
||||||
#include <msi.h>
|
#include <msi.h>
|
||||||
#include <msiquery.h>
|
#include <msiquery.h>
|
||||||
#include <mstask.h>
|
#include <mstask.h>
|
||||||
#include <shlwapi.h>
|
|
||||||
#include <taskschd.h>
|
#include <taskschd.h>
|
||||||
#include <wlanapi.h>
|
#include <wlanapi.h>
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user