@george1421 said in REQUEST: UltraVNC connect to client pc via fog interface...:
http://<host_name>:5800
No, I just get a white page. I think that’s trying to use Java.
 
@george1421 said in REQUEST: UltraVNC connect to client pc via fog interface...:
http://<host_name>:5800
No, I just get a white page. I think that’s trying to use Java.
can someone with some plugin coding ability put together a plugin that adds the connect to pc via UltraVNC from the fog web GUI?
I saw this in the WIKI but its fairly old.
@Tom-Elliott said in Fog V1.5.9.29 Active Directory Defaults for OU not populating Database:
Found and fixed in 1.5.9.34
Thank you,
Thanks!
@Tom-Elliott said in Fog V1.5.9.29 Active Directory Defaults for OU not populating Database:
SELECT TABLE_SCHEMA as DbName ,TABLE_NAME as TableName ,ENGINE as Engine FROM information_schema.TABLES WHERE ENGINE=‘Innodb’ AND TABLE_SCHEMA NOT IN(‘mysql’,‘information_schema’,‘performance_schema’) AND TABLE_SCHEMA = ‘fog’;
Tom, the database is configured as MyISAM.
I have an issue with the Default AD/OU not being applied when clicking update.  It also does not apply the AD/OU when doing a Quick Registration.
here is a video I created that shows my issue.  I have to go to the Active directory for each host and click on the dropdown and select the OU even though it’s already the default OU in the GUI.
Video
I have some HP EliteDesk 705 G5 PC’s that are giving me grief on PXE booting.
If I use uefi to boot it works. I need to use legacy pxe.
I get a messages that says:
Configuring (net0 xx:xx:xx:xx:xx:xx)........ No configuration methods succeeded (http://ipxe.org/040ee119)
DHCP failed, hit 's' for the iPXE shell; reboot in 10 seconds
I am trying to configure a dhcp section for the EliteBooks.
so far i have this:
class "EliteDesk" {
        match if substring(option vendor-class-identifier, 0, 8) = "MSFT 5.0";
        filename "realtek.kpxe";
    }
But i am not sure if it is correct or if it’s being used.
I have set the
set vendor-string = option vendor-class-identifier;
option in dhcpd.conf to show vendor classes in DHCP logs.
I am trying to figure out what 0, 20 refers to in the line “match if substring(option vendor-class-identifier, 0, 20) = “PXEClient:Arch:00000”;” in the dhcpd.conf file.
class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
Thanks!
Re: [The magical](mystical FOG post download script)
Can someone explain this bit of code?
regfile="/ntfs/Windows/System32/config/SOFTWARE"
key="\Microsoft\Windows\CurrentVersion\DevicePath"
devpath="%SystemRoot%\inf;%SystemRoot%\DRV";
reged -e "$regfile" &>/dev/null <<EOFREG
ed $key
$devpath
q
y
EOFREG
regfile="/ntfs/Windows/System32/config/SOFTWARE"
is this an actual registry file that must exist to be imported?
if so what must it contain?
key="\Microsoft\Windows\CurrentVersion\DevicePath"
I have looked for this key in regedit and cannot find it…
@george1421 said in Wrong Partition is mounted during deployment. (FOG 1.5.7.56):
@Greg-Plamondon You might want to update your partition detection script to the one used here:
#!/bin/bash . /usr/share/fog/lib/funcs.sh [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/" case $osid in 5|6|7|9) clear [[ ! -d /ntfs ]] && mkdir -p /ntfs getHardDisk if [[ -z $hd ]]; then handleError "Could not find hdd to use" fi getPartitions $hd for part in $parts; do umount /ntfs >/dev/null 2>&1 fsTypeSetting "$part" case $fstype in ntfs) dots "Testing partition $part" ntfs-3g -o force,rw $part /ntfs ntfsstatus="$?" if [[ ! $ntfsstatus -eq 0 ]]; then echo "Skipped" continue fi if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then echo "Not found" umount /ntfs >/dev/null 2>&1 continue fi echo "Success" break ;; *) echo " * Partition $part not NTFS filesystem" ;; esac done if [[ ! $ntfsstatus -eq 0 ]]; then echo "Failed" debugPause handleError "Failed to mount $part ($0)\n Args: $*" fi echo "Done" debugPause . ${postdownpath}fog.copydrivers # . ${postdownpath}fog.updateunattend umount /ntfs ;; *) echo "Non-Windows Deployment" debugPause return ;; esacThis one uses a bit more intelligence to find which partition actually has windows on it. I think your script is just picking the last partition and calling it good enough.
Thanks, That fixed it!
@george1421
Here is my fog.postdownload
#!/bin/bash
. /usr/share/fog/lib/funcs.sh
curl -A "" -Lkso /tmp/hinfo.sh "${web}/service/hostinfo.php?mac=$mac"
. /tmp/hinfo.sh
[[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
case $osid in
    5|6|7|9)
        clear
        [[ ! -d /ntfs ]] && mkdir -p /ntfs
        getHardDisk
        if [[ -z $hd ]]; then
            handleError "Could not find hdd to use"
        fi
        getPartitions $hd
        for part in $parts; do
            true
        done
        dots "Mounting partition $part"
        ntfs-3g -o force,rw $part /ntfs >/dev/null 2>&1
        if [[ ! $? -eq 0 ]]; then
            echo "Failed"
            debugPause
            handleError "Failed to mount $part ($0)\n    Args: $*"
        fi
        echo "Done"
        case $othertag in
           [Bb][Aa][Yy])
                . ${postdownpath}fog.log
                . ${postdownpath}fog.replace-files_bay
                . ${postdownpath}fog.drivers
                . ${postdownpath}fog.ad_bay
                . ${postdownpath}fog.DesktopInfo
                ;;
           [Mm][Pp][Mm][Ii])
                . ${postdownpath}fog.log
                . ${postdownpath}fog.replace-files_mpmi
                . ${postdownpath}fog.drivers
                . ${postdownpath}fog.ad_mpmi
                . ${postdownpath}fog.DesktopInfo
                ;;
           [Hh][Oo][Mm][Ee])
                . ${postdownpath}fog.log
                . ${postdownpath}fog.replace-files_home
                . ${postdownpath}fog.drivers
                ;;
           [Mm][Tt][Ss])
                . ${postdownpath}fog.log
                . ${postdownpath}fog.replace-files_fog
                . ${postdownpath}fog.drivers
                . ${postdownpath}fog.ad_bay
                . ${postdownpath}fog.DesktopInfo
                ;;
             *)
