Skip to content

Commit fb40684

Browse files
Merge remote-tracking branch 'remotes/origin/develop'
# Conflicts: # README.md
2 parents 0e15f65 + 1337538 commit fb40684

26 files changed

+2638
-263
lines changed

HISTORY.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
HISTORY
3+
=======
4+
5+
v1.0.0.0 - 28th Jun 2018
6+
------------------------
7+
- Added 2 level password option for admins and users.
8+
- Added customizable user tools menu for launching command prompts, registry tools, anything!
9+
- Added task sequence variables explorer and editor.
10+
- Options.xml reorganized.
11+
12+
13+
v0.1.0.0 - 30th Jan 2018
14+
------------------------
15+
Initial release.

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ When doing an SCCM or MDT Operating System Deployment a common task is to custom
99

1010
During Windows 7 setup there is a window that shows the message "Setup is preparing your computer for first use". On Windows 8 and Windows 10 that message is "Getting Ready" or the circling dots animation. These setup windows obscure the background thus hiding our custom background.
1111

12-
The only solution is to create a new custom window and place it above this progress window and fill it with our wallpaper bitmap thus creating a "fake" background.
12+
The only solution is to create a new custom window and place it above this progress window and fill it with our wallpaper bitmap thus creating a "fake" background. Additionally, the tool also registers a hotkey combination to bring up a debug menu for running user configurable tools and task sequence variables.
1313

1414
## Main Web Site and Binary Downloads
1515

