├── .gitattributes
├── .gitignore
├── Build.xml
├── CHANGES
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── inventory
├── .gitignore
├── Build.xml
├── CHANGES
├── Inventory.csproj
├── Inventory.sln
├── LICENSE
├── Properties
│ └── AssemblyInfo.cs
├── README.md
└── Sources
│ ├── Messages.cs
│ ├── Paths.cs
│ ├── Program.cs
│ ├── Program.ico
│ ├── Scanner.cs
│ └── Storage.cs
├── launcher
├── .gitignore
├── Build.xml
├── CHANGES
├── LICENSE
├── Launcher.csproj
├── Launcher.sln
├── Properties
│ ├── App.manifest
│ └── AssemblyInfo.cs
├── README.md
├── Resources
│ └── animation.gif
└── Sources
│ ├── Control.Designer.cs
│ ├── Control.cs
│ ├── Control.resx
│ ├── Messages.cs
│ ├── Program.cs
│ ├── Program.ico
│ ├── Settings.cs
│ ├── Settings.xml
│ ├── Tiles
│ ├── MetaTile.cs
│ ├── MetaTileGrid.cs
│ └── MetaTileScreen.cs
│ └── Utilities
│ ├── Graphics.cs
│ └── ScanCode.cs
├── platform
├── .gitignore
├── Build.xml
├── CHANGES
├── LICENSE
├── Platform.csproj
├── Platform.sln
├── Properties
│ ├── App.manifest
│ └── AssemblyInfo.cs
├── README.md
├── Resources
│ ├── diskpart
│ │ ├── attach
│ │ ├── compact
│ │ ├── create
│ │ └── detach
│ ├── platform
│ │ ├── AutoRun.inf
│ │ ├── Programs
│ │ │ ├── Macros
│ │ │ │ ├── macro.cmd
│ │ │ │ └── macros.cmd
│ │ │ └── Platform
│ │ │ │ ├── inventory.exe
│ │ │ │ ├── launcher.exe
│ │ │ │ ├── launcher.xml
│ │ │ │ ├── platform.dll
│ │ │ │ └── startup.exe
│ │ ├── Resources
│ │ │ ├── manual.md
│ │ │ ├── platform.ico
│ │ │ └── platform.png
│ │ ├── Startup.cmd
│ │ └── Storage
│ │ │ └── registry.data
│ └── settings.ini
└── Sources
│ ├── Diskpart.cs
│ ├── Messages.cs
│ ├── Program.cs
│ ├── Program.ico
│ ├── Resources.Designer.cs
│ ├── Resources.Extension.cs
│ ├── Resources.resx
│ ├── Service.cs
│ ├── Settings.cs
│ ├── Worker.Designer.cs
│ ├── Worker.cs
│ └── Worker.resx
├── resources
├── example.gif
└── usage.gif
├── shiftdown
└── README.md
└── startup
├── .gitignore
├── Build.xml
├── CHANGES
├── LICENSE
├── Properties
└── AssemblyInfo.cs
├── README.md
├── Sources
├── Program.cs
└── Program.ico
├── Startup.csproj
└── Startup.sln
/.gitattributes:
--------------------------------------------------------------------------------
1 | core.autocrlf true
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /**/.idea/
2 | /**/Release/
3 | /**/Target/
4 |
5 | /platform/Resources/platform/Programs/Platform/platform.dll
6 |
--------------------------------------------------------------------------------
/Build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Following targets are available:
5 |
6 | changes Synchronizes README.md with CHANGES
7 |
8 | release Builds the complete release
9 | Synchronizes the version in README.md
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
27 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
61 |
62 |
63 |
64 |
67 |
68 |
69 |
70 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
83 |
86 |
89 |
90 |
--------------------------------------------------------------------------------
/CHANGES:
--------------------------------------------------------------------------------
1 | 3.6.0 20241230
2 | BF: Platform: Optimization and corrections
3 | BF: Launcher: Correction/optimization
4 | BF: Launcher: Correction when using custom scaling
5 | Correction of the possibly incorrect calculation of
6 | FormWindowState.Maximized for custom scaling.
7 | BF: Settings: Correction to ignore invalid paths in section [FILES]
8 | Previously, the replacement of the placeholders was terminated without error
9 | after the first incorrect path and the initialization of the platform
10 | continued.
11 | BF: Platform: Names of environment variables are case-sensitive
12 | CR: Platform: Omission of the steps recorder (deprecated by Microsoft)
13 | CR: Platform: Simplification of the terminal action
14 | CR: Launcher: Added events (SessionEndingReason)
15 |
16 | 3.5.0 20240706
17 | BF: DiskPart: Optimization of attach
18 | - Name of the volume is no longer relevant
19 | BF: DiskPart: Optimization of detach if an error occurs
20 | BF: DiskPart: Optimization of compact
21 | BF: Platform: Correction if no .ini file exists
22 | - Caused an ArgumentNullException during attachment
23 | CR: Platform: Optimization of output/logging
24 | - If an error occurs
25 | - Batch processes (startup / exit) is output in the log file
26 |
27 | 3.4.0 20240302
28 | BF: Review: Optimization and corrections
29 | BF: DiskPart: Optimization when attaching disks with the same label
30 | BF: DiskPart: Correction when creating with Windows 11
31 | CR: DiskPart: Optimization of detach if an error occurs
32 | CR: Macros: Optimization of the use of WORKDIR
33 | CR: Macros: Usable as direct short commands
34 | CR: Project: Updated TargetFrameworkVersion to v4.8
35 | CR: Platform: Refactoring of the standard directory structure
36 | - Spaces in the path have been omitted
37 | - Formerly Database is now part of Storage
38 | - Formerly Install is now part of Resources
39 | - Core components of the platform are located in /Programs/Platform
40 | + Documents
41 | + Music
42 | + Pictures
43 | + Videos
44 | + Programs
45 | + Macros
46 | + macros
47 | + Platform
48 | + Resources
49 | + Settings
50 | + Storage
51 | + Temp
52 | CR: Launcher: Updated TargetFrameworkVersion to v4.8
53 | CR: Startup: Updated TargetFrameworkVersion to v4.8
54 |
55 | 3.3.0 20230710
56 | BF: Settings: Spaces at the end of values are now ignored
57 | BF: Launcher: Correction/optimization of the output if the HotKey cannot be registered
58 | CR: Build: Releases are now only available on the release page
59 | CR: Macros: Added to temporarily change the command line configuration
60 | Create your own macros as cmd-file in Program Portables/Macros/macros.
61 | Call: 'macro [macro]' or 'macros [macro]' on the command line.
62 | CR: Platform: Added batch processing freeze detection
63 | Detects freezing script on attach and detach the platform and causes
64 | error instead of freezing itself.
65 | CR: ShiftDown: Omission of ShiftDown as standard tool
66 | CR: ShiftDown: Renaming in Balancer
67 | CR: ShiftDown: Outsourcing as a separate project
68 |
69 | 3.2.0 20220625
70 | BF: Build: Correction of the release info process
71 | BF: Launcher: Correction of the behavior when the screen resolution changes
72 | Triggers the update of the user interface.
73 | CR: Platform: Optimization when detaching / process termination
74 | Killing of processes can be blocked by system protection.
75 | It is tried up to three times and then ignored.
76 | CR: Platform: Integrated settings as a core component
77 | The key values of the settings are part of the environment variables of
78 | the virtual environment.
79 | CR: Launcher: Scaling of icons depending on screen resolution (aesthetic reasons)
80 | CR: Launcher: Increase from the default value of OPACITY (95)
81 | CR: Launcher: Added option AutoScale (default true)
82 | Scales the view according to the screen resolution ot the primary screen
83 | CR: Shiftdown: Change the location to /Program Portables/ShiftDown
84 |
85 | 3.1.0 20220401
86 | BF: Platform: Correction of settings template synchronization
87 | If the target file is newer than the template, the template will be updated.
88 | BF: Platform Create: Correction of settings directory
89 | Has been moved from \Documents\Settings to \Settings.
90 | BF: Platform: Compact per Diskpart was not executed
91 | BF: Platform: Optimization and corrections
92 | BF: Platform: Optimization and corrections of the texts
93 | BF: Settings: Correction of template synchronization
94 | If the target file is newer than the template, the template will be updated.
95 | BF: Settings: Optimization and corrections
96 | CR: Environment: Unification of namespace / platform icon / (sub) project structure
97 | CR: Environment: Added build script/process via Ant
98 | CR: Launcher: Switching to a self-developed one
99 | So far MaxLauncher was preferred -- is great software, many ideas were taken from there.
100 | But the virtual environment should get its own, where the license fits.
101 | CR: Platform: Optimization / enhancement of function compact
102 | CR: Platform: Optimization of notification message output
103 | CR: Platform: Unification of namespace / platform icon / (sub) project structure
104 | CR: Platform: Added build script/process via Ant
105 | CR: Platform: Optimization of error logging
106 | CR: Platform: Added console as default command line prompt
107 | CR: Platform: Added launcher as default launcher to keep the environment alive
108 | CR: Platform: Added shiftdown as optional service to shift down the process priority
109 | The service automatically downgrades the process priority of CPU-intensive processes.
110 | For older Intel generations that suffer from the update of Windows and Intel.
111 | CR: Settings: Unification of namespace / platform icon / (sub) project structure
112 | CR: Settings: Added build script/process via Ant
113 | CR: ShiftDown: Added to improve multitasking of older CPUs
114 | The service automatically downgrades the process priority of CPU-intensive processes.
115 | For older Intel generations that suffer from the update of Windows and Intel.
116 |
117 | 3.0.0 20211126
118 | CR: License: Changed to Apache License Version 2.0
119 | CR: Project: Change from Ant to .NET
120 | CR: Platform: Added function compact
121 | Cleans the temp directory on the virtual disk and compacts the disk in general.
122 | e.g. platform.exe B: compact
123 | CR: Platform: Added function shortcuts
124 | Creates the usual calls as shortcuts.
125 | e.g. platform.exe B: shortcuts
126 | CR: Settings: Added for placeholder replacement in files
127 | This simplifies the personalization , distribution, migrations and updates.
128 |
129 | 2.5.0 2019xxxx
130 | CR: Added support for VHDX and BitLocker
131 | NT: More details have been lost
132 |
133 | 2.0.0 2015xxxx
134 | CR: Change from SUBST to virtual disk VHD
135 | NT: More details have been lost
136 |
137 | 1.0.0 20xxxxxx
138 | NT: More details have been lost
139 | NT: Release is available
140 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution Guidelines
2 |
3 | ## Table of Contents
4 | - [Code Conventions](#code-conventions)
5 | - [Action](#action)
6 | - [Constants](#constants)
7 | - [Func](#func)
8 | - [Private Field](#private-field)
9 |
10 | ## Code Conventions
11 |
12 | ### Action
13 | - PascalCase
14 | ```csharp
15 | Action OutputMessage = message =>
16 | Console.WriteLine(message);
17 | ```
18 |
19 | ### Constant
20 | - SCREAMING_SNAKE_CASE
21 | ```csharp
22 | const int EXAMPLE_CONSTANT = 1;
23 | ```
24 |
25 | ### Func
26 | - PascalCase
27 | ```csharp
28 | Func IsEmptyString = text =>
29 | String.IsNullOrWhiteSpace(text);
30 | ```
31 |
32 | ### Private Field
33 | - leading underscore and camelCase
34 | ```csharp
35 | private int _examplePrivateField = 1;
36 | ```
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
14 |
17 |
18 |
19 |
20 | # Description
21 | Since about 2010, there is the project of a virtual environment with modular
22 | structure for developers and users, so that they can use a fully pre-configured
23 | environment with all programs, tools and services, without modifying the host
24 | environment or requiring additional dedicated virtualization resources.
25 |
26 | Short setup times, uniform tools with uniform configuration, uniform paths in
27 | the file system, centralized maintenance and easy distribution and updating are
28 | some of the benefits. The environment is easily customizable, can be quickly
29 | switched to use for different projects, and the environment can be easily
30 | transferred to other machines where work started can be continued.
31 |
32 | __The project includes with [platform](platform), a tool for the initial
33 | creation, use and management of the virtual environment and a
34 | [module concept](modules) for the automatic integration and configuration of
35 | tools and programs from any source on the Internet.__
36 |
37 | __The module concept is a successful PoC (proof of concept), but is not
38 | currently the focus of the project. So the software has to be set up manually
39 | in the virtual environment, but that's easy because it's a normal drive.__
40 |
41 | Since in large companies the strict use of BitLocker is often required, this is
42 | also supported.
43 |
44 | __What is the difference with PortableApps.com or portapps.io?__
45 |
46 | The virtual environment focuses on the virtual drive as a platform. It is about
47 | the advantages that the platform can be used as a single file and programs and
48 | services can be used in it with a complete configuration and with reliable
49 | absolute paths.
50 |
51 | The integration and distribution of portable applications are not the ambition
52 | of this project.
53 |
54 | The use of modules for the integration of programs and services is planned, but
55 | is more an exemplification of the possibilities for the integration of programs
56 | and services. However, it is not the intention of the project to establish a
57 | corresponding eco-system or repository.
58 |
59 | [PortableApps.com](https://portableapps.com/apps) and
60 | [portapps.io](https://portapps.io/apps) complement the virtual environment
61 | perfectly and both release very good portable versions of programs that can be
62 | used in the virtual environment.
63 |
64 |
65 | ## Advantages
66 | - A virtual drive is used, which contains all data in one file.
67 | - The drives can also be supplied and used via the network.
68 | - Only one large file can be copied faster and also shared.
69 | - Snapshots and versioning are possible.
70 | - Multiple drives with different environments can be used in parallel on one computer.
71 | - Fast switching between different drives and environments is possible.
72 | - Fixed drive letters and paths are used.
73 | - The use of the file system and registry from the host is avoided.
74 | - Environments can be maintained and distributed centrally.
75 | - A team use the same environment with the same paths and configurations, which facilitates automation.
76 |
77 |
78 | # Features
79 | - Supports VHD, VHDX as virtual drive also with Bitlocker
80 | - Functions to create, launch, manage and compact the environment
81 | - The environment is immediately usable after creation
82 | - Integrated program launcher with optimized keyboard support for fast program access
83 | - Personalization of environment and programs through a separate key values file
84 | - Very small and resource-efficient implementation of the platform
85 | - The use of the local file system and the registry is avoided
86 | - Easy customization according to the requirements
87 | - Simplifies centralized maintenance and distribution
88 | - Simplifies automation
89 |
90 |
91 | # Licence Agreement
92 | LIZENZBEDINGUNGEN - Seanox Software Solutions ist ein Open-Source-Projekt, im
93 | Folgenden Seanox Software Solutions oder kurz Seanox genannt.
94 |
95 | Diese Software unterliegt der Version 2 der Apache License.
96 |
97 | Copyright (C) 2025 Seanox Software Solutions
98 |
99 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use
100 | this file except in compliance with the License. You may obtain a copy of the
101 | License at
102 |
103 | https://www.apache.org/licenses/LICENSE-2.0
104 |
105 | Unless required by applicable law or agreed to in writing, software distributed
106 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
107 | CONDITIONS OF ANY KIND, either express or implied. See the License for the
108 | specific language governing permissions and limitations under the License.
109 |
110 |
111 | # System Requirement
112 | - Microsoft Windows 10 or higher
113 | - Microsoft .NET 4.8.x or higher (for runtime)
114 | - [Microsoft .NET 4.8.x Developer Pack or higher](
115 | https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48) (for development only)
116 |
117 |
118 | # Downloads
119 | [Seanox Virtual Environment 3.5.0](https://github.com/seanox/virtual-environment/releases/download/3.5.0/seanox-platform-3.5.0.zip)
120 | [Seanox Virtual Environment 3.5.0 Update](https://github.com/seanox/virtual-environment/releases/download/3.5.0/seanox-platform-3.5.0-update.zip) for existing environment
121 |
122 |
123 | ## Example
124 | Download the master templates as virtual environments (approx __4 GB__ /
125 | last update 2024-09-20):
126 | https://seanox.com/storage/master-3.6.0.7z
127 | https://seanox.com/storage/master-proxy-3.6.0.7z
128 |
129 | Included is a complete development environment with various tools for AWS,
130 | Kubernetes, Terraform, Java and Node.js, including a customized Eclipse, a
131 | PostgreSQL database and much more.
132 |
133 | Start `master.exe B: attach`.
134 |
135 | The host key combination for the launcher: `Win + ESC`
136 |
137 | To exit, use the Detach button at the bottom right of the launcher.
138 |
139 |
140 |
141 | ## Use the examples as a template for your own environment
142 | - Download the example(s)
143 | - Rename `master.exe`, `master.ini` and `master.vhdx` to your name
144 |
145 | Next steps are optional and after attaching
146 |
147 | - Change the label of the virtual disk (properties of disk)
148 | - Change the name of the virtual volume in `AutoRun.inf`
149 |
150 |
151 | # Usage
152 | - Download the last release of [seanox-platform.zip](#downloads)
153 | - Extract the file to any location in the local file system
154 | - Rename __platform.exe__ to the name that will be used for the environment and drive
155 |
156 | Then the program can be used as follows::
157 |
158 | `usage: platform.exe A-Z: [create|attach|detach|compact|shortcuts] `
159 |
160 | Example
161 | - `platform.exe B: create` to create the initial environment as VHDX
162 | - `platform.exe B: shortcuts` to create the usual calls as shortcuts
163 | - `platform.exe B: attach` to attach the environment
164 |
165 | Configure __Startup.cmd__ in the root directory of the virtual environment and
166 | add the desired programs and services. It is recommended to use a launcher so
167 | that the environment variables are available to the called programs. Detach
168 | should also be started via the launcher if programs and services are terminated
169 | when detaching and the environment variables are needed for this.
170 |
171 | - `platform.exe B: detach` to detach the environment
172 | - `platform.exe B: compact` to compact the virtual disk
173 |
174 | __Module integration will come later, but will be similar.__
175 |
176 |
177 |
178 |
179 | # Changes
180 | ## 3.5.0 20240706
181 | BF: DiskPart: Optimization of attach
182 | BF: DiskPart: Optimization of detach if an error occurs
183 | BF: DiskPart: Optimization of compact
184 | BF: Platform: Correction if no .ini file exists
185 | CR: Platform: Optimization of output/logging
186 |
187 | [Read more](https://raw.githubusercontent.com/seanox/virtual-environment/main/CHANGES)
188 |
189 |
190 | # Contact
191 | [Issues](https://github.com/seanox/virtual-environment/issues)
192 | [Requests](https://github.com/seanox/virtual-environment/pulls)
193 | [Mail](https://seanox.com/contact)
194 |
--------------------------------------------------------------------------------
/inventory/.gitignore:
--------------------------------------------------------------------------------
1 | # Use the parent .gitignore
2 |
--------------------------------------------------------------------------------
/inventory/Build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Following targets are available:
5 |
6 | changes Synchronizes README.md with CHANGES
7 |
8 | release Builds the complete release
9 | Synchronizes the version in README.md
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
33 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
109 |
110 |
111 |
112 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
129 |
130 |
131 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
160 |
161 |
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------
/inventory/CHANGES:
--------------------------------------------------------------------------------
1 | 1.0.0 20250701
2 | NT: Release is available
3 |
--------------------------------------------------------------------------------
/inventory/Inventory.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {E23F6A19-4C7D-482B-9F90-3D65C1A8A177}
8 | Exe
9 | VirtualEnvironment.Inventory
10 | Inventory
11 | v4.8
12 | 512
13 | true
14 | true
15 | Sources\Program.ico
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | Target\bin\Debug\
23 | Target\obj\Debug\
24 | Target\obj\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 | false
29 |
30 |
31 | AnyCPU
32 | pdbonly
33 | true
34 | Target\bin\Release\
35 | Target\obj\Release\
36 | Target\obj\Release\
37 | prompt
38 | 4
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/inventory/Inventory.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31903.59
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Inventory", "Inventory.csproj", "{E23F6A19-4C7D-482B-9F90-3D65C1A8A177}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {E23F6A19-4C7D-482B-9F90-3D65C1A8A177}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E23F6A19-4C7D-482B-9F90-3D65C1A8A177}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {E23F6A19-4C7D-482B-9F90-3D65C1A8A177}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {E23F6A19-4C7D-482B-9F90-3D65C1A8A177}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {F83D2CBA-1A5F-4E92-BCF3-7D6E8A5C90B1}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/inventory/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("Inventory for Seanox Virtual Environment")]
8 | [assembly: AssemblyDescription("Scans and extracts changes in the file system and registry.")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("Seanox Software Solutions")]
11 | [assembly: AssemblyProduct("Inventory")]
12 | [assembly: AssemblyCopyright("Copyright © 0000 Seanox Software Solutions")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("e23f6a19-4c7d-482b-9f90-3d65c1a8a177")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("0.0.0")]
35 | [assembly: AssemblyFileVersion("0.0.0")]
36 | [assembly: AssemblyMetadata("Build", "00000000")]
37 |
--------------------------------------------------------------------------------
/inventory/README.md:
--------------------------------------------------------------------------------
1 | # Inventory
2 | Scans and extracts changes in the file system and registry.
3 |
4 | The program analyzes changes in the file system of the system disk and the
5 | Windows registry through comparative status snapshots. It creates hash-based
6 | scan files that either contain full paths or aggregated hash values -- depending
7 | on the user-defined scan depth.
8 |
9 | Up to the specified scan depth, paths are fully recorded in the scan files. For
10 | deeper structures beyond this depth, a hash value is calculated that represents
11 | their entire content. The maximum scan depth is limited by the file system of
12 | the operating system.
13 |
14 | A second scan again creates scan files for the file system and the registry. By
15 | comparing the two scans, only modified and added data is extracted and stored as
16 | an exact copy of the affected files in an inventory directory. Deleted data is
17 | not recorded.
18 |
19 | For the copy of the file system, standard environment variables are used for
20 | paths, making them independent of drive letters and user accounts. Registry
21 | changes are saved in plain text in registry.data.
22 |
23 | The tool facilitates the creation of portable applications, as the recorded
24 | changes make it clear which files and registry entries an application requires
25 | and which may need to be abstracted. Additionally, it improves the traceability
26 | of changes after a software installation.
27 |
28 | # System Requirement
29 | - Microsoft Windows 10 or higher
30 | - Microsoft .NET 4.8.x or higher (for runtime)
31 | - [Microsoft .NET 4.8.x Developer Pack or higher](
32 | https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48) (for development only)
33 |
34 | # Download
35 | Inventory is [part of the virtual environment](
36 | https://github.com/seanox/virtual-environment/tree/main/platform/Resources/platform/Programs/Platform)
37 | but can also be downloaded and used separately.
38 |
39 | https://github.com/seanox/virtual-environment/releases
40 |
41 | # Changes
42 | ## 0.0.0 00000000
43 | NT: Coming soon
44 |
45 | [Read more](https://raw.githubusercontent.com/seanox/virtual-environment/master/inventory/CHANGES)
46 |
--------------------------------------------------------------------------------
/inventory/Sources/Messages.cs:
--------------------------------------------------------------------------------
1 | // LICENSE TERMS - Seanox Software Solutions is an open source project,
2 | // hereinafter referred to as Seanox Software Solutions or Seanox for short.
3 | // This software is subject to version 2 of the Apache License.
4 | //
5 | // Virtual Environment Inventory
6 | // Scans and extracts changes in the file system and registry.
7 | // Copyright (C) 2025 Seanox Software Solutions
8 | //
9 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
10 | // use this file except in compliance with the License. You may obtain a copy of
11 | // the License at
12 | //
13 | // https://www.apache.org/licenses/LICENSE-2.0
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18 | // License for the specific language governing permissions and limitations under
19 | // the License.
20 |
21 | using System;
22 | using System.Collections.Generic;
23 | using System.Linq;
24 | using System.Text;
25 | using System.Text.RegularExpressions;
26 | using System.Threading.Tasks;
27 |
28 | namespace VirtualEnvironment.Inventory
29 | {
30 | internal static class Messages
31 | {
32 | private static readonly HashSet _subscriptions;
33 |
34 | private static readonly object _lock;
35 |
36 | static Messages()
37 | {
38 | _subscriptions = new HashSet();
39 | _lock = new object();
40 | }
41 |
42 | internal static void Subscribe(ISubscriber recipient)
43 | {
44 | if (recipient is null)
45 | throw new ArgumentNullException();
46 | lock (_lock)
47 | _subscriptions.Add(recipient);
48 | }
49 |
50 | internal static void Unsubscribe(ISubscriber recipient)
51 | {
52 | if (recipient is null)
53 | throw new ArgumentNullException();
54 | lock (_lock)
55 | _subscriptions.Remove(recipient);
56 | }
57 |
58 | internal interface ISubscriber
59 | {
60 | void Receive(Message message);
61 | }
62 |
63 | internal static void Push(params Message[] messages)
64 | {
65 | List recipients;
66 | lock (_lock)
67 | recipients = _subscriptions.ToList();
68 |
69 | Parallel.ForEach(messages, message =>
70 | Parallel.ForEach(recipients, recipient =>
71 | {
72 | try { recipient.Receive(message); } catch { }
73 | }));
74 | }
75 |
76 | internal static void Push(Type type, params string[] data)
77 | {
78 | Push(new Message(type, data));
79 | }
80 |
81 | internal static void Push(Type type, string context, params string[] data)
82 | {
83 | Push(new Message(type, context, data));
84 | }
85 |
86 | internal static void Push(Type type, object data)
87 | {
88 | Push(new Message(type, data));
89 | }
90 |
91 | internal static void Push(Type type, string context, object data)
92 | {
93 | Push(new Message(type, context, data));
94 | }
95 |
96 | internal enum Type
97 | {
98 | Error,
99 | Warning,
100 | Trace,
101 | Verbose,
102 | Data,
103 | Exit
104 | }
105 |
106 | internal readonly struct Message
107 | {
108 | internal Type Type { get; }
109 | internal string Context { get; }
110 | internal object Data { get; }
111 |
112 | internal Message(Type type, object data)
113 | : this(type, null, data)
114 | {
115 | }
116 |
117 | internal Message(Type type, string context, object data)
118 | {
119 | Type = type;
120 | if (!String.IsNullOrWhiteSpace(context))
121 | context = Regex.Replace(context, @"[\r\n]+", " ").Trim();
122 | Context = !String.IsNullOrWhiteSpace(context) ? context : null;
123 | if (data is IEnumerable lines)
124 | data = String.Join(System.Environment.NewLine, lines);
125 | Data = data;
126 | }
127 |
128 | internal Message ConvertTo(Type type)
129 | {
130 | return new Message(type, Context, Data);
131 | }
132 |
133 | public override string ToString()
134 | {
135 | var stringBuilder = new StringBuilder(Type.ToString().ToUpper())
136 | .Append(" ");
137 |
138 | var content = Data;
139 |
140 | if (!String.IsNullOrWhiteSpace(Context))
141 | stringBuilder.AppendLine(Context);
142 |
143 | if (Data is Exception exception)
144 | {
145 | stringBuilder.Append(exception.GetType().Name);
146 | if (!String.IsNullOrWhiteSpace(exception.Message))
147 | stringBuilder.Append($": {exception.Message.Trim()}");
148 | stringBuilder.AppendLine();
149 | if (!(exception.StackTrace is null))
150 | content = exception.StackTrace
151 | .Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
152 | .Select(line => Convert.ToString(line).Trim());
153 | else content = null;
154 | }
155 |
156 | if (!(content is IEnumerable)
157 | && content is IEnumerable