Compare commits
42 Commits
Author | SHA1 | Date | |
---|---|---|---|
3fbf1b80ae | |||
d52e531b25 | |||
b447e24d42 | |||
6c851968a9 | |||
f35a15f3fd | |||
845ceb53fd | |||
6d52aa2f1b | |||
c9cf29551d | |||
c27435b037 | |||
a1f596f968 | |||
1eb3292770 | |||
b701f48fd3 | |||
ea617a8eba | |||
6e26cd801a | |||
f39c7b3caf | |||
5581277863 | |||
302c7c9adb | |||
76f3bba849 | |||
|
ae180de826 | ||
aca0b3a2eb | |||
35b063d709 | |||
79ec696f2a | |||
07188e9b20 | |||
3b1e787f77 | |||
6eece2eae8 | |||
e67d7e6f14 | |||
2eb6b2a311 | |||
49b327a955 | |||
0db18a40b1 | |||
5de934285e | |||
cf1869f495 | |||
557eb4403f | |||
64296e1d3b | |||
a8b69efe02 | |||
365d82a3ee | |||
7273e43f83 | |||
f5d251f96c | |||
367f05ef1d | |||
37479173a2 | |||
8f264447dd | |||
18ac2241b3 | |||
e321a4082e |
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,9 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
nmake.exe /ls All LANG=En CFG=Debug PLAT=Win32
|
nmake.exe /ls All LANG=en_US CFG=Debug PLAT=Win32
|
||||||
nmake.exe /ls All LANG=Sl CFG=Debug PLAT=Win32
|
nmake.exe /ls All LANG=en_US CFG=Debug PLAT=x64
|
||||||
nmake.exe /ls All LANG=En CFG=Debug PLAT=x64
|
nmake.exe /ls All LANG=en_US CFG=Release PLAT=Win32
|
||||||
nmake.exe /ls All LANG=Sl CFG=Debug PLAT=x64
|
nmake.exe /ls All LANG=en_US CFG=Release 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,9 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
nmake.exe /ls Clean LANG=En CFG=Debug PLAT=Win32
|
nmake.exe /ls Clean LANG=en_US CFG=Debug PLAT=Win32
|
||||||
nmake.exe /ls Clean LANG=Sl CFG=Debug PLAT=Win32
|
nmake.exe /ls Clean LANG=en_US CFG=Debug PLAT=x64
|
||||||
nmake.exe /ls Clean LANG=En CFG=Debug PLAT=x64
|
nmake.exe /ls Clean LANG=en_US CFG=Release PLAT=Win32
|
||||||
nmake.exe /ls Clean LANG=Sl CFG=Debug PLAT=x64
|
nmake.exe /ls Clean LANG=en_US CFG=Release 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,36 +1,37 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2010
|
# Visual Studio Version 16
|
||||||
|
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
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
<?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,104 +1,95 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|ARM64">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>ARM64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>x64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|x64">
|
<ProjectConfiguration Include="Release|ARM64">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>ARM64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<PropertyGroup Label="Globals">
|
<Configuration>Release</Configuration>
|
||||||
<ProjectGuid>{8552EE55-177E-4F51-B51B-BAF7D6462CDE}</ProjectGuid>
|
<Platform>Win32</Platform>
|
||||||
<Keyword>Win32Proj</Keyword>
|
</ProjectConfiguration>
|
||||||
<RootNamespace>MSICALib</RootNamespace>
|
<ProjectConfiguration Include="Release|x64">
|
||||||
<ProjectName>MSICALib</ProjectName>
|
<Configuration>Release</Configuration>
|
||||||
</PropertyGroup>
|
<Platform>x64</Platform>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
</ProjectConfiguration>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
</ItemGroup>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<PropertyGroup Label="Globals">
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<ProjectGuid>{8552EE55-177E-4F51-B51B-BAF7D6462CDE}</ProjectGuid>
|
||||||
<UseOfAtl>Static</UseOfAtl>
|
<RootNamespace>MSICALib</RootNamespace>
|
||||||
</PropertyGroup>
|
<ProjectName>MSICALib</ProjectName>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
</PropertyGroup>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<PropertyGroup Label="Configuration">
|
||||||
<UseOfAtl>Static</UseOfAtl>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
</PropertyGroup>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Debug'">
|
||||||
<UseOfAtl>Static</UseOfAtl>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
</PropertyGroup>
|
||||||
<UseOfAtl>Static</UseOfAtl>
|
<PropertyGroup Label="Configuration" Condition="'$(Platform)'=='ARM64'">
|
||||||
</PropertyGroup>
|
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
</PropertyGroup>
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
</ImportGroup>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
<ImportGroup 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\Win32.props" />
|
<Import Project="..\..\..\include\$(Platform).props" Condition="exists('..\..\..\include\$(Platform).props')" />
|
||||||
<Import Project="..\..\..\include\Release.props" />
|
<Import Project="..\..\..\include\$(Configuration).props" Condition="exists('..\..\..\include\$(Configuration).props')" />
|
||||||
<Import Project="MSICALib.props" />
|
</ImportGroup>
|
||||||
</ImportGroup>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
<PropertyGroup>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<OutDir>..\..\..\output\$(Platform).$(Configuration)\</OutDir>
|
||||||
<Import Project="..\..\..\include\Win32.props" />
|
</PropertyGroup>
|
||||||
<Import Project="..\..\..\include\Debug.props" />
|
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||||
<Import Project="MSICALib.props" />
|
<ClCompile>
|
||||||
</ImportGroup>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
</ClCompile>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
</ItemDefinitionGroup>
|
||||||
<Import Project="..\..\..\include\x64.props" />
|
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||||
<Import Project="..\..\..\include\Release.props" />
|
<ClCompile>
|
||||||
<Import Project="MSICALib.props" />
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ImportGroup>
|
</ClCompile>
|
||||||
<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" />
|
<ItemDefinitionGroup>
|
||||||
<Import Project="..\..\..\include\x64.props" />
|
<ClCompile>
|
||||||
<Import Project="..\..\..\include\Debug.props" />
|
<AdditionalIncludeDirectories>..\include;..\..\WinStd\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<Import Project="MSICALib.props" />
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
</ImportGroup>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
<PropertyGroup Label="UserMacros" />
|
</ClCompile>
|
||||||
<PropertyGroup>
|
</ItemDefinitionGroup>
|
||||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
<ItemGroup>
|
||||||
</PropertyGroup>
|
<ClCompile Include="..\src\OpCert.cpp" />
|
||||||
<ItemGroup>
|
<ClCompile Include="..\src\MSICALib.cpp" />
|
||||||
<ClCompile Include="..\src\OpCert.cpp" />
|
<ClCompile Include="..\src\OpFile.cpp" />
|
||||||
<ClCompile Include="..\src\MSICALib.cpp" />
|
<ClCompile Include="..\src\OpSvc.cpp" />
|
||||||
<ClCompile Include="..\src\OpFile.cpp" />
|
<ClCompile Include="..\src\OpTS.cpp" />
|
||||||
<ClCompile Include="..\src\OpSvc.cpp" />
|
<ClCompile Include="..\src\OpReg.cpp" />
|
||||||
<ClCompile Include="..\src\OpTS.cpp" />
|
<ClCompile Include="..\src\OpWLAN.cpp" />
|
||||||
<ClCompile Include="..\src\OpReg.cpp" />
|
<ClCompile Include="..\src\pch.cpp">
|
||||||
<ClCompile Include="..\src\OpWLAN.cpp" />
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||||
<ClCompile Include="..\src\stdafx.cpp">
|
</ClCompile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
</ItemGroup>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
<ItemGroup>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
<ClInclude Include="..\include\MSICALib.h" />
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
<ClInclude Include="..\src\pch.h" />
|
||||||
</ClCompile>
|
</ItemGroup>
|
||||||
</ItemGroup>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ItemGroup>
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
<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,56 +1,47 @@
|
|||||||
<?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>
|
||||||
<Filter Include="Resource Files">
|
</ItemGroup>
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<ItemGroup>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
<ClCompile Include="..\src\MSICALib.cpp">
|
||||||
</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ItemGroup>
|
</ClCompile>
|
||||||
<ItemGroup>
|
<ClCompile Include="..\src\OpFile.cpp">
|
||||||
<ClCompile Include="..\src\MSICALib.cpp">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Source Files</Filter>
|
</ClCompile>
|
||||||
</ClCompile>
|
<ClCompile Include="..\src\OpTS.cpp">
|
||||||
<ClCompile Include="..\src\OpFile.cpp">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Source Files</Filter>
|
</ClCompile>
|
||||||
</ClCompile>
|
<ClCompile Include="..\src\pch.cpp">
|
||||||
<ClCompile Include="..\src\OpTS.cpp">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Source Files</Filter>
|
</ClCompile>
|
||||||
</ClCompile>
|
<ClCompile Include="..\src\OpReg.cpp">
|
||||||
<ClCompile Include="..\src\stdafx.cpp">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Source Files</Filter>
|
</ClCompile>
|
||||||
</ClCompile>
|
<ClCompile Include="..\src\OpCert.cpp">
|
||||||
<ClCompile Include="..\src\OpReg.cpp">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Source Files</Filter>
|
</ClCompile>
|
||||||
</ClCompile>
|
<ClCompile Include="..\src\OpSvc.cpp">
|
||||||
<ClCompile Include="..\src\OpCert.cpp">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Source Files</Filter>
|
</ClCompile>
|
||||||
</ClCompile>
|
<ClCompile Include="..\src\OpWLAN.cpp">
|
||||||
<ClCompile Include="..\src\OpSvc.cpp">
|
<Filter>Source Files</Filter>
|
||||||
<Filter>Source Files</Filter>
|
</ClCompile>
|
||||||
</ClCompile>
|
</ItemGroup>
|
||||||
<ClCompile Include="..\src\OpWLAN.cpp">
|
<ItemGroup>
|
||||||
<Filter>Source Files</Filter>
|
<ClInclude Include="..\include\MSICALib.h">
|
||||||
</ClCompile>
|
<Filter>Header Files</Filter>
|
||||||
</ItemGroup>
|
</ClInclude>
|
||||||
<ItemGroup>
|
<ClInclude Include="..\src\pch.h">
|
||||||
<ClInclude Include="..\include\MSICALib.h">
|
<Filter>Header Files</Filter>
|
||||||
<Filter>Header Files</Filter>
|
</ClInclude>
|
||||||
</ClInclude>
|
</ItemGroup>
|
||||||
<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>
|
1095
include/MSICALib.h
1095
include/MSICALib.h
File diff suppressed because it is too large
Load Diff
226
locale/MSICALib.pot
Normal file
226
locale/MSICALib.pot
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
#, 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
Normal file
218
locale/de_DE.po
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
#
|
||||||
|
#, 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
Normal file
270
locale/it_IT.po
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
# 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
Normal file
218
locale/ru_RU.po
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
#
|
||||||
|
#, 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,164 +1,47 @@
|
|||||||
|
#
|
||||||
|
#, 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: 2016-03-14 17:15+0100\n"
|
"POT-Creation-Date: 2018-09-19 08:58+0200\n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
||||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n"
|
||||||
"Language-Team: Amebis, d. o. o., Kamnik <simon.rozman@amebis.si>\n"
|
"Language-Team: Slovenian (Slovenia) (https://www.transifex.com/amebis/teams/91600/sl_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"
|
||||||
"X-Poedit-SourceCharset: UTF-8\n"
|
"Language: sl_SI\n"
|
||||||
"X-Poedit-KeywordsList: __\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-Basepath: ..\n"
|
||||||
"X-Generator: Poedit 1.8.7\n"
|
"X-Poedit-KeywordsList: __\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"
|
"X-Poedit-SearchPath-0: MSIBuild\n"
|
||||||
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||||||
|
|
||||||
# Windows charset for this language (decimal)
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:4
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:3
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:4
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:3
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:4
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:3 MSIBuild/En.x64.Release.Error-2.idtx:3
|
#: MSIBuild/en_US.x64.Release.Error-2.idtx:4
|
||||||
msgid "1252"
|
msgid ""
|
||||||
msgstr "1250"
|
"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:5
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:5
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:5
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:5
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:5 MSIBuild/En.x64.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."
|
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.Win32.Debug.Error-2.idtx:22
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:6
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:22
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:6
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:22
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:6
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:22
|
#: MSIBuild/en_US.x64.Release.Error-2.idtx:6
|
||||||
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.Win32.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:17
|
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:17
|
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:17
|
|
||||||
msgid ""
|
|
||||||
"Error [3] changing service \"[2]\" start type. Please, contact your support "
|
|
||||||
"personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri nastavljanju servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
|
||||||
"tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:11
|
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:11
|
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:11
|
|
||||||
#: 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 ""
|
|
||||||
"Error [3] starting service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri zagonu servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
|
||||||
"tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:19
|
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:19
|
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:19
|
|
||||||
msgid ""
|
|
||||||
"Error [3] stopping service \"[2]\". Please, contact your support personnel."
|
|
||||||
msgstr ""
|
|
||||||
"Pri zaustavitvi servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
|
||||||
"tehnično službo."
|
|
||||||
|
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:6
|
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:6
|
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:6 MSIBuild/En.x64.Release.Error-2.idtx:6
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error [3] writing to \"[2]\" task list file. Please, contact your support "
|
"Error [3] writing to \"[2]\" task list file. Please, contact your support "
|
||||||
"personnel."
|
"personnel."
|
||||||
@ -166,10 +49,84 @@ msgstr ""
|
|||||||
"Pri pisanju v datoteko seznama opravil »[2]« je prišlo do napake [3]. "
|
"Pri pisanju v datoteko seznama opravil »[2]« je prišlo do napake [3]. "
|
||||||
"Obrnite se na svojo tehnično službo."
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:14
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:7
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:14
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:7
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:14
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:7
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:14
|
#: 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."
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"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 ""
|
msgid ""
|
||||||
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your "
|
"Error [4] copying \"[2]\" scheduled task to \"[3]\". Please, contact your "
|
||||||
"support personnel."
|
"support personnel."
|
||||||
@ -177,54 +134,63 @@ msgstr ""
|
|||||||
"Pri kopiranju razporejenega opravila »[2]« v »[3]« je prišlo do napake [4]. "
|
"Pri kopiranju razporejenega opravila »[2]« v »[3]« je prišlo do napake [4]. "
|
||||||
"Obrnite se na svojo tehnično službo."
|
"Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:24
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:15
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:24
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:15
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:24
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:15
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:24
|
#: MSIBuild/en_US.x64.Release.Error-2.idtx:15
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error [4] deleting profile \"[3]\" on WLAN interface [2]. Please, contact "
|
"Error [3] installing certificate to certificate store \"[2]\". Please, "
|
||||||
"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."
|
"contact your support personnel."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pri preimenovanju profila »[3]« v »[4]« na vmesniku WLAN [2] je prišlo do "
|
"Pri nameščanju digitalnega potrdila v shrambo »[2]« je prišlo do napake [3]."
|
||||||
"napake [5]. Obrnite se na svojo tehnično službo."
|
" Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:26
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:16
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:26
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:16
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:26
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:16
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:26
|
#: MSIBuild/en_US.x64.Release.Error-2.idtx:16
|
||||||
msgid ""
|
msgid ""
|
||||||
"Error [5] setting profile \"[3]\" on WLAN interface [2] (WLAN reason is "
|
"Error [3] removing certificate from certificate store \"[2]\". Please, "
|
||||||
"[4]). Please, contact your support personnel."
|
"contact your support personnel."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pri nastavljanju profila »[3]« na vmesniku WLAN [2] je prišlo do napake [5] "
|
"Pri odstranjevanju digitalnega potrdila iz shrambe »[2]« je prišlo do napake"
|
||||||
"(vzrok WLAN je [4]). Obrnite se na svojo tehnično službo."
|
" [3]. Obrnite se na svojo tehnično službo."
|
||||||
|
|
||||||
#: MSIBuild/En.Win32.Debug.Error-2.idtx:20
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:17
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:20
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:17
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:20
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:17
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:20
|
#: MSIBuild/en_US.x64.Release.Error-2.idtx:17
|
||||||
|
msgid ""
|
||||||
|
"Error [3] changing service \"[2]\" start type. Please, contact your support "
|
||||||
|
"personnel."
|
||||||
|
msgstr ""
|
||||||
|
"Pri nastavljanju servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
|
"tehnično službo."
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Pri zagonu servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
|
"tehnično službo."
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Pri zaustavitvi servisa »[2]« je prišlo do napake [3]. Obrnite se na svojo "
|
||||||
|
"tehnično službo."
|
||||||
|
|
||||||
|
#: 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 ""
|
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 "
|
||||||
@ -234,19 +200,10 @@ 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.Win32.Debug.Error-2.idtx:4
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:21
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:4
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:21
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:4 MSIBuild/En.x64.Release.Error-2.idtx:4
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:21
|
||||||
msgid ""
|
#: MSIBuild/en_US.x64.Release.Error-2.idtx:21
|
||||||
"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 "
|
||||||
@ -256,13 +213,55 @@ 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.Win32.Debug.Error-2.idtx:23
|
#: MSIBuild/en_US.Win32.Debug.Error-2.idtx:22
|
||||||
#: MSIBuild/En.Win32.Release.Error-2.idtx:23
|
#: MSIBuild/en_US.Win32.Release.Error-2.idtx:22
|
||||||
#: MSIBuild/En.x64.Debug.Error-2.idtx:23
|
#: MSIBuild/en_US.x64.Debug.Error-2.idtx:22
|
||||||
#: MSIBuild/En.x64.Release.Error-2.idtx:23
|
#: MSIBuild/en_US.x64.Release.Error-2.idtx:22
|
||||||
|
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,25 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 "stdafx.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#pragma comment(lib, "msi.lib")
|
#pragma comment(lib, "msi.lib")
|
||||||
|
#pragma comment(lib, "shlwapi.lib")
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -33,6 +20,10 @@ COperation::COperation(int iTicks) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
COperation::~COperation()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// COpTypeSingleString
|
// COpTypeSingleString
|
||||||
@ -89,65 +80,42 @@ HRESULT COpRollbackEnable::Execute(CSession *pSession)
|
|||||||
// COpList
|
// COpList
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
COpList::COpList(int iTicks) :
|
COpList::COpList(int iTicks) : COperation(iTicks)
|
||||||
COperation(iTicks),
|
|
||||||
ATL::CAtlList<COperation*>(sizeof(COperation*))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void COpList::Free()
|
DWORD COpList::LoadFromFile(LPCTSTR pszFileName)
|
||||||
{
|
{
|
||||||
POSITION pos;
|
CStream fSequence(CreateFile(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL));
|
||||||
|
if (!fSequence)
|
||||||
for (pos = GetHeadPosition(); pos;) {
|
return GetLastError();
|
||||||
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.
|
||||||
return fSequence >> *this;
|
if (!(fSequence >> *this))
|
||||||
|
return GetLastError();
|
||||||
|
|
||||||
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT COpList::SaveToFile(LPCTSTR pszFileName) const
|
DWORD COpList::SaveToFile(LPCTSTR pszFileName) const
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
CStream fSequence(CreateFile(pszFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL));
|
||||||
ATL::CAtlFile fSequence;
|
if (!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.
|
||||||
hr = fSequence << *this;
|
DWORD dwResult = (fSequence << *this) ? NO_ERROR : GetLastError();
|
||||||
fSequence.Close();
|
fSequence.free();
|
||||||
|
|
||||||
if (FAILED(hr)) ::DeleteFile(pszFileName);
|
if (dwResult != NO_ERROR) ::DeleteFile(pszFileName);
|
||||||
return hr;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT COpList::Execute(CSession *pSession)
|
HRESULT COpList::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
POSITION pos;
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(3);
|
||||||
|
|
||||||
@ -161,8 +129,8 @@ HRESULT COpList::Execute(CSession *pSession)
|
|||||||
::MsiRecordSetInteger(hRecordProg, 1, 2);
|
::MsiRecordSetInteger(hRecordProg, 1, 2);
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, 0);
|
::MsiRecordSetInteger(hRecordProg, 3, 0);
|
||||||
|
|
||||||
for (pos = GetHeadPosition(); pos;) {
|
for (auto op = cbegin(), op_end = cend(); op != op_end; ++op) {
|
||||||
COperation *pOp = GetNext(pos);
|
COperation *pOp = op->get();
|
||||||
|
|
||||||
hr = pOp->Execute(pSession);
|
hr = pOp->Execute(pSession);
|
||||||
if (!pSession->m_bContinueOnError && FAILED(hr)) {
|
if (!pSession->m_bContinueOnError && FAILED(hr)) {
|
||||||
@ -173,7 +141,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 AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
return HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
::MsiRecordSetInteger(hRecordProg, 2, m_iTicks);
|
::MsiRecordSetInteger(hRecordProg, 2, m_iTicks);
|
||||||
@ -195,48 +163,41 @@ 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;
|
||||||
ATL::CAtlString sSequenceFilename;
|
DWORD dwResult;
|
||||||
ATL::CAtlFile fSequence;
|
winstd::tstring sSequenceFilename;
|
||||||
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.
|
||||||
{
|
{
|
||||||
LPTSTR szBuffer = sSequenceFilename.GetBuffer(MAX_PATH);
|
std::unique_ptr<TCHAR> szBuffer(new TCHAR[MAX_PATH]);
|
||||||
::GetTempPath(MAX_PATH, szBuffer);
|
if (!szBuffer) return ERROR_OUTOFMEMORY;
|
||||||
::GetTempFileName(szBuffer, _T("MSICA"), 0, szBuffer);
|
::GetTempPath(MAX_PATH, szBuffer.get());
|
||||||
sSequenceFilename.ReleaseBuffer();
|
::GetTempFileName(szBuffer.get(), _T("MSICA"), 0, szBuffer.get());
|
||||||
|
sSequenceFilename.assign(szBuffer.get(), wcsnlen(szBuffer.get(), MAX_PATH));
|
||||||
}
|
}
|
||||||
// Save execute sequence to file.
|
// Save execute sequence to file.
|
||||||
hr = olExecute.SaveToFile(sSequenceFilename);
|
dwResult = olExecute.SaveToFile(sSequenceFilename.c_str());
|
||||||
if (SUCCEEDED(hr)) {
|
if (dwResult == NO_ERROR) {
|
||||||
// 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);
|
uiResult = ::MsiSetProperty(hInstall, szActionExecute, sSequenceFilename.c_str());
|
||||||
if (uiResult == NO_ERROR) {
|
if (uiResult == NO_ERROR) {
|
||||||
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename);
|
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename.c_str());
|
||||||
ATL::CAtlString sSequenceFilename2;
|
winstd::tstring sSequenceFilename2;
|
||||||
|
|
||||||
sSequenceFilename2.Format(_T("%.*ls-rb%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
sprintf(sSequenceFilename2, _T("%.*ls-rb%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
||||||
uiResult = ::MsiSetProperty(hInstall, szActionRollback, sSequenceFilename2);
|
uiResult = ::MsiSetProperty(hInstall, szActionRollback, sSequenceFilename2.c_str());
|
||||||
if (uiResult == NO_ERROR) {
|
if (uiResult == NO_ERROR) {
|
||||||
sSequenceFilename2.Format(_T("%.*ls-cm%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
sprintf(sSequenceFilename2, _T("%.*ls-cm%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
||||||
uiResult = ::MsiSetProperty(hInstall, szActionCommit, sSequenceFilename2);
|
uiResult = ::MsiSetProperty(hInstall, szActionCommit, sSequenceFilename2.c_str());
|
||||||
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 );
|
||||||
@ -255,12 +216,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);
|
if (uiResult != NO_ERROR) ::DeleteFile(sSequenceFilename.c_str());
|
||||||
} else {
|
} else {
|
||||||
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
uiResult = ERROR_INSTALL_SCRIPT_WRITE;
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
::MsiRecordSetInteger(hRecordProg, 1, uiResult );
|
||||||
::MsiRecordSetString (hRecordProg, 2, sSequenceFilename);
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilename.c_str());
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
||||||
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,9 +232,10 @@ 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;
|
||||||
BOOL bIsCoInitialized = SUCCEEDED(::CoInitialize(NULL));
|
winstd::com_initializer com_init(NULL);
|
||||||
ATL::CAtlString sSequenceFilename;
|
winstd::tstring sSequenceFilename;
|
||||||
|
|
||||||
uiResult = ::MsiGetProperty(hInstall, _T("CustomActionData"), sSequenceFilename);
|
uiResult = ::MsiGetProperty(hInstall, _T("CustomActionData"), sSequenceFilename);
|
||||||
if (uiResult == NO_ERROR) {
|
if (uiResult == NO_ERROR) {
|
||||||
@ -281,8 +243,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.
|
||||||
hr = lstOperations.LoadFromFile(sSequenceFilename);
|
dwResult = lstOperations.LoadFromFile(sSequenceFilename.c_str());
|
||||||
if (SUCCEEDED(hr)) {
|
if (dwResult == NO_ERROR) {
|
||||||
MSICA::CSession session;
|
MSICA::CSession session;
|
||||||
|
|
||||||
session.m_hInstall = hInstall;
|
session.m_hInstall = hInstall;
|
||||||
@ -295,52 +257,51 @@ 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);
|
LPCTSTR pszExtension = ::PathFindExtension(sSequenceFilename.c_str());
|
||||||
ATL::CAtlString sSequenceFilenameCM, sSequenceFilenameRB;
|
winstd::tstring sSequenceFilenameCM, sSequenceFilenameRB;
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
sSequenceFilenameRB.Format(_T("%.*ls-rb%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
sprintf(sSequenceFilenameRB, _T("%.*ls-rb%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
||||||
sSequenceFilenameCM.Format(_T("%.*ls-cm%ls"), pszExtension - (LPCTSTR)sSequenceFilename, (LPCTSTR)sSequenceFilename, pszExtension);
|
sprintf(sSequenceFilenameCM, _T("%.*ls-cm%ls"), (unsigned int)(pszExtension - sSequenceFilename.c_str()), sSequenceFilename.c_str(), pszExtension);
|
||||||
|
|
||||||
// After commit, delete rollback file. After rollback, delete commit file.
|
// After commit, delete rollback file. After rollback, delete commit file.
|
||||||
session.m_olCommit.AddTail(new MSICA::COpFileDelete(
|
session.m_olCommit.push_back(new MSICA::COpFileDelete(
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
sSequenceFilenameRB
|
sSequenceFilenameRB.c_str()
|
||||||
#else
|
#else
|
||||||
ATL::CAtlStringW(sSequenceFilenameRB)
|
std::wstring(sSequenceFilenameRB)
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
session.m_olRollback.AddTail(new MSICA::COpFileDelete(
|
session.m_olRollback.push_back(new MSICA::COpFileDelete(
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
sSequenceFilenameCM
|
sSequenceFilenameCM.c_str()
|
||||||
#else
|
#else
|
||||||
ATL::CAtlStringW(sSequenceFilenameCM)
|
std::wstring(sSequenceFilenameCM)
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
||||||
// Save commit file first.
|
// Save commit file first.
|
||||||
hr = session.m_olCommit.SaveToFile(sSequenceFilenameCM);
|
dwResult = session.m_olCommit.SaveToFile(sSequenceFilenameCM.c_str());
|
||||||
if (SUCCEEDED(hr)) {
|
if (dwResult == NO_ERROR) {
|
||||||
// Save rollback file next.
|
// Save rollback file next.
|
||||||
hr = session.m_olRollback.SaveToFile(sSequenceFilenameRB);
|
dwResult = session.m_olRollback.SaveToFile(sSequenceFilenameRB.c_str());
|
||||||
if (SUCCEEDED(hr)) {
|
if (dwResult == NO_ERROR) {
|
||||||
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);
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilenameRB.c_str());
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
||||||
::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);
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilenameCM.c_str());
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
||||||
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +310,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);
|
::DeleteFile(sSequenceFilenameRB.c_str());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No cleanup after cleanup support.
|
// No cleanup after cleanup support.
|
||||||
@ -361,8 +322,8 @@ UINT ExecuteSequence(MSIHANDLE hInstall)
|
|||||||
uiResult = HRESULT_CODE(hr);
|
uiResult = HRESULT_CODE(hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
::DeleteFile(sSequenceFilename);
|
::DeleteFile(sSequenceFilename.c_str());
|
||||||
} else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) && bIsCleanup) {
|
} else if (dwResult == 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.
|
||||||
@ -371,18 +332,15 @@ 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);
|
::MsiRecordSetString (hRecordProg, 2, sSequenceFilename.c_str());
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, dwResult );
|
||||||
::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,23 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 "stdafx.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#pragma comment(lib, "crypt32.lib")
|
#pragma comment(lib, "crypt32.lib")
|
||||||
|
|
||||||
@ -41,10 +27,9 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -63,25 +48,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);
|
hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_W, m_dwEncodingType, NULL, m_dwFlags, m_sValue.c_str());
|
||||||
if (hCertStore) {
|
if (hCertStore) {
|
||||||
// Create certificate context.
|
// Create certificate context.
|
||||||
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.GetData(), (DWORD)(m_binCert.GetCount()));
|
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.data(), static_cast<DWORD>(m_binCert.size()));
|
||||||
if (pCertContext) {
|
if (pCertContext) {
|
||||||
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
||||||
ATL::CAtlStringW sCertName;
|
std::wstring 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);
|
::MsiRecordSetStringW(hRecordMsg, 1, sCertName.c_str());
|
||||||
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
||||||
return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
return HRESULT_FROM_WIN32(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.AddHead(new COpCertRemove(m_binCert.GetData(), m_binCert.GetCount(), m_sValue, m_dwEncodingType, m_dwFlags));
|
pSession->m_olRollback.push_front(new COpCertRemove(m_binCert.data(), m_binCert.size(), m_sValue.c_str(), m_dwEncodingType, m_dwFlags));
|
||||||
}
|
}
|
||||||
dwError = NO_ERROR;
|
dwError = NO_ERROR;
|
||||||
} else {
|
} else {
|
||||||
@ -103,10 +88,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,20 +111,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);
|
hCertStore = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_W, m_dwEncodingType, NULL, m_dwFlags, m_sValue.c_str());
|
||||||
if (hCertStore) {
|
if (hCertStore) {
|
||||||
// Create certificate context.
|
// Create certificate context.
|
||||||
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.GetData(), (DWORD)(m_binCert.GetCount()));
|
PCCERT_CONTEXT pCertContext = ::CertCreateCertificateContext(m_dwEncodingType, m_binCert.data(), static_cast<DWORD>(m_binCert.size()));
|
||||||
if (pCertContext) {
|
if (pCertContext) {
|
||||||
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordMsg = ::MsiCreateRecord(1);
|
||||||
ATL::CAtlStringW sCertName;
|
std::wstring 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);
|
::MsiRecordSetStringW(hRecordMsg, 1, sCertName.c_str());
|
||||||
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
||||||
return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
return HRESULT_FROM_WIN32(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) {
|
||||||
@ -147,7 +132,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.AddHead(new COpCertInstall(m_binCert.GetData(), m_binCert.GetCount(), m_sValue, m_dwEncodingType, m_dwFlags));
|
pSession->m_olRollback.push_front(new COpCertInstall(m_binCert.data(), m_binCert.size(), m_sValue.c_str(), m_dwEncodingType, m_dwFlags));
|
||||||
}
|
}
|
||||||
dwError = NO_ERROR;
|
dwError = NO_ERROR;
|
||||||
} else {
|
} else {
|
||||||
@ -170,10 +155,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,23 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 "stdafx.h"
|
#include "pch.h"
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -37,24 +23,24 @@ HRESULT COpFileDelete::Execute(CSession *pSession)
|
|||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
ATL::CAtlStringW sBackupName;
|
std::wstring sBackupName;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Rename the file to make a backup.
|
// Rename the file to make a backup.
|
||||||
sBackupName.Format(L"%ls (orig %u)", (LPCWSTR)m_sValue, ++uiCount);
|
sprintf(sBackupName, L"%ls (orig %u)", m_sValue.c_str(), ++uiCount);
|
||||||
dwError = ::MoveFileW(m_sValue, sBackupName) ? NO_ERROR : ::GetLastError();
|
dwError = ::MoveFileW(m_sValue.c_str(), sBackupName.c_str()) ? 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.AddHead(new COpFileMove(sBackupName, m_sValue));
|
pSession->m_olRollback.push_front(new COpFileMove(sBackupName.c_str(), m_sValue.c_str()));
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.AddTail(new COpFileDelete(sBackupName));
|
pSession->m_olCommit.push_back(new COpFileDelete(sBackupName.c_str()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Delete the file.
|
// Delete the file.
|
||||||
dwError = ::DeleteFileW(m_sValue) ? NO_ERROR : ::GetLastError();
|
dwError = ::DeleteFileW(m_sValue.c_str()) ? NO_ERROR : ::GetLastError();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwError == NO_ERROR || dwError == ERROR_FILE_NOT_FOUND)
|
if (dwError == NO_ERROR || dwError == ERROR_FILE_NOT_FOUND)
|
||||||
@ -62,10 +48,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,22 +71,22 @@ HRESULT COpFileMove::Execute(CSession *pSession)
|
|||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
// Move the file.
|
// Move the file.
|
||||||
dwError = ::MoveFileW(m_sValue1, m_sValue2) ? NO_ERROR : ::GetLastError();
|
dwError = ::MoveFileW(m_sValue1.c_str(), m_sValue2.c_str()) ? 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.AddHead(new COpFileMove(m_sValue2, m_sValue1));
|
pSession->m_olRollback.push_front(new COpFileMove(m_sValue2.c_str(), m_sValue1.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue1.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2 );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
407
src/OpReg.cpp
407
src/OpReg.cpp
@ -1,23 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 "stdafx.h"
|
#include "pch.h"
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -58,8 +44,8 @@ HRESULT COpRegKeyCreate::Execute(CSession *pSession)
|
|||||||
{
|
{
|
||||||
LONG lResult;
|
LONG lResult;
|
||||||
REGSAM samAdditional = 0;
|
REGSAM samAdditional = 0;
|
||||||
ATL::CAtlStringW sPartialName;
|
std::wstring sPartialName;
|
||||||
int iStart = 0;
|
size_t iStart = 0;
|
||||||
|
|
||||||
#ifndef _WIN64
|
#ifndef _WIN64
|
||||||
if (IsWow64Process()) {
|
if (IsWow64Process()) {
|
||||||
@ -71,24 +57,24 @@ HRESULT COpRegKeyCreate::Execute(CSession *pSession)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
|
|
||||||
int iStartNext = m_sValue.Find(L'\\', iStart);
|
size_t iStartNext = m_sValue.find(L'\\', iStart);
|
||||||
if (iStartNext >= 0)
|
if (iStartNext != std::wstring::npos)
|
||||||
sPartialName.SetString(m_sValue, iStartNext);
|
sPartialName.assign(m_sValue.c_str(), 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, 0, KEY_ENUMERATE_SUB_KEYS | samAdditional, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, sPartialName.c_str(), 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.AddHead(new COpRegKeyDelete(m_hKeyRoot, sPartialName));
|
pSession->m_olRollback.push_front(new COpRegKeyDelete(m_hKeyRoot, sPartialName.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the key.
|
// Create the key.
|
||||||
lResult = ::RegCreateKeyExW(m_hKeyRoot, sPartialName, NULL, NULL, REG_OPTION_NON_VOLATILE, KEY_ENUMERATE_SUB_KEYS | samAdditional, NULL, &hKey, NULL);
|
lResult = ::RegCreateKeyExW(m_hKeyRoot, sPartialName.c_str(), 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) {
|
||||||
@ -97,7 +83,7 @@ HRESULT COpRegKeyCreate::Execute(CSession *pSession)
|
|||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (iStartNext < 0) break;
|
if (iStartNext == std::wstring::npos) break;
|
||||||
iStart = iStartNext + 1;
|
iStart = iStartNext + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,12 +91,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, (UINT)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +119,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);
|
COpRegKeyDelete opDelete(m_hKeyRoot, m_sValue2.c_str());
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -147,22 +133,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.AddHead(new COpRegKeyDelete(m_hKeyRoot, m_sValue2));
|
pSession->m_olRollback.push_front(new COpRegKeyDelete(m_hKeyRoot, m_sValue2.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the registry key.
|
// Copy the registry key.
|
||||||
lResult = CopyKeyRecursively(m_hKeyRoot, m_sValue1, m_sValue2, samAdditional);
|
lResult = CopyKeyRecursively(m_hKeyRoot, m_sValue1.c_str(), m_sValue2.c_str(), 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, (UINT)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue1 );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue1.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValue2 );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValue2.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,29 +165,23 @@ 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) };
|
||||||
LPWSTR pszClass = new WCHAR[dwClassLen];
|
std::unique_ptr<WCHAR[]> 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, &dwClassLen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &dwSecurityDescriptorSize, NULL);
|
lResult = ::RegQueryInfoKeyW(hKeySrc, pszClass.get(), &dwClassLen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &dwSecurityDescriptorSize, NULL);
|
||||||
if (lResult != NO_ERROR) {
|
if (lResult != NO_ERROR) return lResult;
|
||||||
delete [] pszClass;
|
pszClass.get()[dwClassLen] = 0;
|
||||||
return lResult;
|
|
||||||
}
|
|
||||||
pszClass[dwClassLen] = 0;
|
|
||||||
|
|
||||||
// Get source key security descriptor.
|
// Get source key security descriptor.
|
||||||
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)(new BYTE[dwSecurityDescriptorSize]);
|
std::unique_ptr<BYTE[]> sd(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) {
|
if (lResult != NO_ERROR) return lResult;
|
||||||
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, REG_OPTION_NON_VOLATILE, KEY_WRITE | samAdditional, &sa, &hKeyDst, NULL);
|
lResult = ::RegCreateKeyExW(hKeyRoot, pszKeyNameDst, 0, pszClass.get(), 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,88 +194,80 @@ 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.
|
{
|
||||||
dwMaxValueNameLen++;
|
// Copy values first.
|
||||||
pszName = new WCHAR[dwMaxValueNameLen];
|
dwMaxValueNameLen++;
|
||||||
lpData = new BYTE[dwMaxDataSize];
|
std::unique_ptr<WCHAR[]> pszName(new WCHAR[dwMaxValueNameLen]);
|
||||||
for (dwIndex = 0; ; dwIndex++) {
|
if (!pszName) return ERROR_OUTOFMEMORY;
|
||||||
DWORD dwNameLen = dwMaxValueNameLen, dwType, dwValueSize = dwMaxDataSize;
|
std::unique_ptr<BYTE[]> lpData(new BYTE[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, &dwNameLen, NULL, &dwType, lpData, &dwValueSize);
|
lResult = ::RegEnumValueW(hKeySrc, dwIndex, pszName.get(), &dwNameLen, NULL, &dwType, lpData.get(), &dwValueSize);
|
||||||
if (lResult == ERROR_NO_MORE_ITEMS) {
|
if (lResult == ERROR_NO_MORE_ITEMS) break;
|
||||||
lResult = NO_ERROR;
|
else if (lResult != NO_ERROR ) return lResult;
|
||||||
break;
|
|
||||||
} else if (lResult != NO_ERROR)
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Save value.
|
// Save value.
|
||||||
lResult = ::RegSetValueExW(hKeyDst, pszName, 0, dwType, lpData, dwValueSize);
|
lResult = ::RegSetValueExW(hKeyDst, pszName.get(), 0, dwType, lpData.get(), dwValueSize);
|
||||||
if (lResult != NO_ERROR)
|
if (lResult != NO_ERROR) return lResult;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
delete [] lpData;
|
|
||||||
delete [] pszName;
|
|
||||||
if (lResult != NO_ERROR) return lResult;
|
|
||||||
|
|
||||||
// Iterate over all subkeys and copy them.
|
{
|
||||||
dwMaxSubKeyLen++;
|
// Iterate over all subkeys and copy them.
|
||||||
pszName = new WCHAR[dwMaxSubKeyLen];
|
dwMaxSubKeyLen++;
|
||||||
dwMaxClassLen++;
|
std::unique_ptr<WCHAR[]> pszName(new WCHAR[dwMaxSubKeyLen]);
|
||||||
pszClass = new WCHAR[dwMaxClassLen];
|
if (!pszName) return ERROR_OUTOFMEMORY;
|
||||||
for (dwIndex = 0; ; dwIndex++) {
|
dwMaxClassLen++;
|
||||||
DWORD dwNameLen = dwMaxSubKeyLen, dwClassLen = dwMaxClassLen;
|
std::unique_ptr<WCHAR[]> pszClass(new WCHAR[dwMaxClassLen]);
|
||||||
HKEY hKeySrcSub, hKeyDstSub;
|
if (!pszClass) return ERROR_OUTOFMEMORY;
|
||||||
|
for (dwIndex = 0; ; dwIndex++) {
|
||||||
|
DWORD dwNameLen = dwMaxSubKeyLen, dwClassLen = dwMaxClassLen;
|
||||||
|
HKEY hKeySrcSub, hKeyDstSub;
|
||||||
|
|
||||||
// Read subkey.
|
// Read subkey.
|
||||||
lResult = ::RegEnumKeyExW(hKeySrc, dwIndex, pszName, &dwNameLen, NULL, pszClass, &dwClassLen, NULL);
|
lResult = ::RegEnumKeyExW(hKeySrc, dwIndex, pszName.get(), &dwNameLen, NULL, pszClass.get(), &dwClassLen, NULL);
|
||||||
if (lResult == ERROR_NO_MORE_ITEMS) {
|
if (lResult == ERROR_NO_MORE_ITEMS) break;
|
||||||
lResult = NO_ERROR;
|
else if (lResult != NO_ERROR ) return lResult;
|
||||||
break;
|
|
||||||
} else if (lResult != NO_ERROR)
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Open source subkey.
|
// Open source subkey.
|
||||||
lResult = ::RegOpenKeyExW(hKeySrc, pszName, 0, READ_CONTROL | KEY_READ | samAdditional, &hKeySrcSub);
|
lResult = ::RegOpenKeyExW(hKeySrc, pszName.get(), 0, READ_CONTROL | KEY_READ | samAdditional, &hKeySrcSub);
|
||||||
if (lResult != NO_ERROR) break;
|
if (lResult != NO_ERROR) return lResult;
|
||||||
|
|
||||||
{
|
{
|
||||||
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) break;
|
if (lResult != NO_ERROR) return lResult;
|
||||||
|
|
||||||
// Get source subkey security descriptor.
|
// Get source subkey security descriptor.
|
||||||
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)(new BYTE[dwSecurityDescriptorSize]);
|
std::unique_ptr<BYTE[]> sd(new BYTE[dwSecurityDescriptorSize]);
|
||||||
lResult = ::RegGetKeySecurity(hKeySrc, DACL_SECURITY_INFORMATION, sa.lpSecurityDescriptor, &dwSecurityDescriptorSize);
|
if (!sd) return ERROR_OUTOFMEMORY;
|
||||||
if (lResult != NO_ERROR) {
|
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)sd.get();
|
||||||
delete [] (LPBYTE)(sa.lpSecurityDescriptor);
|
lResult = ::RegGetKeySecurity(hKeySrc, DACL_SECURITY_INFORMATION, sa.lpSecurityDescriptor, &dwSecurityDescriptorSize);
|
||||||
break;
|
if (lResult != NO_ERROR) return lResult;
|
||||||
|
|
||||||
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new destination subkey of the same class and security.
|
// Copy subkey recursively.
|
||||||
lResult = ::RegCreateKeyExW(hKeyDst, pszName, 0, pszClass, REG_OPTION_NON_VOLATILE, KEY_WRITE | samAdditional, &sa, &hKeyDstSub, NULL);
|
lResult = CopyKeyRecursively(hKeySrcSub, hKeyDstSub, samAdditional);
|
||||||
delete [] (LPBYTE)(sa.lpSecurityDescriptor);
|
if (lResult != NO_ERROR) return lResult;
|
||||||
if (lResult != NO_ERROR) break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy subkey recursively.
|
|
||||||
lResult = CopyKeyRecursively(hKeySrcSub, hKeyDstSub, samAdditional);
|
|
||||||
if (lResult != NO_ERROR) break;
|
|
||||||
}
|
}
|
||||||
delete [] pszClass;
|
|
||||||
delete [] pszName;
|
|
||||||
|
|
||||||
return lResult;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -322,62 +294,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, 0, DELETE | samAdditional, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 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.
|
||||||
ATL::CAtlStringW sBackupName;
|
std::wstring sBackupName;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
int iLength = m_sValue.GetLength();
|
auto iLength = m_sValue.length();
|
||||||
|
|
||||||
// Trim trailing backslashes.
|
// Trim trailing backslashes.
|
||||||
while (iLength && m_sValue.GetAt(iLength - 1) == L'\\') iLength--;
|
while (iLength && m_sValue[iLength - 1] == L'\\') iLength--;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
HKEY hKey;
|
HKEY hKeyTest;
|
||||||
sBackupName.Format(L"%.*ls (orig %u)", iLength, (LPCWSTR)m_sValue, ++uiCount);
|
sprintf(sBackupName, L"%.*ls (orig %u)", (unsigned int)iLength, m_sValue.c_str(), ++uiCount);
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, sBackupName, 0, KEY_ENUMERATE_SUB_KEYS | samAdditional, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, sBackupName.c_str(), 0, KEY_ENUMERATE_SUB_KEYS | samAdditional, &hKeyTest);
|
||||||
if (lResult != NO_ERROR) break;
|
if (lResult != NO_ERROR) break;
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKeyTest);
|
||||||
}
|
}
|
||||||
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, sBackupName);
|
COpRegKeyCopy opCopy(m_hKeyRoot, m_sValue.c_str(), sBackupName.c_str());
|
||||||
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.AddHead(new COpRegKeyCopy(m_hKeyRoot, sBackupName, m_sValue));
|
pSession->m_olRollback.push_front(new COpRegKeyCopy(m_hKeyRoot, sBackupName.c_str(), m_sValue.c_str()));
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.AddTail(new COpRegKeyDelete(m_hKeyRoot, sBackupName));
|
pSession->m_olCommit.push_back(new COpRegKeyDelete(m_hKeyRoot, sBackupName.c_str()));
|
||||||
} 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, (UINT)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, sBackupName );
|
::MsiRecordSetStringW(hRecordProg, 3, sBackupName.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the registry key.
|
// Delete the registry key.
|
||||||
lResult = DeleteKeyRecursively(m_hKeyRoot, m_sValue, samAdditional);
|
lResult = DeleteKeyRecursively(m_hKeyRoot, m_sValue.c_str(), 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, (UINT)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
::MsiRecordSetInteger(hRecordProg, 4, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,20 +367,18 @@ 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++;
|
||||||
pszSubKeyName = new WCHAR[dwMaxSubKeyLen];
|
std::unique_ptr<WCHAR[]> 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, &dwNameLen, NULL, NULL, NULL, NULL);
|
lResult = ::RegEnumKeyExW(hKey, dwIndex, pszSubKeyName.get(), &dwNameLen, NULL, NULL, NULL, NULL);
|
||||||
if (lResult == NO_ERROR) {
|
if (lResult == NO_ERROR) {
|
||||||
lResult = DeleteKeyRecursively(hKey, pszSubKeyName, samAdditional);
|
lResult = DeleteKeyRecursively(hKey, pszSubKeyName.get(), 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) {
|
||||||
@ -417,8 +387,6 @@ LONG COpRegKeyDelete::DeleteKeyRecursively(HKEY hKeyRoot, LPCWSTR pszKeyName, RE
|
|||||||
} else
|
} else
|
||||||
dwIndex++;
|
dwIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete [] pszSubKeyName;
|
|
||||||
} else
|
} else
|
||||||
lResult = ERROR_OUTOFMEMORY;
|
lResult = ERROR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
@ -472,7 +440,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_dwData(dwData),
|
m_binData(reinterpret_cast<LPCBYTE>(&dwData), reinterpret_cast<LPCBYTE>(&dwData + 1)),
|
||||||
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -480,16 +448,15 @@ 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_sData(pszData),
|
m_binData(reinterpret_cast<LPCBYTE>(pszData), reinterpret_cast<LPCBYTE>(pszData + wcslen(pszData) + 1)),
|
||||||
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -497,7 +464,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_qwData(qwData),
|
m_binData(reinterpret_cast<LPCBYTE>(&qwData), reinterpret_cast<LPCBYTE>(&qwData + 1)),
|
||||||
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
COpRegValueSingle(hKeyRoot, pszKeyName, pszValueName, iTicks)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -513,7 +480,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, m_sValueName);
|
COpRegValueDelete opDelete(m_hKeyRoot, m_sValue.c_str(), m_sValueName.c_str());
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -526,41 +493,15 @@ HRESULT COpRegValueCreate::Execute(CSession *pSession)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Open the key.
|
// Open the key.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue, 0, sam, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 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.AddHead(new COpRegValueDelete(m_hKeyRoot, m_sValue, m_sValueName));
|
pSession->m_olRollback.push_front(new COpRegValueDelete(m_hKeyRoot, m_sValue.c_str(), m_sValueName.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the registry value.
|
// Set the registry value.
|
||||||
switch (m_dwType) {
|
lResult = ::RegSetValueExW(hKey, m_sValueName.c_str(), 0, m_dwType, m_binData.data(), static_cast<DWORD>(m_binData.size() * sizeof(BYTE)));
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -568,13 +509,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, (UINT)m_hKeyRoot & 0x7fffffff);
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,7 +539,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, m_sValueName2);
|
COpRegValueDelete opDelete(m_hKeyRoot, m_sValue.c_str(), m_sValueName2.c_str());
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -611,26 +552,28 @@ HRESULT COpRegValueCopy::Execute(CSession *pSession)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Open the key.
|
// Open the key.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue, 0, sam, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 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, 0, NULL, NULL, &dwSize);
|
lResult = ::RegQueryValueExW(hKey, m_sValueName1.c_str(), 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.
|
||||||
lResult = ::RegQueryValueExW(hKey, m_sValueName1, 0, &dwType, lpData, &dwSize);
|
std::unique_ptr<BYTE> lpData(new BYTE[dwSize]);
|
||||||
if (lResult == NO_ERROR) {
|
if (lpData) {
|
||||||
if (pSession->m_bRollbackEnabled) {
|
lResult = ::RegQueryValueExW(hKey, m_sValueName1.c_str(), 0, &dwType, lpData.get(), &dwSize);
|
||||||
// Order rollback action to delete the destination copy.
|
if (lResult == NO_ERROR) {
|
||||||
pSession->m_olRollback.AddHead(new COpRegValueDelete(m_hKeyRoot, m_sValue, m_sValueName2));
|
if (pSession->m_bRollbackEnabled) {
|
||||||
}
|
// 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.
|
// Store the value to destination.
|
||||||
lResult = ::RegSetValueExW(hKey, m_sValueName2, 0, dwType, lpData, dwSize);
|
lResult = ::RegSetValueExW(hKey, m_sValueName2.c_str(), 0, dwType, lpData.get(), dwSize);
|
||||||
}
|
}
|
||||||
delete [] lpData;
|
} else
|
||||||
|
lResult = ERROR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
@ -640,14 +583,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, (UINT)m_hKeyRoot & 0x7fffffff );
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName1 );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName1.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 5, m_sValueName2 );
|
::MsiRecordSetStringW(hRecordProg, 5, m_sValueName2.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 6, lResult );
|
::MsiRecordSetInteger(hRecordProg, 6, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -675,26 +618,26 @@ HRESULT COpRegValueDelete::Execute(CSession *pSession)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Open the key.
|
// Open the key.
|
||||||
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue, 0, sam, &hKey);
|
lResult = ::RegOpenKeyExW(m_hKeyRoot, m_sValue.c_str(), 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, 0, &dwType, NULL, NULL);
|
lResult = ::RegQueryValueExW(hKey, m_sValueName.c_str(), 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.
|
||||||
ATL::CAtlStringW sBackupName;
|
std::wstring sBackupName;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
sBackupName.Format(L"%ls (orig %u)", (LPCWSTR)m_sValueName, ++uiCount);
|
sprintf(sBackupName, L"%ls (orig %u)", m_sValueName.c_str(), ++uiCount);
|
||||||
lResult = ::RegQueryValueExW(hKey, sBackupName, 0, &dwType, NULL, NULL);
|
lResult = ::RegQueryValueExW(hKey, sBackupName.c_str(), 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, m_sValueName, sBackupName);
|
COpRegValueCopy opCopy(m_hKeyRoot, m_sValue.c_str(), m_sValueName.c_str(), sBackupName.c_str());
|
||||||
HRESULT hr = opCopy.Execute(pSession);
|
HRESULT hr = opCopy.Execute(pSession);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
@ -702,25 +645,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.AddHead(new COpRegValueCopy(m_hKeyRoot, m_sValue, sBackupName, m_sValueName));
|
pSession->m_olRollback.push_front(new COpRegValueCopy(m_hKeyRoot, m_sValue.c_str(), sBackupName.c_str(), m_sValueName.c_str()));
|
||||||
|
|
||||||
// Order commit action to delete backup copy.
|
// Order commit action to delete backup copy.
|
||||||
pSession->m_olCommit.AddTail(new COpRegValueDelete(m_hKeyRoot, m_sValue, sBackupName));
|
pSession->m_olCommit.push_back(new COpRegValueDelete(m_hKeyRoot, m_sValue.c_str(), sBackupName.c_str()));
|
||||||
} 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, (UINT)m_hKeyRoot & 0x7fffffff );
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, sBackupName );
|
::MsiRecordSetStringW(hRecordProg, 3, sBackupName.c_str() );
|
||||||
::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 AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the registry value.
|
// Delete the registry value.
|
||||||
lResult = ::RegDeleteValueW(hKey, m_sValueName);
|
lResult = ::RegDeleteValueW(hKey, m_sValueName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
::RegCloseKey(hKey);
|
::RegCloseKey(hKey);
|
||||||
@ -730,13 +673,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, (UINT)m_hKeyRoot & 0x7fffffff );
|
::MsiRecordSetInteger(hRecordProg, 2, (int)(UINT_PTR)m_hKeyRoot & 0x7fffffff);
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName );
|
::MsiRecordSetStringW(hRecordProg, 4, m_sValueName.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
::MsiRecordSetInteger(hRecordProg, 5, lResult );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(lResult);
|
return HRESULT_FROM_WIN32(lResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,23 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 "stdafx.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#pragma comment(lib, "advapi32.lib")
|
#pragma comment(lib, "advapi32.lib")
|
||||||
|
|
||||||
@ -46,7 +32,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, SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG);
|
hService = ::OpenServiceW(hSCM, m_sValue.c_str(), SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG);
|
||||||
if (hService) {
|
if (hService) {
|
||||||
QUERY_SERVICE_CONFIG *sc;
|
QUERY_SERVICE_CONFIG *sc;
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
@ -62,7 +48,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.AddHead(new COpSvcSetStart(m_sValue, sc->dwStartType));
|
pSession->m_olRollback.push_front(new COpSvcSetStart(m_sValue.c_str(), sc->dwStartType));
|
||||||
}
|
}
|
||||||
dwError = NO_ERROR;
|
dwError = NO_ERROR;
|
||||||
} else
|
} else
|
||||||
@ -87,10 +73,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,14 +150,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, SERVICE_START | (m_bWait ? SERVICE_QUERY_STATUS : 0));
|
hService = ::OpenServiceW(hSCM, m_sValue.c_str(), 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.AddHead(new COpSvcStop(m_sValue));
|
pSession->m_olRollback.push_front(new COpSvcStop(m_sValue.c_str()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dwError = ::GetLastError();
|
dwError = ::GetLastError();
|
||||||
@ -190,10 +176,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,7 +204,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, SERVICE_STOP | (m_bWait ? SERVICE_QUERY_STATUS : 0));
|
hService = ::OpenServiceW(hSCM, m_sValue.c_str(), SERVICE_STOP | (m_bWait ? SERVICE_QUERY_STATUS : 0));
|
||||||
if (hService) {
|
if (hService) {
|
||||||
SERVICE_STATUS ss;
|
SERVICE_STATUS ss;
|
||||||
// Stop the service.
|
// Stop the service.
|
||||||
@ -226,7 +212,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.AddHead(new COpSvcStart(m_sValue));
|
pSession->m_olRollback.push_front(new COpSvcStart(m_sValue.c_str()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dwError = ::GetLastError();
|
dwError = ::GetLastError();
|
||||||
@ -245,10 +231,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
::MsiRecordSetInteger(hRecordProg, 3, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
480
src/OpTS.cpp
480
src/OpTS.cpp
@ -1,23 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 "stdafx.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#pragma comment(lib, "mstask.lib")
|
#pragma comment(lib, "mstask.lib")
|
||||||
#pragma comment(lib, "taskschd.lib")
|
#pragma comment(lib, "taskschd.lib")
|
||||||
@ -40,55 +26,45 @@ 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);
|
||||||
CComPtr<ITaskService> pService;
|
winstd::com_obj<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);
|
::MsiRecordSetStringW(hRecordMsg, 1, m_sValue.c_str());
|
||||||
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
if (MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ACTIONDATA, hRecordMsg) == IDCANCEL)
|
||||||
return AtlHresultFromWin32(ERROR_INSTALL_USEREXIT);
|
return HRESULT_FROM_WIN32(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);
|
COpTaskDelete opDelete(m_sValue.c_str());
|
||||||
hr = opDelete.Execute(pSession);
|
hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
CComVariant vEmpty;
|
winstd::variant vEmpty;
|
||||||
CComPtr<ITaskDefinition> pTaskDefinition;
|
winstd::com_obj<ITaskDefinition> pTaskDefinition;
|
||||||
CComPtr<ITaskSettings> pTaskSettings;
|
winstd::com_obj<ITaskSettings> pTaskSettings;
|
||||||
CComPtr<IPrincipal> pPrincipal;
|
winstd::com_obj<IPrincipal> pPrincipal;
|
||||||
CComPtr<IActionCollection> pActionCollection;
|
winstd::com_obj<IActionCollection> pActionCollection;
|
||||||
CComPtr<IAction> pAction;
|
winstd::com_obj<IAction> pAction;
|
||||||
CComPtr<IIdleSettings> pIdleSettings;
|
winstd::com_obj<IIdleSettings> pIdleSettings;
|
||||||
CComPtr<IExecAction> pExecAction;
|
winstd::com_obj<IExecAction> pExecAction;
|
||||||
CComPtr<IRegistrationInfo> pRegististrationInfo;
|
winstd::com_obj<IRegistrationInfo> pRegististrationInfo;
|
||||||
CComPtr<ITriggerCollection> pTriggerCollection;
|
winstd::com_obj<ITriggerCollection> pTriggerCollection;
|
||||||
CComPtr<ITaskFolder> pTaskFolder;
|
winstd::com_obj<ITaskFolder> pTaskFolder;
|
||||||
CComPtr<IRegisteredTask> pTask;
|
winstd::com_obj<IRegisteredTask> pTask;
|
||||||
ATL::CAtlStringW str;
|
std::wstring str;
|
||||||
UINT iTrigger;
|
UINT iTrigger;
|
||||||
TASK_LOGON_TYPE logonType;
|
TASK_LOGON_TYPE logonType;
|
||||||
CComBSTR bstrContext(L"Author");
|
winstd::bstr 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);
|
||||||
@ -106,7 +82,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.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), 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;
|
||||||
@ -118,35 +94,28 @@ 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.QueryInterface(&pExecAction);
|
hr = pAction.query_interface(&pExecAction);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Configure the action.
|
// Configure the action.
|
||||||
hr = pExecAction->put_Path (CComBSTR(m_sApplicationName )); if (FAILED(hr)) goto finish;
|
hr = pExecAction->put_Path (winstd::bstr(m_sApplicationName )); if (FAILED(hr)) goto finish;
|
||||||
hr = pExecAction->put_Arguments (CComBSTR(m_sParameters )); if (FAILED(hr)) goto finish;
|
hr = pExecAction->put_Arguments (winstd::bstr(m_sParameters )); if (FAILED(hr)) goto finish;
|
||||||
hr = pExecAction->put_WorkingDirectory(CComBSTR(m_sWorkingDirectory)); if (FAILED(hr)) goto finish;
|
hr = pExecAction->put_WorkingDirectory(winstd::bstr(m_sWorkingDirectory)); if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Set task description.
|
// Set task description.
|
||||||
hr = pTaskDefinition->get_RegistrationInfo(&pRegististrationInfo);
|
hr = pTaskDefinition->get_RegistrationInfo(&pRegististrationInfo); if (FAILED(hr)) goto finish;
|
||||||
if (FAILED(hr)) goto finish;
|
hr = pRegististrationInfo->put_Author(winstd::bstr(m_sAuthor)); if (FAILED(hr)) goto finish;
|
||||||
hr = pRegististrationInfo->put_Author(CComBSTR(m_sAuthor));
|
hr = pRegististrationInfo->put_Description(winstd::bstr(m_sComment)); if (FAILED(hr)) goto finish;
|
||||||
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(CComBSTR(L"PT24H"));
|
hr = pTaskSettings->put_DeleteExpiredTaskAfter(winstd::bstr(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);
|
hr = pTaskSettings->put_Hidden(m_dwFlags & TASK_FLAG_HIDDEN ? VARIANT_TRUE : VARIANT_FALSE); if (FAILED(hr)) goto finish;
|
||||||
if (FAILED(hr)) goto finish;
|
hr = pTaskSettings->put_WakeToRun(m_dwFlags & TASK_FLAG_SYSTEM_REQUIRED ? 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_DisallowStartIfOnBatteries(m_dwFlags & TASK_FLAG_DONT_START_IF_ON_BATTERIES ? VARIANT_TRUE : VARIANT_FALSE); if (FAILED(hr)) goto finish;
|
||||||
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;
|
||||||
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(
|
||||||
@ -162,38 +131,36 @@ 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.IsEmpty()) {
|
if (m_sAccountName.empty()) {
|
||||||
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(CComBSTR(L"S-1-5-18")); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_UserId(winstd::bstr(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(CComBSTR(m_sAccountName)); if (FAILED(hr)) goto finish;
|
hr = pPrincipal->put_UserId(winstd::bstr(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);
|
hr = pPrincipal->put_Id(bstrContext); if (FAILED(hr)) goto finish;
|
||||||
if (FAILED(hr)) goto finish;
|
hr = pActionCollection->put_Context(bstrContext); 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;
|
||||||
str.Format(L"PT%uS", m_wIdleMinutes*60);
|
sprintf(str, L"PT%uS", m_wIdleMinutes*60);
|
||||||
hr = pIdleSettings->put_IdleDuration(CComBSTR(str));
|
hr = pIdleSettings->put_IdleDuration(winstd::bstr(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
str.Format(L"PT%uS", m_wDeadlineMinutes*60);
|
sprintf(str, L"PT%uS", m_wDeadlineMinutes*60);
|
||||||
hr = pIdleSettings->put_WaitTimeout(CComBSTR(str));
|
hr = pIdleSettings->put_WaitTimeout(winstd::bstr(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;
|
||||||
@ -201,8 +168,8 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Configure task runtime limit.
|
// Configure task runtime limit.
|
||||||
str.Format(L"PT%uS", m_dwMaxRuntimeMS != INFINITE ? (m_dwMaxRuntimeMS + 500) / 1000 : 0);
|
sprintf(str, L"PT%uS", m_dwMaxRuntimeMS != INFINITE ? (m_dwMaxRuntimeMS + 500) / 1000 : 0);
|
||||||
hr = pTaskSettings->put_ExecutionTimeLimit(CComBSTR(str));
|
hr = pTaskSettings->put_ExecutionTimeLimit(winstd::bstr(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task trigger colection.
|
// Get task trigger colection.
|
||||||
@ -210,56 +177,57 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Add triggers.
|
// Add triggers.
|
||||||
for (pos = m_lTriggers.GetHeadPosition(), iTrigger = 0; pos; iTrigger++) {
|
iTrigger = 0;
|
||||||
CComPtr<ITrigger> pTrigger;
|
for (auto t = m_lTriggers.cbegin(), t_end = m_lTriggers.cend(); t != t_end; ++t, iTrigger++) {
|
||||||
TASK_TRIGGER &ttData = m_lTriggers.GetNext(pos);
|
winstd::com_obj<ITrigger> pTrigger;
|
||||||
|
const TASK_TRIGGER &ttData = *t;
|
||||||
|
|
||||||
switch (ttData.TriggerType) {
|
switch (ttData.TriggerType) {
|
||||||
case TASK_TIME_TRIGGER_ONCE: {
|
case TASK_TIME_TRIGGER_ONCE: {
|
||||||
CComPtr<ITimeTrigger> pTriggerTime;
|
winstd::com_obj<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.QueryInterface(&pTriggerTime); if (FAILED(hr)) goto finish;
|
hr = pTrigger.query_interface(&pTriggerTime); if (FAILED(hr)) goto finish;
|
||||||
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerTime->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerTime->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_DAILY: {
|
case TASK_TIME_TRIGGER_DAILY: {
|
||||||
CComPtr<IDailyTrigger> pTriggerDaily;
|
winstd::com_obj<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.QueryInterface(&pTriggerDaily); if (FAILED(hr)) goto finish;
|
hr = pTrigger.query_interface(&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;
|
||||||
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerDaily->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerDaily->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_WEEKLY: {
|
case TASK_TIME_TRIGGER_WEEKLY: {
|
||||||
CComPtr<IWeeklyTrigger> pTriggerWeekly;
|
winstd::com_obj<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.QueryInterface(&pTriggerWeekly); if (FAILED(hr)) goto finish;
|
hr = pTrigger.query_interface(&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;
|
||||||
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerWeekly->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerWeekly->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_MONTHLYDATE: {
|
case TASK_TIME_TRIGGER_MONTHLYDATE: {
|
||||||
CComPtr<IMonthlyTrigger> pTriggerMonthly;
|
winstd::com_obj<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.QueryInterface(&pTriggerMonthly); if (FAILED(hr)) goto finish;
|
hr = pTrigger.query_interface(&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;
|
||||||
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerMonthly->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthly->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_TIME_TRIGGER_MONTHLYDOW: {
|
case TASK_TIME_TRIGGER_MONTHLYDOW: {
|
||||||
CComPtr<IMonthlyDOWTrigger> pTriggerMonthlyDOW;
|
winstd::com_obj<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.QueryInterface(&pTriggerMonthlyDOW); if (FAILED(hr)) goto finish;
|
hr = pTrigger.query_interface(&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 :
|
||||||
@ -268,8 +236,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;
|
||||||
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerMonthlyDOW->put_RandomDelay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerMonthlyDOW->put_RandomDelay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,52 +247,52 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case TASK_EVENT_TRIGGER_AT_SYSTEMSTART: {
|
case TASK_EVENT_TRIGGER_AT_SYSTEMSTART: {
|
||||||
CComPtr<IBootTrigger> pTriggerBoot;
|
winstd::com_obj<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.QueryInterface(&pTriggerBoot); if (FAILED(hr)) goto finish;
|
hr = pTrigger.query_interface(&pTriggerBoot); if (FAILED(hr)) goto finish;
|
||||||
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerBoot->put_Delay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerBoot->put_Delay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TASK_EVENT_TRIGGER_AT_LOGON: {
|
case TASK_EVENT_TRIGGER_AT_LOGON: {
|
||||||
CComPtr<ILogonTrigger> pTriggerLogon;
|
winstd::com_obj<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.QueryInterface(&pTriggerLogon); if (FAILED(hr)) goto finish;
|
hr = pTrigger.query_interface(&pTriggerLogon); if (FAILED(hr)) goto finish;
|
||||||
str.Format(L"PT%uM", ttData.wRandomMinutesInterval);
|
sprintf(str, L"PT%uM", ttData.wRandomMinutesInterval);
|
||||||
hr = pTriggerLogon->put_Delay(CComBSTR(str)); if (FAILED(hr)) goto finish;
|
hr = pTriggerLogon->put_Delay(winstd::bstr(str)); if (FAILED(hr)) goto finish;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set trigger ID.
|
// Set trigger ID.
|
||||||
str.Format(L"%u", iTrigger);
|
sprintf(str, L"%u", iTrigger);
|
||||||
hr = pTrigger->put_Id(CComBSTR(str));
|
hr = pTrigger->put_Id(winstd::bstr(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Set trigger start date.
|
// Set trigger start date.
|
||||||
str.Format(L"%04u-%02u-%02uT%02u:%02u:00", ttData.wBeginYear, ttData.wBeginMonth, ttData.wBeginDay, ttData.wStartHour, ttData.wStartMinute);
|
sprintf(str, L"%04u-%02u-%02uT%02u:%02u:00", ttData.wBeginYear, ttData.wBeginMonth, ttData.wBeginDay, ttData.wStartHour, ttData.wStartMinute);
|
||||||
hr = pTrigger->put_StartBoundary(CComBSTR(str));
|
hr = pTrigger->put_StartBoundary(winstd::bstr(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.
|
||||||
str.Format(L"%04u-%02u-%02u", ttData.wEndYear, ttData.wEndMonth, ttData.wEndDay);
|
sprintf(str, L"%04u-%02u-%02u", ttData.wEndYear, ttData.wEndMonth, ttData.wEndDay);
|
||||||
hr = pTrigger->put_EndBoundary(CComBSTR(str));
|
hr = pTrigger->put_EndBoundary(winstd::bstr(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) {
|
||||||
CComPtr<IRepetitionPattern> pRepetitionPattern;
|
winstd::com_obj<IRepetitionPattern> pRepetitionPattern;
|
||||||
|
|
||||||
hr = pTrigger->get_Repetition(&pRepetitionPattern);
|
hr = pTrigger->get_Repetition(&pRepetitionPattern);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
str.Format(L"PT%uM", ttData.MinutesDuration);
|
sprintf(str, L"PT%uM", ttData.MinutesDuration);
|
||||||
hr = pRepetitionPattern->put_Duration(CComBSTR(str));
|
hr = pRepetitionPattern->put_Duration(winstd::bstr(str));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
str.Format(L"PT%uM", ttData.MinutesInterval);
|
sprintf(str, L"PT%uM", ttData.MinutesInterval);
|
||||||
hr = pRepetitionPattern->put_Interval(CComBSTR(str));
|
hr = pRepetitionPattern->put_Interval(winstd::bstr(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;
|
||||||
@ -336,69 +304,69 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the task folder.
|
// Get the task folder.
|
||||||
hr = pService->GetFolder(CComBSTR(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
CComBSTR xml;
|
winstd::bstr 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(
|
||||||
CComBSTR(m_sValue), // path
|
winstd::bstr(m_sValue), // path
|
||||||
pTaskDefinition, // pDefinition
|
pTaskDefinition, // pDefinition
|
||||||
TASK_CREATE, // flags
|
TASK_CREATE, // flags
|
||||||
vEmpty, // userId
|
vEmpty, // userId
|
||||||
logonType != TASK_LOGON_SERVICE_ACCOUNT && !m_sPassword.IsEmpty() ? CComVariant(m_sPassword) : vEmpty, // password
|
logonType != TASK_LOGON_SERVICE_ACCOUNT && !m_sPassword.empty() ? winstd::variant(m_sPassword.c_str()) : vEmpty, // password
|
||||||
logonType, // logonType
|
logonType, // logonType
|
||||||
vEmpty, // sddl
|
vEmpty, // sddl
|
||||||
&pTask); // ppTask
|
&pTask); // ppTask
|
||||||
} else {
|
} else {
|
||||||
// Windows XP or older.
|
// Windows XP or older.
|
||||||
CComPtr<ITaskScheduler> pTaskScheduler;
|
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
||||||
CComPtr<ITask> pTask;
|
winstd::com_obj<ITask> pTask;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Create the new task.
|
// Create the new task.
|
||||||
hr = pTaskScheduler->NewWorkItem(m_sValue, CLSID_CTask, IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->NewWorkItem(m_sValue.c_str(), 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.AddHead(new COpTaskDelete(m_sValue));
|
pSession->m_olRollback.push_front(new COpTaskDelete(m_sValue.c_str()));
|
||||||
}
|
}
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Set its properties.
|
// Set its properties.
|
||||||
hr = pTask->SetApplicationName (m_sApplicationName ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetApplicationName (m_sApplicationName.c_str() ); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetParameters (m_sParameters ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetParameters (m_sParameters.c_str() ); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetWorkingDirectory(m_sWorkingDirectory); if (FAILED(hr)) goto finish;
|
hr = pTask->SetWorkingDirectory(m_sWorkingDirectory.c_str()); if (FAILED(hr)) goto finish;
|
||||||
hr = pTask->SetComment (m_sComment ); if (FAILED(hr)) goto finish;
|
hr = pTask->SetComment (m_sComment.c_str() ); 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.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), 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.IsEmpty() ?
|
hr = m_sAccountName.empty() ?
|
||||||
pTask->SetAccountInformation(L"", NULL ) :
|
pTask->SetAccountInformation(L"" , NULL ) :
|
||||||
pTask->SetAccountInformation(m_sAccountName, m_sPassword);
|
pTask->SetAccountInformation(m_sAccountName.c_str(), m_sPassword.c_str());
|
||||||
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 (pos = m_lTriggers.GetHeadPosition(); pos;) {
|
for (auto t = m_lTriggers.cbegin(), t_end = m_lTriggers.cend(); t != t_end; ++t) {
|
||||||
WORD wTriggerIdx;
|
WORD wTriggerIdx;
|
||||||
CComPtr<ITaskTrigger> pTrigger;
|
winstd::com_obj<ITaskTrigger> pTrigger;
|
||||||
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.
|
TASK_TRIGGER ttData = *t; // 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;
|
||||||
@ -426,8 +394,8 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert numerical date to DMY (ULONGLONG -> FILETIME -> SYSTEMTIME).
|
// Convert numerical date to DMY (ULONGLONG -> FILETIME -> SYSTEMTIME).
|
||||||
ftValue.dwHighDateTime = (DWORD)((ullValue >> 32) & 0xffffffff);
|
ftValue.dwHighDateTime = static_cast<DWORD>((ullValue >> 32) & 0xffffffff);
|
||||||
ftValue.dwLowDateTime = (DWORD)( ullValue & 0xffffffff);
|
ftValue.dwLowDateTime = static_cast<DWORD>( ullValue & 0xffffffff);
|
||||||
::FileTimeToSystemTime(&ftValue, &stValue);
|
::FileTimeToSystemTime(&ftValue, &stValue);
|
||||||
|
|
||||||
// Set new trigger date and time.
|
// Set new trigger date and time.
|
||||||
@ -443,7 +411,7 @@ HRESULT COpTaskCreate::Execute(CSession *pSession)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save the task.
|
// Save the task.
|
||||||
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
winstd::com_obj<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);
|
||||||
}
|
}
|
||||||
@ -452,7 +420,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
@ -464,7 +432,7 @@ UINT COpTaskCreate::SetFromRecord(MSIHANDLE hInstall, MSIHANDLE hRecord)
|
|||||||
{
|
{
|
||||||
UINT uiResult;
|
UINT uiResult;
|
||||||
int iValue;
|
int iValue;
|
||||||
ATL::CAtlStringW sFolder;
|
std::wstring 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;
|
||||||
@ -474,11 +442,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, m_sWorkingDirectory);
|
uiResult = ::MsiGetTargetPathW(hInstall, sFolder.c_str(), m_sWorkingDirectory);
|
||||||
if (uiResult != NO_ERROR) return uiResult;
|
if (uiResult != NO_ERROR) return uiResult;
|
||||||
if (!m_sWorkingDirectory.IsEmpty() && m_sWorkingDirectory.GetAt(m_sWorkingDirectory.GetLength() - 1) == L'\\') {
|
if (!m_sWorkingDirectory.empty() && m_sWorkingDirectory.back() == L'\\') {
|
||||||
// Trim trailing backslash.
|
// Trim trailing backslash.
|
||||||
m_sWorkingDirectory.Truncate(m_sWorkingDirectory.GetLength() - 1);
|
m_sWorkingDirectory.resize(m_sWorkingDirectory.length() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
uiResult = ::MsiRecordFormatStringW(hInstall, hRecord, 10, m_sAuthor);
|
uiResult = ::MsiRecordFormatStringW(hInstall, hRecord, 10, m_sAuthor);
|
||||||
@ -532,8 +500,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 = (DWORD)((ullValue >> 32) & 0xffffffff);
|
ftValue.dwHighDateTime = static_cast<DWORD>((ullValue >> 32) & 0xffffffff);
|
||||||
ftValue.dwLowDateTime = (DWORD)( ullValue & 0xffffffff);
|
ftValue.dwLowDateTime = static_cast<DWORD>( ullValue & 0xffffffff);
|
||||||
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
||||||
return ::GetLastError();
|
return ::GetLastError();
|
||||||
ttData.wBeginYear = stValue.wYear;
|
ttData.wBeginYear = stValue.wYear;
|
||||||
@ -544,8 +512,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 = (DWORD)((ullValue >> 32) & 0xffffffff);
|
ftValue.dwHighDateTime = static_cast<DWORD>((ullValue >> 32) & 0xffffffff);
|
||||||
ftValue.dwLowDateTime = (DWORD)( ullValue & 0xffffffff);
|
ftValue.dwLowDateTime = static_cast<DWORD>( ullValue & 0xffffffff);
|
||||||
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
if (!::FileTimeToSystemTime(&ftValue, &stValue))
|
||||||
return ::GetLastError();
|
return ::GetLastError();
|
||||||
ttData.wEndYear = stValue.wYear;
|
ttData.wEndYear = stValue.wYear;
|
||||||
@ -632,10 +600,8 @@ UINT COpTaskCreate::SetTriggersFromView(MSIHANDLE hView)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lTriggers.AddTail(ttData);
|
m_lTriggers.push_back(ttData);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NO_ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -652,35 +618,35 @@ COpTaskDelete::COpTaskDelete(LPCWSTR pszTaskName, int iTicks) :
|
|||||||
HRESULT COpTaskDelete::Execute(CSession *pSession)
|
HRESULT COpTaskDelete::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
CComPtr<ITaskService> pService;
|
winstd::com_obj<ITaskService> pService;
|
||||||
|
|
||||||
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
CComVariant vEmpty;
|
winstd::variant vEmpty;
|
||||||
CComPtr<ITaskFolder> pTaskFolder;
|
winstd::com_obj<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(CComBSTR(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
CComPtr<IRegisteredTask> pTask, pTaskOrig;
|
winstd::com_obj<IRegisteredTask> pTask, pTaskOrig;
|
||||||
CComPtr<ITaskDefinition> pTaskDefinition;
|
winstd::com_obj<ITaskDefinition> pTaskDefinition;
|
||||||
CComPtr<IPrincipal> pPrincipal;
|
winstd::com_obj<IPrincipal> pPrincipal;
|
||||||
VARIANT_BOOL bEnabled;
|
VARIANT_BOOL bEnabled;
|
||||||
TASK_LOGON_TYPE logonType;
|
TASK_LOGON_TYPE logonType;
|
||||||
CComBSTR sSSDL;
|
winstd::bstr sSSDL;
|
||||||
CComVariant vSSDL;
|
winstd::variant vSSDL;
|
||||||
ATL::CAtlStringW sDisplayNameOrig;
|
std::wstring sDisplayNameOrig;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
// Get the source task.
|
// Get the source task.
|
||||||
hr = pTaskFolder->GetTask(CComBSTR(m_sValue), &pTask);
|
hr = pTaskFolder->GetTask(winstd::bstr(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;
|
||||||
|
|
||||||
@ -691,7 +657,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.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
||||||
|
|
||||||
// Disable it.
|
// Disable it.
|
||||||
hr = pTask->put_Enabled(VARIANT_FALSE);
|
hr = pTask->put_Enabled(VARIANT_FALSE);
|
||||||
@ -712,60 +678,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)) vSSDL.Clear();
|
if (hr == HRESULT_FROM_WIN32(ERROR_PRIVILEGE_NOT_HELD)) ::VariantClear(&vSSDL);
|
||||||
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 {
|
||||||
sDisplayNameOrig.Format(L"%ls (orig %u)", (LPCWSTR)m_sValue, ++uiCount);
|
sprintf(sDisplayNameOrig, L"%ls (orig %u)", m_sValue.c_str(), ++uiCount);
|
||||||
hr = pTaskFolder->RegisterTaskDefinition(
|
hr = pTaskFolder->RegisterTaskDefinition(
|
||||||
CComBSTR(sDisplayNameOrig), // path
|
winstd::bstr(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.AddHead(new COpTaskDelete(sDisplayNameOrig));
|
pSession->m_olRollback.push_front(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
||||||
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.AddHead(new COpTaskCopy(sDisplayNameOrig, m_sValue));
|
pSession->m_olRollback.push_front(new COpTaskCopy(sDisplayNameOrig.c_str(), m_sValue.c_str()));
|
||||||
|
|
||||||
// Delete it.
|
// Delete it.
|
||||||
hr = pTaskFolder->DeleteTask(CComBSTR(m_sValue), 0);
|
hr = pTaskFolder->DeleteTask(winstd::bstr(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.AddTail(new COpTaskDelete(sDisplayNameOrig));
|
pSession->m_olCommit.push_back(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
||||||
} else {
|
} else {
|
||||||
// Delete the task.
|
// Delete the task.
|
||||||
hr = pTaskFolder->DeleteTask(CComBSTR(m_sValue), 0);
|
hr = pTaskFolder->DeleteTask(winstd::bstr(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.
|
||||||
CComPtr<ITaskScheduler> pTaskScheduler;
|
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
if (pSession->m_bRollbackEnabled) {
|
if (pSession->m_bRollbackEnabled) {
|
||||||
CComPtr<ITask> pTask;
|
winstd::com_obj<ITask> pTask;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
ATL::CAtlStringW sDisplayNameOrig;
|
std::wstring sDisplayNameOrig;
|
||||||
UINT uiCount = 0;
|
UINT uiCount = 0;
|
||||||
|
|
||||||
// Load the task.
|
// Load the task.
|
||||||
hr = pTaskScheduler->Activate(m_sValue, IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->Activate(m_sValue.c_str(), 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;
|
||||||
|
|
||||||
@ -776,7 +742,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.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
||||||
|
|
||||||
// Disable it.
|
// Disable it.
|
||||||
dwFlags |= TASK_FLAG_DISABLED;
|
dwFlags |= TASK_FLAG_DISABLED;
|
||||||
@ -786,31 +752,31 @@ HRESULT COpTaskDelete::Execute(CSession *pSession)
|
|||||||
|
|
||||||
// Prepare a backup copy of task.
|
// Prepare a backup copy of task.
|
||||||
do {
|
do {
|
||||||
sDisplayNameOrig.Format(L"%ls (orig %u)", (LPCWSTR)m_sValue, ++uiCount);
|
sprintf(sDisplayNameOrig, L"%ls (orig %u)", m_sValue.c_str(), ++uiCount);
|
||||||
hr = pTaskScheduler->AddWorkItem(sDisplayNameOrig, pTask);
|
hr = pTaskScheduler->AddWorkItem(sDisplayNameOrig.c_str(), 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.AddHead(new COpTaskDelete(sDisplayNameOrig));
|
pSession->m_olRollback.push_front(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Save the backup copy.
|
// Save the backup copy.
|
||||||
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
winstd::com_obj<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.AddHead(new COpTaskCopy(sDisplayNameOrig, m_sValue));
|
pSession->m_olRollback.push_front(new COpTaskCopy(sDisplayNameOrig.c_str(), m_sValue.c_str()));
|
||||||
|
|
||||||
// Delete it.
|
// Delete it.
|
||||||
hr = pTaskScheduler->Delete(m_sValue);
|
hr = pTaskScheduler->Delete(m_sValue.c_str());
|
||||||
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.AddTail(new COpTaskDelete(sDisplayNameOrig));
|
pSession->m_olCommit.push_back(new COpTaskDelete(sDisplayNameOrig.c_str()));
|
||||||
} else {
|
} else {
|
||||||
// Delete the task.
|
// Delete the task.
|
||||||
hr = pTaskScheduler->Delete(m_sValue);
|
hr = pTaskScheduler->Delete(m_sValue.c_str());
|
||||||
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) hr = S_OK;
|
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) hr = S_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -819,7 +785,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
@ -841,14 +807,14 @@ COpTaskEnable::COpTaskEnable(LPCWSTR pszTaskName, BOOL bEnable, int iTicks) :
|
|||||||
HRESULT COpTaskEnable::Execute(CSession *pSession)
|
HRESULT COpTaskEnable::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
CComPtr<ITaskService> pService;
|
winstd::com_obj<ITaskService> pService;
|
||||||
|
|
||||||
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
CComVariant vEmpty;
|
winstd::variant vEmpty;
|
||||||
CComPtr<ITaskFolder> pTaskFolder;
|
winstd::com_obj<ITaskFolder> pTaskFolder;
|
||||||
CComPtr<IRegisteredTask> pTask;
|
winstd::com_obj<IRegisteredTask> pTask;
|
||||||
VARIANT_BOOL bEnabled;
|
VARIANT_BOOL bEnabled;
|
||||||
|
|
||||||
// Connect to local task service.
|
// Connect to local task service.
|
||||||
@ -856,11 +822,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(CComBSTR(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task.
|
// Get task.
|
||||||
hr = pTaskFolder->GetTask(CComBSTR(m_sValue), &pTask);
|
hr = pTaskFolder->GetTask(winstd::bstr(m_sValue), &pTask);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get currently enabled state.
|
// Get currently enabled state.
|
||||||
@ -872,7 +838,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.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
||||||
hr = S_OK; goto finish;
|
hr = S_OK; goto finish;
|
||||||
} else
|
} else
|
||||||
bEnabled = VARIANT_TRUE;
|
bEnabled = VARIANT_TRUE;
|
||||||
@ -880,7 +846,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.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
||||||
}
|
}
|
||||||
bEnabled = VARIANT_FALSE;
|
bEnabled = VARIANT_FALSE;
|
||||||
}
|
}
|
||||||
@ -890,16 +856,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.
|
||||||
CComPtr<ITaskScheduler> pTaskScheduler;
|
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
||||||
CComPtr<ITask> pTask;
|
winstd::com_obj<ITask> pTask;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Load the task.
|
// Load the task.
|
||||||
hr = pTaskScheduler->Activate(m_sValue, IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->Activate(m_sValue.c_str(), IID_ITask, (IUnknown**)&pTask);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task's current flags.
|
// Get task's current flags.
|
||||||
@ -911,7 +877,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.AddTail(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olCommit.push_back(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
||||||
hr = S_OK; goto finish;
|
hr = S_OK; goto finish;
|
||||||
} else
|
} else
|
||||||
dwFlags &= ~TASK_FLAG_DISABLED;
|
dwFlags &= ~TASK_FLAG_DISABLED;
|
||||||
@ -919,7 +885,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.AddHead(new COpTaskEnable(m_sValue, TRUE));
|
pSession->m_olRollback.push_front(new COpTaskEnable(m_sValue.c_str(), TRUE));
|
||||||
}
|
}
|
||||||
dwFlags |= TASK_FLAG_DISABLED;
|
dwFlags |= TASK_FLAG_DISABLED;
|
||||||
}
|
}
|
||||||
@ -929,7 +895,7 @@ HRESULT COpTaskEnable::Execute(CSession *pSession)
|
|||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Save the task.
|
// Save the task.
|
||||||
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
winstd::com_obj<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;
|
||||||
@ -939,7 +905,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
::MsiRecordSetInteger(hRecordProg, 3, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
@ -960,29 +926,29 @@ COpTaskCopy::COpTaskCopy(LPCWSTR pszTaskSrc, LPCWSTR pszTaskDst, int iTicks) :
|
|||||||
HRESULT COpTaskCopy::Execute(CSession *pSession)
|
HRESULT COpTaskCopy::Execute(CSession *pSession)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
CComPtr<ITaskService> pService;
|
winstd::com_obj<ITaskService> pService;
|
||||||
|
|
||||||
hr = pService.CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER);
|
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, pService);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
// Windows Vista or newer.
|
// Windows Vista or newer.
|
||||||
CComVariant vEmpty;
|
winstd::variant vEmpty;
|
||||||
CComPtr<ITaskFolder> pTaskFolder;
|
winstd::com_obj<ITaskFolder> pTaskFolder;
|
||||||
CComPtr<IRegisteredTask> pTask, pTaskOrig;
|
winstd::com_obj<IRegisteredTask> pTask, pTaskOrig;
|
||||||
CComPtr<ITaskDefinition> pTaskDefinition;
|
winstd::com_obj<ITaskDefinition> pTaskDefinition;
|
||||||
CComPtr<IPrincipal> pPrincipal;
|
winstd::com_obj<IPrincipal> pPrincipal;
|
||||||
TASK_LOGON_TYPE logonType;
|
TASK_LOGON_TYPE logonType;
|
||||||
CComBSTR sSSDL;
|
winstd::bstr 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(CComBSTR(L"\\"), &pTaskFolder);
|
hr = pService->GetFolder(winstd::bstr(L"\\"), &pTaskFolder);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get the source task.
|
// Get the source task.
|
||||||
hr = pTaskFolder->GetTask(CComBSTR(m_sValue1), &pTask);
|
hr = pTaskFolder->GetTask(winstd::bstr(m_sValue1), &pTask);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Get task's definition.
|
// Get task's definition.
|
||||||
@ -1003,38 +969,38 @@ HRESULT COpTaskCopy::Execute(CSession *pSession)
|
|||||||
|
|
||||||
// Register a new task.
|
// Register a new task.
|
||||||
hr = pTaskFolder->RegisterTaskDefinition(
|
hr = pTaskFolder->RegisterTaskDefinition(
|
||||||
CComBSTR(m_sValue2), // path
|
winstd::bstr(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
|
||||||
CComVariant(sSSDL), // sddl
|
winstd::variant(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.
|
||||||
CComPtr<ITaskScheduler> pTaskScheduler;
|
winstd::com_obj<ITaskScheduler> pTaskScheduler;
|
||||||
CComPtr<ITask> pTask;
|
winstd::com_obj<ITask> pTask;
|
||||||
|
|
||||||
// Get task scheduler object.
|
// Get task scheduler object.
|
||||||
hr = pTaskScheduler.CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL);
|
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_ALL, pTaskScheduler);
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Load the source task.
|
// Load the source task.
|
||||||
hr = pTaskScheduler->Activate(m_sValue1, IID_ITask, (IUnknown**)&pTask);
|
hr = pTaskScheduler->Activate(m_sValue1.c_str(), 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, pTask);
|
hr = pTaskScheduler->AddWorkItem(m_sValue2.c_str(), 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.AddHead(new COpTaskDelete(m_sValue2));
|
pSession->m_olRollback.push_front(new COpTaskDelete(m_sValue2.c_str()));
|
||||||
}
|
}
|
||||||
if (FAILED(hr)) goto finish;
|
if (FAILED(hr)) goto finish;
|
||||||
|
|
||||||
// Save the task.
|
// Save the task.
|
||||||
CComQIPtr<IPersistFile> pTaskFile(pTask);
|
winstd::com_obj<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;
|
||||||
@ -1044,8 +1010,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 );
|
::MsiRecordSetStringW(hRecordProg, 2, m_sValue1.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2 );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue2.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, hr );
|
::MsiRecordSetInteger(hRecordProg, 4, hr );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 "stdafx.h"
|
#include "pch.h"
|
||||||
|
|
||||||
|
|
||||||
namespace MSICA {
|
namespace MSICA {
|
||||||
@ -55,19 +41,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, NULL, &pszProfileXML, &dwFlags, &dwGrantedAccess);
|
dwError = ::pfnWlanGetProfile(hClientHandle, &m_guidInterface, m_sValue.c_str(), 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, NULL);
|
dwError = ::pfnWlanDeleteProfile(hClientHandle, &m_guidInterface, m_sValue.c_str(), NULL);
|
||||||
if (dwError == NO_ERROR) {
|
if (dwError == NO_ERROR) {
|
||||||
// Order rollback action to recreate it.
|
// Order rollback action to recreate it.
|
||||||
pSession->m_olRollback.AddHead(new COpWLANProfileSet(m_guidInterface, dwFlags, m_sValue, pszProfileXML));
|
pSession->m_olRollback.push_front(new COpWLANProfileSet(m_guidInterface, dwFlags, m_sValue.c_str(), pszProfileXML));
|
||||||
}
|
}
|
||||||
::pfnWlanFreeMemory(pszProfileXML);
|
::pfnWlanFreeMemory(pszProfileXML);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Delete the profile.
|
// Delete the profile.
|
||||||
dwError = ::pfnWlanDeleteProfile(hClientHandle, &m_guidInterface, m_sValue, NULL);
|
dwError = ::pfnWlanDeleteProfile(hClientHandle, &m_guidInterface, m_sValue.c_str(), NULL);
|
||||||
}
|
}
|
||||||
::pfnWlanCloseHandle(hClientHandle, NULL);
|
::pfnWlanCloseHandle(hClientHandle, NULL);
|
||||||
}
|
}
|
||||||
@ -76,14 +62,12 @@ HRESULT COpWLANProfileDelete::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(4);
|
||||||
ATL::CAtlStringW sGUID;
|
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_WLAN_PROFILE_DELETE );
|
||||||
GuidToString(&m_guidInterface, sGUID);
|
::MsiRecordSetStringW(hRecordProg, 2, winstd::wstring_guid(m_guidInterface).c_str());
|
||||||
::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_WLAN_PROFILE_DELETE);
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 2, sGUID );
|
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
|
||||||
::MsiRecordSetInteger(hRecordProg, 4, dwError );
|
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
||||||
@ -117,7 +101,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);
|
COpWLANProfileDelete opDelete(m_guidInterface, m_sValue.c_str());
|
||||||
HRESULT hr = opDelete.Execute(pSession);
|
HRESULT hr = opDelete.Execute(pSession);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
}
|
}
|
||||||
@ -125,10 +109,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, NULL, TRUE, NULL, &wlrc);
|
dwError = ::pfnWlanSetProfile(hClientHandle, &m_guidInterface, m_dwFlags, m_sProfileXML.c_str(), 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.AddHead(new COpWLANProfileDelete(m_guidInterface, m_sValue));
|
pSession->m_olRollback.push_front(new COpWLANProfileDelete(m_guidInterface, m_sValue.c_str()));
|
||||||
}
|
}
|
||||||
::pfnWlanCloseHandle(hClientHandle, NULL);
|
::pfnWlanCloseHandle(hClientHandle, NULL);
|
||||||
}
|
}
|
||||||
@ -137,22 +121,20 @@ HRESULT COpWLANProfileSet::Execute(CSession *pSession)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
else {
|
else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(5);
|
||||||
ATL::CAtlStringW sGUID, sReason;
|
std::wstring sReason;
|
||||||
DWORD dwSize = 1024, dwResult;
|
std::unique_ptr<WCHAR[]> szBuffer(new WCHAR[1024]);
|
||||||
LPWSTR szBuffer = sReason.GetBuffer(dwSize);
|
if (szBuffer && ::pfnWlanReasonCodeToString(wlrc, 1024, szBuffer.get(), NULL) == NO_ERROR)
|
||||||
|
sReason.assign(szBuffer.get(), wcsnlen(szBuffer.get(), 1024));
|
||||||
GuidToString(&m_guidInterface, sGUID);
|
else
|
||||||
dwResult = ::pfnWlanReasonCodeToString(wlrc, dwSize, szBuffer, NULL);
|
sprintf(sReason, L"0x%x", wlrc);
|
||||||
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, sGUID );
|
::MsiRecordSetStringW(hRecordProg, 2, winstd::wstring_guid(m_guidInterface).c_str());
|
||||||
::MsiRecordSetStringW(hRecordProg, 3, m_sValue );
|
::MsiRecordSetStringW(hRecordProg, 3, m_sValue.c_str() );
|
||||||
::MsiRecordSetStringW(hRecordProg, 4, sReason );
|
::MsiRecordSetStringW(hRecordProg, 4, sReason.c_str() );
|
||||||
::MsiRecordSetInteger(hRecordProg, 5, dwError );
|
::MsiRecordSetInteger(hRecordProg, 5, dwError );
|
||||||
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
::MsiProcessMessage(pSession->m_hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
|
||||||
return AtlHresultFromWin32(dwError);
|
return HRESULT_FROM_WIN32(dwError);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
PMSIHANDLE hRecordProg = ::MsiCreateRecord(1);
|
||||||
|
6
src/pch.cpp
Normal file
6
src/pch.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
Copyright © 1991-2022 Amebis
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pch.h"
|
@ -1,36 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 1991-2016 Amebis
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
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 <atlex/atlcrypt.h>
|
#include <WinStd/COM.h>
|
||||||
#include <atlex/atlwin.h>
|
#include <WinStd/Crypt.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>
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
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"
|
|
Loading…
x
Reference in New Issue
Block a user