• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Avaryan
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 22
    • Posts 217
    • Best 39
    • Controversial 0
    • Groups 2

    Posts made by Avaryan

    • RE: Post Sysprep Driver Install

      @TrinityAcademy said in Post Sysprep Driver Install:

      HI

      I am running FOG 1.3.4 on Ubuntu 16.04 and creating a Windows 10 Education 1607 image. I want this image to go on different machines and was wondering if there was a way to install the drivers automatically after sysprep. Any help will be greatly received.

      Thanks

      It really depends on how many models you plan to support with this image. If it’s only a couple, you could just pre-add the drivers to the DriverStore and Windows will usually pick the correct ones during the final stages of sysprep.

      If you have more, you could utilize a network driverstore and again have Windows try to do it automatically. Or, if you want more control, you can use post installation scripts. FOG has a post installation script feature, but I’ve never used it.

      I have this brief tutorial about doing multiple model post deployment scripts using PowerShell. I support 20+ models with this setup.
      https://forums.fogproject.org/topic/9859/post-deployment-driver-installation-using-powershell-scripts

      posted in General
      AvaryanA
      Avaryan
    • RE: Post Sysprep Driver Install

      @larosejm said in Post Sysprep Driver Install:

      @larosejm now that i think about it, if you use the snap-in feature of fog, you could just use the generated silent installer packages as snap-ins as well

      You could, as long as the NIC driver is working. However, if the driver isn’t a single file .msi or .exe you’d need to package it with something like 7-zip SFX.

      Really depends on how many models you are deploying to. I’m doing over 20 with one image, so making all drivers snapins just isn’t practical.

      posted in General
      AvaryanA
      Avaryan
    • RE: Hostname Change on 700+ Workstations

      From what I’ve seen, when you import you can specify the OU path. Column L on my export.

      Use PowerShell to get the current OU’s.
      Something like:

      Get-ADComputer -Identity (Get-WmiObject Win32_ComputerSystem).Name | Select DistinguishedName -ExpandProperty DistinguishedName
      

      It’ll return:

      Example: CN=SaraDavisDesktop,CN=Europe,CN=Users,DC=corp,DC=contoso,DC=com
      

      You could export that to a CSV file. Format. Sort by hostname. Copy/Paste into your import file. Then import it.

      Might work. All theoretical.

      posted in FOG Problems
      AvaryanA
      Avaryan
    • RE: Hostname Change on 700+ Workstations

      @Wayne-Workman said in Hostname Change on 700+ Workstations:

      You can script this as joe said,

      But I think it would be easier to do a host export, modify the export, and then re-inport.

      This is what I would do; however, it might be a good idea to disable the hostname changer module first. This will prevent FOG from immediately changing everything. At the end of the workday, or whenever, you can reenable the module and let FOG do its thing.

      posted in FOG Problems
      AvaryanA
      Avaryan
    • RE: snap-in will not run on startup after being installed

      Is there an ALLUSERS switch you can add on? It’s likely as Tom mentioned, it’s only adding shortcuts under the account used to install it.

      If there isn’t switch to install for all users you could write in your batch the commands to copy to the public desktop and start menu.

      Assuming that messenger-setup.exe and the shortcut file are in the same root location as the installation script, something like this should work:

      CLS
      ECHO Installing School Messenger... Do not close.
      ECHO.
      CD %~dp0
      START "School Messenger" /wait "messenger-setup.exe" /verysilent
      SLEEP.exe 10
      COPY "School Messenger.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\School Messenger.lnk"
      COPY "School Messenger.lnk" "C:\Users\Public\Desktop\School Messenger.lnk"
      CLS
      ECHO Installed School Messenger
      ECHO.
      SLEEP.exe 5
      EXIT
      

      If that doesn’t work, maybe provide the application so others can test it.

      posted in General Problems
      AvaryanA
      Avaryan
    • RE: snap-in will not run on startup after being installed

      Do you have these files packaged together somehow or are you only uploading the command file to FOG?

      Might be better off just uploading the .exe and adding in the arguments.

      Maybe do something like this:
      alt text

      Edit: I guess I didn’t read your original message very well. You say that the application is installing, but not adding the shortcuts to the start menu/desktop?

      posted in General Problems
      AvaryanA
      Avaryan
    • RE: Setup 2nd FOG Server

      I’ve had another vlan provisioned with Options 66 and 67 set to point to the test server. I have 2 ports on my switch mapped to the new vlan.

      posted in General
      AvaryanA
      Avaryan
    • RE: Setup 2nd FOG Server

      @Wayne-Workman Is it possible to have Option 66 configured for a single port on a switch?

      posted in General
      AvaryanA
      Avaryan
    • RE: Setup 2nd FOG Server

      Sadly, I don’t have access to DHCP. Maybe I can setup some kind of closed network in my office.

      posted in General
      AvaryanA
      Avaryan
    • Post-deployment Driver Installation using PowerShell scripts.

      Hello,

      I just wanted to share how I’ve been handling driver installation to have 1 image work for over 20 different models. I’ve done this for both Windows 7 and Windows 10 with (mostly) great results.

      I’d argue that the most important step is to make sure your image contains all of the NIC drivers for all the models that you need to support. Drivers are going to be hosted on a network share. No NIC drivers means no Internet.

      Go ahead and download all of the NIC drivers for all of your models or find driver packs online. Once downloaded extract the files to a common folder. In the root of the folder create a PowerShell script with the following line. Run the script. (You may need to adjust your Execution Policy to run scripts. Google it.)

      Get-ChildItem -Path $PSScriptRoot -Recurse | Where-Object -Property Extension -EQ ".inf" | ForEach { PnPUtil.exe -a $PSItem.FullName } 
      

      This will do a recursive search for all files that have the .inf extension and use pnputil to add them to Windows driver store. During sysprep Windows will detect your hardware and pull the correct driver from the driver store.

      Besides the NIC drivers, there are only 3 files that I add to the image. My unattend.xml, SetupComplete.cmd, and SetupComplete.ps1. The rest are pulled from a network share.

      I assume you already have a working answer file, I’m not going to go into that or how to use sysprep.

      SetupComplete.cmd - Located in C:\Windows\Setup\Scripts\ - You’ll need to create the Scripts folder.

      @ECHO OFF
      
      ECHO Initializing Driver Installation Script
      START /wait PowerShell.exe -Command "& '%~dpn0.ps1'"
      
      ECHO Removing configuration files.
      CD %dp0
      DEL SetupComplete.ps1
      
      CD %windir%\System32\Sysprep
      DEL unattend.xml
      

      This will launch a PowerShell script with the same name as the SetupComplete.cmd file, stored in the same location. SetupComplete.ps1.
      After SetupComplete.ps1 is finished running it will get deleted. The unattend.xml file also gets deleted.

      SetupComplete.ps1 - Located in C:\Windows\Setup\Scripts\

      # Credentials used to access network drive.
      $Username = "Domain\Username"
      $Password = "Password" | ConvertTo-SecureString -AsPlainText -Force
      $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Username, $Password
      $RootPath = "$env:HOMEDRIVE\Drivers\"
      
      # Function to determine if 10.10.0.1 is reachable, used to verify
      # that NIC drivers are working. Waits up to 30 seconds.
      Function Wait-ForConnection {
          $wait = $true
          $count = 30
          Write-Host "Establishing network connection." -NoNewline
          while($wait) {
              $connection = Test-Connection 10.10.0.1 -ErrorAction SilentlyContinue
              if ($connection) {
                  Write-Host
                  Write-Host "Connection established!" -ForegroundColor Green
                  $wait = $false
              } else {
                  Write-Host " ." -NoNewline
                  $count = ($count -1)
                  Start-Sleep -Seconds 1
              }
              if ($count -le 0) {
                  $wait = $false
                  Write-Host "Unable to establish a network connection." -ForegroundColor Red
              }
          }
      }
      
      Wait-ForConnection
      Write-Host
      Write-Host "Mounting network drive."
      New-PSDrive -Name "Deploy" -PSProvider FileSystem -Root \\ShareName\Windows10 -Credential $Credential | Out-Null
      $Deploy = Test-Path -Path Deploy:\ -ErrorAction SilentlyContinue
      if ($Deploy) {
          Write-Host "Successfully mounted network drive." -ForegroundColor Green
          Write-Host
          if (!(Test-Path -Path $RootPath)) {
              New-Item -Path $RootPath -ItemType Directory | Out-Null
          }
          $Controller = "Deploy:\Controller.ps1"
          Copy-Item -Path $Controller -Destination "$env:HOMEDRIVE\Drivers\Controller.ps1" -Force
          $Controller = "$env:HOMEDRIVE\Drivers\Controller.ps1"
          Write-Host "Running script " -NoNewline 
          Write-Host "Controller.ps1 " -NoNewline -ForegroundColor Yellow
          Invoke-Expression -Command $Controller
      
          # Do other stuff, etc...
      
          Write-Host
          Write-Host "Unmounting network drive."
          Remove-PSDrive -Name "Deploy"
      } else { 
          Write-Host "Failed to mount network drive." -ForegroundColor Red
      }
      
      Start-Sleep -Seconds 5
      
      Restart-Computer
      

      First off, this will check to see if you can reach 10.10.0.1 (Change this to something relevant to you).
      If you can reach it then your NIC is probably working.
      Second, it will mount a network drive using supplied credentials. The account only needs Read access to the share and it’s contents.
      Third, it will copy another PowerShell script that I’ve titled Controller from the network share to a local directory. It’ll then run that script.
      Last, after Controller.ps1 has finished doing it’s thing we unmount the network drive and restart the computer.

      Controller.ps1 - Stored in the root of the network share you mounted in the last step.
      Note: This is a shortened version. I removed somethings for the purpose of this guide.

      $Model = (Get-WmiObject -Class Win32_ComputerSystem).Model
      Write-Host "Model identified as: " -NoNewline -ForegroundColor DarkYellow
      Write-Host $Model -ForegroundColor Yellow
      
      Write-Host
      
      $file = ""
      switch ($Model) {
          "OptiPlex 7040" { $file = "dell7040.ps1"; break; }
          "Precision 3510" { $file = "dell3510.ps1"; break; }
          "Precision T1700" { $file = "dell1700.ps1"; break; }
          "Precision Tower 7810" { $file = "dell7810.ps1"; break; }
          "HP Compaq Pro 6300 SFF" { $file = "hp6300.ps1"; break; }
          "VirtualBox" { $file = "virtualbox.ps1"; break; }
          default { 
              # There were multiple numbers for these models.
              If ($model -like '*6710b*') { $file = "hp6710.ps1"; }
              ElseIf ($model -like '*6730b*') { $file = "hp6730.ps1"; }
          }
      
      }
      
      $filePath = $RootPath + "Model.ps1"
      Copy-Item -Path "Deploy:\ModelScripts\$file" -Destination $filePath -Force
      Invoke-Expression -Command $filePath
      
      if ((Get-WmiObject -Class Win32_ComputerSystem).Manufacturer -match "Dell") {
          # May do some Dell BIOS settings here.
      }
      
      Write-Host
      Write-Host "Downloading FOG Client from FOGServer." -ForegroundColor Yellow
      $url = "http://<FOGSERVER>/fog/client/download.php?newclient"
      $outfile = "$RootPath + FOGService.msi"
      (New-Object System.Net.WebClient).DownloadFile($url, $outfile)
      
      Write-Host "Installing FOG Client." -ForegroundColor Cyan
      $ArgumentList = "/i $outfile /quiet USETRAY=""0"" WEBADDRESS=""<FOGSERVER>"" WEBROOT=""/fog"" /norestart"
      Start-Process -FilePath MSIEXEC.exe -ArgumentList $ArgumentList -Wait
      
      Write-Host "Creating a scheduled task to start the FOGClient after reboot."
      $TaskPath = "$env:windir\Setup\StartFOG.ps1 "
      Copy-Item -Path "Deploy:\StartFOG.ps1" -Destination $TaskPath
      $Action = New-ScheduledTaskAction -Execute PowerShell.exe -Argument "-Command ""& $TaskPath """
      $Trigger = New-ScheduledTaskTrigger -AtStartup
      Register-ScheduledTask -Action $Action -Trigger $Trigger -TaskName "StartFOG" -User "NT AUTHORITY\SYSTEM" -RunLevel Highest -Force
      
      
      Write-Host "Deleting downloaded driver files."
      Remove-Item -Path $RootPath -Recurse -Force
      

      Here we use a quick WMI query to get the model number of the PC and use a switch to pick the model specific driver installation script. You’ll want to run the query on each machine beforehand to find out exactly how it’s stored.

      The beauty of this is that it’s flexible. You can easily add support for new models as long as the NIC drivers are on the image.

      hp6300.ps1 - Located in Deploy:\ModelScripts\ - You’ll make similiar script for each model. This is a very simple one.

      Write-Host "$Model Driver Installation" -ForegroundColor DarkGreen
      
      $chipset = $RootPath + "chipset.exe"
      $audio = $RootPath + "0008-64bit_Win7_Win8_Win81_Win10_R281\Setup.exe"
      
      Write-Host "Downloading Intel Chipset Drivers."
      Copy-Item -Path "Deploy:\Drivers\chipset\Intel\SetupChipset.exe" -Destination $chipset -Force
      Write-Host "Downloading Realtek HD Audio Drivers."
      Copy-Item -Path "Deploy:\Drivers\audio\Realtek\0008-64bit_Win7_Win8_Win81_Win10_R281\" -Destination $RootPath -Recurse -Force
      
      Write-Host
      Write-Host "Installing Intel Chipset Support Drivers."
      Start-Process -FilePath $chipset -ArgumentList "/s /norestart" -Wait
      Write-Host "Installing Realtek HD Audio Driver."
      Start-Process -FilePath $audio -ArgumentList "/s" -Wait
      
      Start-Sleep 5
      

      Doesn’t really get much simplier than this one. Most drivers Windows 10 already picked up. The process is basically the same for every driver, as long as they are properly signed.

      This should be enough information to get you started, if you want to do it this way. I like doing it this way because it gives me a high level of control over everything. I can specify exactly what version gets installed onto each model. You could even query the serial number of the PC and install device specify software, if you really wanted to get down to that level of detail (FOG snapins would obviously be easier though)

      posted in Tutorials
      AvaryanA
      Avaryan
    • Setup 2nd FOG Server

      The site that I am at is running revision 5837 (pre 1.3.0 release). I would like to setup a second box so that I can test things with the newer versions as they come out.

      This will be on the same network as the other server.

      I had a 1.3.5 server running briefly (Ubuntu 16.04), but I couldn’t get it to do much. DNS is setup to point to the main server, but I could use the advanced menu to manually boot to my test server.

      I was able to register new devices, and they would show up from the browser on the test server, but when I’d boot to FOG it would say it wasn’t registered. Was not able to capture or deploy images to devices from test server.

      What am I doing wrong? Or is it not possible to have 2 servers running?

      posted in General
      AvaryanA
      Avaryan
    • RE: FOG Client Service Not Starting Automatically

      @Wayne-Workman said in FOG Client Service Not Starting Automatically:

      @Avaryan said in FOG Client Service Not Starting Automatically:

      The client reliably updates itself after image deployment when it sees the server has a new version. The new version will then do everything you have set for it; naming, domain joining, snapins, printers.

      Ok, good. I had always wondered about that.

      posted in FOG Problems
      AvaryanA
      Avaryan
    • RE: Use new Client with older server?

      Alright. Thanks for the info.

      Right now I just don’t have the client installed. I have it pull the msi file from the server and install it right at the end of SetupComplete.

      posted in General
      AvaryanA
      Avaryan
    • Use new Client with older server?

      The site that I’m at is still using FOG version 8424, SVN Revision 5837. That comes with FOG Client 0.11.2.

      I’m in the process of building a Windows 10 image and would like to use the newest client. The site will update FOG during the summer, but I’m building it now.

      So the question is:
      Will FOGClient 0.11.11 work with FOGServer 8424?

      posted in General
      AvaryanA
      Avaryan
    • RE: Admin profile name after sysprep

      Did not mean to insinuate that it was the fault of the FOG client, as I’ve seen it before even when not using FOG.

      Do you know of a way to have it use the original Administrator user folder and not create a new one?

      For reference:
      When creating the image I’m hitting Ctrl + Shift + F3 to boot to Audit mode during the Windows install.

      During the Specialize phase of sysprep with the Microsoft Windows Deployment component I’m creating a synchronous command to activate the admin account.
      net user administrator /active:yes

      During the OOBE phase I set the password as well as auto logon details.

      This is really a minor issue, but there have been times where it would have been helpful to be able to deploy files straight to the admin desktop; which would be difficult if the directory name isn’t always the same.

      posted in Windows Problems
      AvaryanA
      Avaryan
    • RE: FOG Client Service Not Starting Automatically

      I’ve just observed the same issue with client 0.11.2 on Windows 10 (no issues on Windows 7). The only difference is I don’t have the client installed on the image. Using the msi file and installing post deployment. Reason: cause we’re still on a old version and I don’t want to reupload the image when we update FOG.

      Anyway… From my SetupComplete.cmd file I launch a SetupComplete.ps1 file. After installing the client from here I just created a scheduled task to start the service (Start-Service -Name FOGService) at startup.

      posted in FOG Problems
      AvaryanA
      Avaryan
    • RE: Post Sysprep Driver Install

      I’m also in an educational environment deploying one image to 20+ models. I’m not using the FOG postinstall script.

      I use the SetupComplete.cmd file to launch my SetupComplete.ps1 file, stored in the same location. From here I mount a network drive a launch another script that uses WMI to determine the model. Once I have the model determined I use that to copy another powershell script to the local hdd and run it. This script copies and installs all the drivers.

      The important thing, if you go this way, is to add all your NIC drivers for every model into the image using PnPUtil. They don’t need to be installed, just added to the DriverStore.

      So far I’ve found doing it this way to be very flexible as I can modify or add things as needed without having to edit the image or answer file.

      posted in General
      AvaryanA
      Avaryan
    • Admin profile name after sysprep
      Server
      • FOG Version: SVN Revision: 5837 (Yes, we need to update)
      • OS: Ubuntu
      Client
      • Service Version: 0.11.2
      • OS: Windows 7 & Windows 10
      Description

      This isn’t really a FOG issue, as I’ve seen it before with Ghost. Figured someone here would likely know the answer.

      Sometimes, not always, after a PC is finished with sysprep I’ll check in the Users directory and the local Administrator profile will be Administrator.<Computer Name> or Administrator.<Computer Name before FOG renamed it>.

      Observed happening on Windows 7 and Windows 10.

      I’m thinking it has something to do with the Admin profile being logged in automatically while the FOG client is renaming the machine.

      posted in Windows Problems
      AvaryanA
      Avaryan
    • RE: FOG 1.3.0 Officially Released

      Awesome. Will check it out as soon as I can convince my site to update.

      posted in Announcements
      AvaryanA
      Avaryan
    • RE: Setting up Win10 DriverStore

      Using Microsoft Deployment Toolkit right now to scan my extracted driver installers. Seems like it’s organizing it all for me.

      posted in Windows Problems
      AvaryanA
      Avaryan
    • 1 / 1