we use the $othertag to do different things for our sister companies.
How is $part determined?
@george1421 do you mind sharing your complex post download script with me 
well, I thought I had it licked but here is the issue with Windows 10 version 2004 MBR image.
It creates 3 partitions but they are in the wrong order.
Fog mounts /dev/sda3 which, in this case, is partition 3 the Recovery partition.

Here is the lsblk for the VM golden image.

I am using the postdownload scripts function to replace files on the os.
I have recently created a golden image of Windows 10 build 2004 and something has changed.
The image is a GPT image.
When deploying the image to the client pc it fails with:

the OS partition is /dev/sda3
any ideas on how to fix this?
*** EDIT
I went back to the golden image and used diskpart to delete partition 4 which is the Recovery Partition.
diskpart
select disk 0
select partition 4
delete partition override
exit
re-syspreped and uploaded to fogserver.
@Sebastian-Roth said in Powershell script doesnt work when fog client executes it:
@Greg-Plamondon said in Powershell script doesnt work when fog client executes it:
The problem I am seeing is that the following script works if I run it from a PowerShell window but not as a snapin.
Do you see it being executed in the fog-client log? Just want to make sure!
Are you aware of the fact that fog-client runs as SYSTEM account. Maybe this causes your script to behave different to what you expect?
Not sure if this is playing a role in your case as well? https://forums.fogproject.org/topic/11671/powershell-snapin-and-registry
Sorry just updated my original post with the log.
I have the lock/logins screen set so that users know not to logon while the setup process is running.

I am using this PowerShell script in a snapin to change the image back to the default, the snapin is set to reboot.
<#
.SYNOPSIS
	Change Lock Screen and Desktop Background in Windows 10 Pro.
.DESCRIPTION
	This script allows you to change logon screen and desktop background in Windows 10 Professional using GPO startup script.
.PARAMETER LockScreenSource (Optional)
	Path to the Lock Screen image to copy locally in computer.
    Example: "\\SERVER-FS01\LockScreen.jpg"
.PARAMETER BackgroundSource (Optional)
	Path to the Desktop Background image to copy locally in computer.
    Example: "\\SERVER-FS01\BackgroundScreen.jpg"
.PARAMETER LogPath (Optional)
    Path where save log file. If it's not specified no log is recorded.
