Skip to content

Commit

Permalink
Revert to 0.7.2 and jump to 0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbob committed May 7, 2015
1 parent 710182e commit b0a4d93
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 38 deletions.
197 changes: 197 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bin/
bld/
[Bb]in/
[Oo]bj/

# Visual Studo 2015 cache/options directory
.vs/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt
8 changes: 4 additions & 4 deletions Installer/Files.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
</ServiceInstall>
<ServiceControl Id="ConfigureService" Stop="both" Remove="uninstall" Name="FOGService" Wait="yes" />
</Component>
<Component Id="ServerRegistry" Guid="5914aedb-e02d-4a6a-8622-b0ba561041e1" NeverOverwrite="yes" Permanent="yes">
<Component Id="ServerRegistry" Guid="5914aedb-e02d-4a6a-8622-b0ba561041e1">
<RegistryKey Root="HKLM" Key="SOFTWARE\FOG">
<RegistryValue Name="Server" Type="string" Value="[WEBADDRESS]" />
</RegistryKey>
</Component>
<Component Id="TrayRegistry" Guid="d5b010c4-d72a-410d-a865-901afdcc97ba" NeverOverwrite="yes" Permanent="yes">
<Component Id="TrayRegistry" Guid="d5b010c4-d72a-410d-a865-901afdcc97ba">
<RegistryKey Root="HKLM" Key="SOFTWARE\FOG">
<RegistryValue Name="Tray" Type="string" Value="[USETRAY]" />
</RegistryKey>
</Component>
<Component Id="WebRootRegistry" Guid="4d726fa5-f228-4efa-b006-872efa673881" NeverOverwrite="yes" Permanent="yes">
<Component Id="WebRootRegistry" Guid="4d726fa5-f228-4efa-b006-872efa673881">
<RegistryKey Root="HKLM" Key="SOFTWARE\FOG">
<RegistryValue Name="WebRoot" Type="string" Value="[WEBROOT]" />
</RegistryKey>
</Component>
<Component Id="HttpsRegistry" Guid="ca9bbfbd-4c14-49ad-9a6e-ecb329197561" NeverOverwrite="yes" Permanent="yes">
<Component Id="HttpsRegistry" Guid="ca9bbfbd-4c14-49ad-9a6e-ecb329197561">
<RegistryKey Root="HKLM" Key="SOFTWARE\FOG">
<RegistryValue Name="HTTPS" Type="string" Value="[HTTPS]" />
</RegistryKey>
Expand Down
4 changes: 2 additions & 2 deletions Installer/Setup.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
-->

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="FOG Service" Language="1033" Version="0.7.2" UpgradeCode="1CCFDEAF-53E9-43AC-AE18-F9F86CEFA4EA" Manufacturer="FOG">
<Product Id="*" Name="FOG Service" Language="1033" Version="0.7.4" UpgradeCode="1CCFDEAF-53E9-43AC-AE18-F9F86CEFA4EA" Manufacturer="FOG">
<Package Description="FOG Service" Comments="A client for the FOG project" InstallerVersion="300" Compressed="yes" InstallScope="perMachine" />
<!-- Remove old versions -->
<Upgrade Id="1CCFDEAF-53E9-43AC-AE18-F9F86CEFA4EA">
<UpgradeVersion OnlyDetect="yes" Minimum="0.0.0" Property="NEWERVERSIONDETECTED" IncludeMinimum="no" />
<UpgradeVersion OnlyDetect="no" Minimum="0.0.0" Maximum="0.7.1" Property="OLDERVERSIONBEINGUPGRADED" IncludeMinimum="no" IncludeMaximum="yes" MigrateFeatures="yes" />
<UpgradeVersion OnlyDetect="no" Minimum="0.0.0" Maximum="0.7.3" Property="OLDERVERSIONBEINGUPGRADED" IncludeMinimum="no" IncludeMaximum="yes" MigrateFeatures="yes" />
</Upgrade>
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
Expand Down
33 changes: 18 additions & 15 deletions Modules/GreenFOG/GreenFOG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,26 @@ protected override void doWork()