1616
Please see the product page for more details and binary downloads. [https://www.autoitconsulting.com/site/software/osd-background/](https://www.autoitconsulting.com/site/software/osd-background/).
17+
18+
## Features
19+
Here are some of the key features of OSD Background:
20+
* Allows background bitmap to be seen on Windows 10 during deployment.
21+
* Background can be configured to show an automatic progress bar that is based on the position in the current task sequence
22+
* Hotkey combination (Ctrl+Alt+F12) will bring up a debug menu.
23+
* Debug menu can be protected with two different passwords for Admin and User levels access.
24+
* User-configurable tools menu. Command prompts, registry editing, system information, anything! Individual tools can be marked as 'Admin Only' and are only shown when the Admin password is used to open the menu.
25+
* Editable list of task sequence variables.

src/AutoIt.OSD.Background/AutoIt.OSD.Background.csproj

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
<ApplicationIcon>Resources\main.ico</ApplicationIcon>
5757
</PropertyGroup>
5858
<ItemGroup>
59+
<Reference Include="ProgressUILib_DotNet40">
60+
<HintPath>ReferenceAssemblies\TSCore\ProgressUILib_DotNet40.dll</HintPath>
61+
<EmbedInteropTypes>True</EmbedInteropTypes>
62+
</Reference>
5963
<Reference Include="System" />
6064
<Reference Include="System.Core" />
6165
<Reference Include="System.Xml.Linq" />
@@ -78,6 +82,20 @@
7882
<Compile Include="FormBackground.Designer.cs">
7983
<DependentUpon>FormBackground.cs</DependentUpon>
8084
</Compile>
85+
<Compile Include="FormPassword.cs">
86+
<SubType>Form</SubType>
87+
</Compile>
88+
<Compile Include="FormPassword.Designer.cs">
89+
<DependentUpon>FormPassword.cs</DependentUpon>
90+
</Compile>
91+
<Compile Include="FormTools.cs">
92+
<SubType>Form</SubType>
93+
</Compile>
94+
<Compile Include="FormTools.Designer.cs">
95+
<DependentUpon>FormTools.cs</DependentUpon>
96+
</Compile>
97+
<Compile Include="KeyboardHook.cs" />
98+
<Compile Include="NamedPipeXmlPayload.cs" />
8199
<Compile Include="Options.cs" />
82100
<Compile Include="Program.cs" />
83101
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -93,6 +111,12 @@
93111
<EmbeddedResource Include="FormBackground.resx">
94112
<DependentUpon>FormBackground.cs</DependentUpon>
95113
</EmbeddedResource>
114+
<EmbeddedResource Include="FormPassword.resx">
115+
<DependentUpon>FormPassword.cs</DependentUpon>
116+
</EmbeddedResource>
117+
<EmbeddedResource Include="FormTools.resx">
118+
<DependentUpon>FormTools.cs</DependentUpon>
119+
</EmbeddedResource>
96120
<EmbeddedResource Include="Properties\Resources.resx">
97121
<Generator>ResXFileCodeGenerator</Generator>
98122
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -158,9 +182,6 @@
158182
<Content Include="Example\Error.jpg">
159183
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
160184
</Content>
161-
<Content Include="Example\Options.xml">
162-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
163-
</Content>
164185
<Content Include="Example\OSD_SetPhase.vbs">
165186
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
166187
</Content>
@@ -175,7 +196,7 @@
175196
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
176197
<PropertyGroup>
177198
<PostBuildEvent>if $(ConfigurationName)==Debug goto :debug
178-
call "generate_release_package.cmd"
199+
REM call "generate_release_package.cmd"
179200
:debug</PostBuildEvent>
180201
</PropertyGroup>
181202
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/AutoIt.OSD.Background/Example/OSD_SetPhase.vbs

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11

22
'-----------------------------------------------------------------------------
33
' ScriptName: OSD_SetPhase.vbs
4-
' Date: 23/01/18
4+
' Date: 26/06/18
55
' Author: Jonathan Bennett <jon@autoitconsulting.com>
66
' Purpose: Launches BGinfo to customize the desktop and then ensure it is visible on Windows 7 / 8 / 10.
7-
' Usage: cscript.exe OSD_SetPhase.vbs "Installing Something" (Use the phrase "ERROR: xxxx" to show the Error.jpg bitmap")
7+
' Usage: cscript.exe OSD_SetPhase.vbs "Installing Something" (Use the phrase "ERROR: xxxx" to show the Error.jpg bitmap")
88
'-----------------------------------------------------------------------------
99
Option Explicit
1010

11-
' Set this to True if your WinPE boot image has .NET support and AutoIt.OSD.Background.exe works correctly there
12-
Const DotNetInWinPE = False
13-
1411
Const WinStyleMinimizedInactive = 7
1512
Const WinStyleNormal = 1
1613
Const WinStyleHidden = 0
@@ -24,20 +21,22 @@ Dim g_bTaskSequenceRunning : g_bTaskSequenceRunning = False
2421
On Error Resume Next
2522
Dim g_oTSEnv : Set g_oTSEnv = CreateObject("Microsoft.SMS.TSEnvironment")
2623
If Err.Number = 0 Then
27-
g_bTaskSequenceRunning = True
24+
' May succeed because of a failed Task Sequence or bad clean-up of COM objects.
25+
' Double check by reading the Task Sequence type, if its blank - not in a Task Sequence
26+
If g_oTSEnv("_SMSTSType") <> "" Then
27+
g_bTaskSequenceRunning = True
28+
End If
2829
End If
2930
On Error Goto 0
3031

31-
Dim sBGInfoText
32-
3332
' Get arguments
33+
Dim sBGInfoText
3434
Dim oArgs : Set oArgs = WScript.Arguments
3535
If oArgs.Count >= 1 Then
3636
sBGInfoText = oArgs(0)
3737
End If
3838

3939
Dim sBgi : sBgi = "Default.bgi"
40-
4140
If InStr(UCase(sBGInfoText), "ERROR:") > 0 Then
4241
sBgi = "Error.bgi"
4342
End If
@@ -63,16 +62,8 @@ Else
6362
End If
6463
On Error Goto 0
6564

66-
' We run differently depending on if we are in WinPE as we can't really assume that .NET is present.
67-
Dim bInWinPE
68-
If UCase(GetTSVariable("_SMSTSInWinPE")) = "TRUE" Then
69-
bInWinPE = True
70-
Else
71-
bInWinPE = False
72-
End If
73-
74-
' Run our custom OSD background exe?
75-
If bInWinPE = False Or (bInWinPE = True And DotNetInWinPE = True) Then
65+
' Run our custom OSD background exe? Needs .NET 4 or later
66+
If IsDotNet4Or45Installed() Then
7667
On Error Resume Next
7768
g_oShell.Run "AutoIt.OSD.Background.exe Options.xml", WinStyleNormal, False
7869
On Error Goto 0
@@ -90,3 +81,33 @@ Function GetTSVariable(ByVal sVar)
9081
End Function
9182

9283
'----------------------------------------------------
84+
85+
Function IsDotNet4Or45Installed()
86+
87+
If ReadFromRegistry("HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0\Full\Version", "") <> "" Then
88+
IsDotNet4Or45Installed = True
89+
ElseIf ReadFromRegistry("HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0\Client\Version", "") <> "" Then
90+
IsDotNet4Or45Installed = True
91+
ElseIf ReadFromRegistry("HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Version", "") <> "" Then
92+
IsDotNet4Or45Installed = True
93+
Else
94+
IsDotNet4Or45Installed = False
95+
End If
96+
97+
End Function
98+
99+
'----------------------------------------------------
100+
101+
Function ReadFromRegistry (ByVal strRegistryKey, ByVal strDefault )
102+
On Error Resume Next
103+
104+
Dim val : val = g_oShell.RegRead( strRegistryKey )
105+
if err.number <> 0 then
106+
107+
ReadFromRegistry = strDefault
108+
else
109+
ReadFromRegistry = val
110+
end if
111+
End Function
112+
113+
'----------------------------------------------------

src/AutoIt.OSD.Background/Example/Options.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
AutoIt.OSD.Background Example
2+
-----------------------------
3+
https://www.autoitconsulting.com/site/software/osd-background/
4+
5+
16
1. Please download Sysinternals BGInfo from:
27

38
https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo
@@ -7,11 +12,14 @@ Open the archive and copy BGInfo.exe and BGInfo64.exe into this folder.
712

813
2. Modify Options.xml as required.
914

10-
3. Open BGInfo.exe and open Default.bgi and Error.bgi to customize your BGInfo text.
15+
3. Run the script inside your task sequence like so:
1116

12-
4. Modify Default.jpg and Error.jpg as required.
17+
cscript.exe //NoLogo OSD_SetPhase.vbs "This is some phase text"
1318

14-
5. Run the script inside your task sequence like so:
1519

16-
cscript.exe //NoLogo OSD_SetPhase.vbs "This is some phase text"
20+
21+
22+
To customize the bitmaps used edit Default.jpg and Error.jpg.
23+
24+
Open BGInfo.exe and open Default.bgi and Error.bgi to customize your BGInfo text.
1725

src/AutoIt.OSD.Background/FormBackground.Designer.cs

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)