.EXAMPLE
    Set Lock Screen and Desktop Wallpaper with logs:
    Set-Screen -LockScreenSource "\\SERVER-FS01\LockScreen.jpg" -BackgroundSource "\\SERVER-FS01\BackgroundScreen.jpg" -LogPath "\\SERVER-FS01\Logs"
.EXAMPLE
    Set Lock Screen and Desktop Wallpaper without logs:
    Set-Screen -LockScreenSource "\\SERVER-FS01\LockScreen.jpg" -BackgroundSource "\\SERVER-FS01\BackgroundScreen.jpg"
.EXAMPLE
    Set Lock Screen only:
    Set-Screen -LockScreenSource "\\SERVER-FS01\LockScreen.jpg" -LogPath "\\SERVER-FS01\Logs"
.EXAMPLE
	Set Desktop Wallpaper only:
    Set-Screen -BackgroundSource "\\SERVER-FS01\BackgroundScreen.jpg" -LogPath "\\SERVER-FS01\Logs"
.NOTES 
	Author: Juan Granados 
	Date:   September 2018
#>
Param(
		[Parameter(Mandatory=$false,Position=0)] 
		[ValidateNotNullOrEmpty()]
		[string]$LockScreenSource,
        [Parameter(Mandatory=$false,Position=1)] 
		[ValidateNotNullOrEmpty()]
		[string]$BackgroundSource,
        [Parameter(Mandatory=$false,Position=2)] 
		[ValidateNotNullOrEmpty()]
		[string]$LogPath
	)
#Requires -RunAsAdministrator
if (-not [string]::IsNullOrWhiteSpace($LogPath)) {
    Start-Transcript -Path "$($LogPath)\$($env:COMPUTERNAME).log" | Out-Null
}
$ErrorActionPreference = "Stop"
$RegKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP"
$DesktopPath = "DesktopImagePath"
$DesktopStatus = "DesktopImageStatus"
$DesktopUrl = "DesktopImageUrl"
$LockScreenPath = "LockScreenImagePath"
$LockScreenStatus = "LockScreenImageStatus"
$LockScreenUrl = "LockScreenImageUrl"
$StatusValue = "1"
$DesktopImageValue = "C:\Windows\System32\Desktop.jpg"
$LockScreenImageValue = "C:\Windows\System32\LockScreen.jpg"
if (!$LockScreenSource -and !$BackgroundSource) 
{
    Write-Host "Either LockScreenSource or BackgroundSource must has a value."
}
else 
{
    if(!(Test-Path $RegKeyPath)) {
        Write-Host "Creating registry path $($RegKeyPath)."
        New-Item -Path $RegKeyPath -Force | Out-Null
    }
    if ($LockScreenSource) {
        Write-Host "Copy Lock Screen image from $($LockScreenSource) to $($LockScreenImageValue)."
        Copy-Item $LockScreenSource $LockScreenImageValue -Force
        Write-Host "Creating registry entries for Lock Screen"
        New-ItemProperty -Path $RegKeyPath -Name $LockScreenStatus -Value $StatusValue -PropertyType DWORD -Force | Out-Null
        New-ItemProperty -Path $RegKeyPath -Name $LockScreenPath -Value $LockScreenImageValue -PropertyType STRING -Force | Out-Null
        New-ItemProperty -Path $RegKeyPath -Name $LockScreenUrl -Value $LockScreenImageValue -PropertyType STRING -Force | Out-Null
    }
    if ($BackgroundSource) {
        Write-Host "Copy Desktop Background image from $($BackgroundSource) to $($DesktopImageValue)."
        Copy-Item $BackgroundSource $DesktopImageValue -Force
        Write-Host "Creating registry entries for Desktop Background"
        New-ItemProperty -Path $RegKeyPath -Name $DesktopStatus -Value $StatusValue -PropertyType DWORD -Force | Out-Null
        New-ItemProperty -Path $RegKeyPath -Name $DesktopPath -Value $DesktopImageValue -PropertyType STRING -Force | Out-Null
        New-ItemProperty -Path $RegKeyPath -Name $DesktopUrl -Value $DesktopImageValue -PropertyType STRING -Force | Out-Null
    }  
}
if (-not [string]::IsNullOrWhiteSpace($LogPath)){Stop-Transcript}
The problem I am seeing is that the following script works if I run it from a PowerShell window but not as a snapin.
snapin settings:

Logfile for script:
**********************
Windows PowerShell transcript start
Start time: 20200103154304
Username: MTSTRANS\SYSTEM
RunAs User: MTSTRANS\SYSTEM
Configuration Name: 
Machine: TV3270 (Microsoft Windows NT 10.0.18363.0)
Host Application: powershell.exe -ExecutionPolicy Bypass -NoProfile -File C:\Program Files (x86)\FOG\tmp\Set-Screen.ps1 -LockScreenSource C:\Windows\Web\Screen\img100.jpg -LogPath c:\TEMP
Process ID: 4196
PSVersion: 5.1.18362.145
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.18362.145
BuildVersion: 10.0.18362.145
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Creating registry path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP.
Copy Lock Screen image from C:\Windows\Web\Screen\img100.jpg to C:\Windows\System32\LockScreen.jpg.
Creating registry entries for Lock Screen
**********************
Windows PowerShell transcript end
End time: 20200103154305
**********************
but the image never changes…
fog.log
------------------------------------------------------------------------------
---------------------------------SnapinClient---------------------------------
------------------------------------------------------------------------------
 1/3/2020 4:29 PM Client-Info Client Version: 0.11.16
 1/3/2020 4:29 PM Client-Info Client OS:      Windows
 1/3/2020 4:29 PM Client-Info Server Version: 1.5.7.56
 1/3/2020 4:29 PM Middleware::Response Success
 1/3/2020 4:29 PM SnapinClient Running snapin SET-LOGON-SCREEN
 1/3/2020 4:29 PM Middleware::Communication Download: http://192.168.10.238//fog/service/snapins.file.php?mac=00:23:24:B3:BB:07|44:85:00:9A:20:2D|46:85:00:9A:20:2C|44:85:00:9A:20:2C|44:85:00:9A:20:30&taskid=10518
 1/3/2020 4:29 PM SnapinClient C:\Program Files (x86)\FOG\tmp\Set-Screen.ps1
 1/3/2020 4:29 PM Bus Emmiting message on channel: Notification
 1/3/2020 4:29 PM SnapinClient Starting snapin
 1/3/2020 4:29 PM SnapinClient Snapin finished
 1/3/2020 4:29 PM SnapinClient Return Code: 0
 1/3/2020 4:29 PM Bus Emmiting message on channel: Notification
 1/3/2020 4:29 PM Middleware::Communication URL: http://10fogserver/fog/service/snapins.checkin.php?taskid=10518&exitcode=0&mac=00:23:24:B3:BB:07|44:85:00:9A:20:2D|46:85:00:9A:20:2C|44:85:00:9A:20:2C|44:85:00:9A:20:30&newService&json
 1/3/2020 4:29 PM Power Creating shutdown request
 1/3/2020 4:29 PM Power Parameters: /r /c "Snapin requested restart" /t 0
 1/3/2020 4:29 PM Bus Emmiting message on channel: Power
 1/3/2020 4:29 PM Power Attempt 1/6 to shutdown computer
 1/3/2020 4:29 PM Power --> API call returned 1, will re-attempt in 5 minutes
I get this error when tasking a mchine to image.
===  ==========    =====      ====
   ==================================
   ===== Free Opensource Ghost ======
   ==================================
   ============ Credits =============
   = https://fogproject.org/Credits =
   ==================================
   == Released under GPL Version 3 ==
   ==================================
   Version: 1.5.7.820
   Init Version: 20191216
 * Verifying network interface configuration.........Done
 * Checking Operating System.........................Windows 10
 * Checking CPU Cores................................2
 * Send method.......................................NFS
 * Attempting to check in............................Failed
 * DateTime::__construct(): Failed to parse time string (No Data) at position 0
(N): The timezone could not be found in the database (In line for )
 * Attempting to check in............................Failed
 * DateTime::__construct(): Failed to parse time string (No Data) at position 0
(N): The timezone could not be found in the database (In line for 5)
 * Attempting to check in............................Failed
 * DateTime::__construct(): Failed to parse time string (No Data) at position 0
(N): The timezone could not be found in the database (In line for 10)
@Sebastian-Roth I am positive we do not deploy the fog client with group policy.
Even with group policy, it wouldn’t install over the existing without removing the old unless the installer permits it.
@Sebastian-Roth I think this was caused by me. I was having issues with fog on the working 1.6 so I rolled back to an older snaphot of the VM. I then went back to Working 1.6 after 2 days. I still don’t see how the fog installer would allow a downgrade install?