private List<String> filterTasks(List<String> newTasks)
{
var taskService = new TaskService();
var existingTasks = taskService.GetFolder("FOG").AllTasks.ToList();

foreach (var task in existingTasks)
{
if (!newTasks.Contains(task.Name))
{
LogHandler.Log(Name, "Delete task " + task.Name);
taskService.RootFolder.DeleteTask(@"FOG\" + task.Name, true); //If the existing task is not in the new list delete it
}
else
try {
var taskService = new TaskService();
var existingTasks = taskService.GetFolder("FOG").AllTasks.ToList();

foreach (var task in existingTasks)
{
LogHandler.Log(Name, "Removing " + task.Name + " from queue");
newTasks.Remove(task.Name); //Remove the existing task from the queue
}
if (!newTasks.Contains(task.Name))
{
LogHandler.Log(Name, "Delete task " + task.Name);
taskService.RootFolder.DeleteTask(@"FOG\" + task.Name, true); //If the existing task is not in the new list delete it
}
else
{
LogHandler.Log(Name, "Removing " + task.Name + " from queue");
newTasks.Remove(task.Name); //Remove the existing task from the queue
}
}
} catch (Exception ex) {
LogHandler.Log(Name, "ERROR: " + ex.Message);
}

return newTasks;
}

Expand Down
4 changes: 2 additions & 2 deletions Modules/HostnameChanger/HostnameChanger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ private void registerComputer(Response taskResponse)
int returnCode = NetJoinDomain(null, taskResponse.getField("#ADDom"), taskResponse.getField("#ADOU"),
taskResponse.getField("#ADUser"), userPassword,
(JoinOptions.NETSETUP_JOIN_DOMAIN | JoinOptions.NETSETUP_ACCT_CREATE));
if (returnCode == 2224)
if (returnCode == 2224 || returnCode == 2)
{
returnCode = NetJoinDomain(null, taskResponse.getField("#ADDom"), taskResponse.getField("#ADOU"),
returnCode = NetJoinDomain(null, taskResponse.getField("#ADDom"), "",
taskResponse.getField("#ADUser"), userPassword, JoinOptions.NETSETUP_JOIN_DOMAIN);
}

Expand Down
44 changes: 29 additions & 15 deletions UpdateHelper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,34 @@ public static void Main(string[] args)

}

private static void applyUpdates()
{
String LOG_NAME = "Update Helper";
var process = new Process();
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

process.StartInfo.FileName = "msiexec";
;
process.StartInfo.Arguments = "/i \"" + (AppDomain.CurrentDomain.BaseDirectory + "FOGService.msi") + "\" /quiet";
LogHandler.Log(LOG_NAME, "--> " + process.StartInfo.FileName + " " + process.StartInfo.Arguments);
process.Start();
process.WaitForExit();
}
private static void applyUpdates()
{
const string LOG_NAME = "Update Helper";

var useTray = RegistryHandler.GetSystemSetting("Tray");
var https = RegistryHandler.GetSystemSetting("HTTPS");
var webRoot = RegistryHandler.GetSystemSetting("WebRoot");
var server = RegistryHandler.GetSystemSetting("Server");

var process = new Process
{
StartInfo =
{
Arguments = string.Format("/i \"{0}\" /quiet /USETRAY=\"{1}\" HTTPS=\"{2}\" WEBADDRESS=\"{3}\" WEBROOT=\"{4}\"",
(AppDomain.CurrentDomain.BaseDirectory + "FOGService.msi"),
useTray, https, server, webRoot)
}
};
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

process.StartInfo.FileName = "msiexec";


LogHandler.Log(LOG_NAME, "--> " + process.StartInfo.FileName + " " + process.StartInfo.Arguments);
process.Start();
process.WaitForExit();
}
}
}

0 comments on commit b0a4d93

Please sign in to comment.