• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Lee Rowlett
    3. Posts
    • Profile
    • Following 19
    • Followers 7
    • Topics 17
    • Posts 276
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Utilizing Postscripts (Rename, JoinDomain, Drivers, Snapins)

      your fog.postdownload is missing: #!/bin/sh

      also you’ve changed path in fog.drivers to /images (sensible option using existing fileshare!)

      but your fog.postdownload is still trying to mount /fog so you can hash out/remove that, i can’t remember without checking but /images is still mounted so don’t even need “remount” it.

      posted in Tutorials
      Lee RowlettL
      Lee Rowlett
    • RE: Utilizing Postscripts (Rename, JoinDomain, Drivers, Snapins)

      fog.postdownload is triggered/executed by fog.download after the pc has pulled down the image

      posted in Tutorials
      Lee RowlettL
      Lee Rowlett
    • RE: Postdownloadscript help

      looks like /fog it not mountable - have you added /fog to exports?

      1 edit: /etc/exports
      2. add this line: /fog *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure,fsid=4)
      3. save file
      4. run: exportfs -a

      other thing to note: make sure fsid=4 is correct, as long as you haven’t modified the exports it should be but if not just make sure it’s the next unique number

      also if you’re going to use /fog directory you will need to manually add this into exports everytime you upgrade as fog overwrites exports (removing this line in the process)

      posted in Windows Problems
      Lee RowlettL
      Lee Rowlett
    • RE: Tiny bit of help with iPXE menu look

      look at BootMenu.class.php - in and around line 1010 which is where it “builds” the menu… have a play around, see what works and luckily it’s all hookable, so you can amend it and won’t be reverted on upgrade (due to the fact hooks get copied during install!)

      here’s my hook doing something similar if it helps you in the right direction 🙂

      [CODE]<?php
      class BrandBootMenu extends Hook
      {
      var $name = ‘BrandBootMenu’;
      var $description = ‘customize boot menu items.’;
      var $author = ‘Lee Rowlett’;
      var $active = true;
      public function tweakmenu($arguments)
      {
      if ($arguments[‘ipxe’][‘head’])
      {
      $arguments[‘ipxe’][‘head’][7] = ‘colour --rgb 0x036802 2’;
      $arguments[‘ipxe’][‘head’][14] = preg_replace(‘#right 80#’,‘right 80 --top 80’,$arguments[‘ipxe’][‘head’][14]);
      }
      }
      }
      $BrandBootMenu = new BrandBootMenu();
      // Hook Event
      $HookManager->register(‘IPXE_EDIT’, array($BrandBootMenu, ‘tweakmenu’));[/CODE]

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Image across WAN links

      This is the one thing that is lacking for the Location Plugin - although, the concept is very simple and i think the reason a lot of people find it difficult is they over think the process + it’s a lot easier to understand in a “real life” setup. it must be simple - i created it! lol

      basics to understand Create Location -> Assign storage node to that location -> Assign host to that same location = Host Download image from that storage node determined by location…

      although it’s a lot more versatile than that now and even better with Tom’s additions and rewrite to add it as the now known plugin! Location Patch got Tom’d 🙂

      posted in FOG Problems
      Lee RowlettL
      Lee Rowlett
    • RE: Postdownloadscript help
      • [FONT=Consolas]&>/dev/null does not create log it stops it from supressing prints i.e. error messages/warnings.

      most likely educated guess link directory… i would change all [/FONT][FONT=Consolas]/fog/Drivers paths direct in script to [/FONT]/partages/Drivers (or wherever you have your drivers directory)

      also it’s case sensitive with model name (i never added any handling for directories) so best thing to do to rule that out is copy Model Name from FOG-> Hardware inventory

      and when i said manually i meant remove disable postscripts … On fog do… basic tasks-> advanced ->download deploy let it image and before it boots (when postscripts normally runs) press ctrl +C to go to command/terminal then do each line individually

      [FONT=Consolas]mkdir /ntfs &>/dev/null[/FONT]
      [FONT=Consolas]ntfs-3g -o force,rw $part /ntfs[/FONT]

      [FONT=Consolas]if it fails see what $part echo’s at (echo $part;)[/FONT]

      posted in Windows Problems
      Lee RowlettL
      Lee Rowlett
    • RE: Postdownloadscript help

      reason you don’t see any error logs is - [FONT=Consolas]&>/dev/null remove this temporarily from the end of the lines, you are best to do a download debug so you can see each step, if it does fail do the process manually[/FONT]

      posted in Windows Problems
      Lee RowlettL
      Lee Rowlett
    • RE: Install drivers after deployment

      [url]http://www.fogproject.org/forum/threads/utilizing-postscripts-rename-joindomain-drivers-snapins.12175/#post-40351[/url]

      posted in Windows Problems
      Lee RowlettL
      Lee Rowlett
    • RE: Automatic hardware detection & driver installs in FOG

      #!/bin/sh

      ceol=tput el;
      machine=dmidecode -s system-product-name;
      machine=“${machine%”${machine##[![:space:]]}“}” #Removes Trailing Space
      if [ $osid == “5” ]; then
      osn=“Win7”
      elif [ $osid == “6” ]; then
      osn=“Win8”
      elif [ $osid == “7” ]; then
      osn=“Win8.1”
      fi
      dots “Downloading Drivers”;
      mkdir /ntfs/Windows/DRV &>/dev/null;
      echo -n “In Progress”;
      cabextract -d /ntfs/Windows/DRV “/fog/Drivers/$osn/${machine}”/
      .CAB &>/dev/null;
      echo -e “\b\b\b\b\b\b\b\b\b\b\b${ceol}Done”;
      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

      code above will do what you want - change the paths to match your environment or wherever you want to store the cabs but using code example above. you’d put a copy of the cab into /fog/Drivers/Win7/OptiPlex 7010 for example then it will extract the cab and drivers will be installed during sysprep… shouldn’t need any postscripts

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Automatic hardware detection & driver installs in FOG

      init contains cabextract so you don’t even need to extract the cabs if you want to go down the model route

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Limiting program instances or processes, Unrealted to FOG, but still imaging Related

      [quote=“Wolfbane8653, post: 41570, member: 3362”]don’t forget that those students can always right click and “open file location” for shortcuts

      [url]http://www.sevenforums.com/tutorials/236988-open-file-location-add-remove-context-menu.html[/url][/quote]

      don’t do it as a shortcut… have it as an .exe within an .exe 😄 so .exe on desktop extract the .exe into chrome folder and executes it, waits for it to finish and then deletes.

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Limiting program instances or processes, Unrealted to FOG, but still imaging Related

      even more robust use FileInstall… that way you don’t have to have it anywhere on the machine, won’t be there unless executed so will give less chance of users finding it ;-)… also means they cannot delete it ;-).

      it will embed into the .exe and will extract when executed and once you’re done just delete so… it also means you don’t rely on the file being in a certain location (so if deleted, don’t matter just put it back next time it runs :-D). only few limitations - is you have to make sure you’re .exe source is in the location you specify when compiling and the source cannot contain variables and if it’s a “large” file you’re embedding it’s slugish/freezes part from that all good! 😄

      change First Filemove to:

      FileInstall([FONT=Consolas]“C:\Temp\MyScript\asdfghjkl.exe”, @ProgramFilesDir & “\Google\Chrome\Application\asdfghjkl.exe”, 1)[/FONT]

      2nd Filemove to:

      FileDelete([FONT=Consolas]@ProgramFilesDir & “\Google\Chrome\Application\asdfghjkl.exe”)[/FONT]

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Limiting program instances or processes, Unrealted to FOG, but still imaging Related

      …But like junkhacker said - this probably won’t work or you might run into trouble for chrome as there is more than one process for a single instance and if chrome doesn’t close successfully you’d have to physically kill it for you to be able to run this code again? you could get it ask user if they want to close previous instance if it exists to give you complete control?

      if so, look at InputBox function

      one last thing - if you’re just starting out with autoit install [SIZE=13px][FONT=Open Sans][COLOR=#1c1c1c]SciTE … Syntaxcheck prod and tidy autoit source will help a bundle 😄 (Tools->SyntaxCheckProd or Tools->Tidy Autoit Source)[/COLOR][/FONT][/SIZE]

      [url]https://www.autoitscript.com/site/autoit-script-editor/downloads/[/url]

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Limiting program instances or processes, Unrealted to FOG, but still imaging Related

      Sorry if it sounds like i’m preaching/patronising, dont mean to - just want to give a lil’ help where i can 🙂

      You could remove the Sleep(30) as every scenario your exiting so sleep not needed, also While 1 WEnd basic overview means to loop the code in between.
      i.e.
      [SIZE=13px][COLOR=#000000][FONT=Courier New][URL=‘https://www.autoitscript.com/autoit3/docs/keywords/While.htm’][COLOR=#03697a][COLOR=blue]While[/COLOR][/COLOR][/URL][COLOR=#2a2a2a]$i[/COLOR][URL='https://www.autoitscript.com/autoit3/docs/intro/lang_operators.htm’][COLOR=#03697a][COLOR=#ff8000]<=[/COLOR][/COLOR][/URL][COLOR=blue]10[/COLOR][/FONT][/COLOR][/SIZE]
      [COLOR=#000000][SIZE=13px][FONT=Courier New][URL=‘https://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm’][COLOR=#03697a][COLOR=#000090]MsgBox[/COLOR][/COLOR][/URL][COLOR=#ff8000]([/COLOR][COLOR=#2a2a2a]$MB_SYSTEMMODAL[/COLOR][COLOR=#ff8000],[/COLOR][COLOR=red]“”[/COLOR][COLOR=#ff8000],[/COLOR][COLOR=red]"Value of $i is: "[/COLOR][COLOR=#ff8000]&[/COLOR][COLOR=#2a2a2a]$i[/COLOR][COLOR=#ff8000])[/COLOR][/FONT][/SIZE][/COLOR]
      [COLOR=#000000][SIZE=13px][FONT=Courier New][COLOR=#2a2a2a]$i[/COLOR][URL=‘https://www.autoitscript.com/autoit3/docs/intro/lang_operators.htm’][COLOR=#03697a][COLOR=#ff8000]=[/COLOR][/COLOR][/URL][COLOR=#2a2a2a]$i[/COLOR][URL='https://www.autoitscript.com/autoit3/docs/intro/lang_operators.htm’][COLOR=#03697a][COLOR=#ff8000]+[/COLOR][/COLOR][/URL][COLOR=blue]1[/COLOR][/FONT][/SIZE][/COLOR]
      [COLOR=#000000][SIZE=13px][FONT=Courier New][COLOR=blue][URL=‘https://www.autoitscript.com/autoit3/docs/keywords/While.htm’][COLOR=#03697a]WEnd[/COLOR][/URL][/COLOR][/FONT][/SIZE][/COLOR]

      so increase $i until it reaches 10. your code only runs through once so remove While 1 WEnd.
      you don’t really need if not @error then exit statement as it will exit anyway.
      other thing you don’t need to tell autoit to exit, only time you really need to tell it to exit is when there’s further code or what you want to achieve is “complete” so you’re telling it “stop here” autoit just “executes” code from top to bottom regardless so if there’s no further code or the statements below will not be matched then exit not needed.
      also i prefer to use positive (if) rather than false positive (if not) as sometimes can give mixed results so i’d change your code to:

      [CODE]#NoTrayIcon
      #include <Misc.au3>
      #include <MsgBoxConstants.au3>

      If ProcessExists(“chrome.exe”) Then
      MsgBox(64, “Warning”, “Only one instance is allowed”)
      Else
      ShellExecuteWait(@ProgramFilesDir & “\Google\Chrome\Application\chrome.exe”)
      EndIf[/CODE]

      should get same results.
      p.s. i hadn’t actually ever tried the _Singleton funcion… glad to know it DOESNT work lol!

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Limiting program instances or processes, Unrealted to FOG, but still imaging Related

      RunErrorsFatal is obselete and has been for sometime - might aswell remove it 🙂 but part from that, first glance, all looks good to me…

      [SIZE=5][B][FONT=Segoe UI][COLOR=#db7100]16th May, 2008 - v3.2.12.0[/COLOR][/FONT][/B][/SIZE]

      [SIZE=13px][FONT=Segoe UI][COLOR=#000000][B]AutoIt:[/B][/COLOR][/FONT][/SIZE]
      [LIST]
      [*]The option [URL=‘https://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm’][COLOR=#03697a]RunErrorsFatal[/COLOR][/URL] has been removed. [URL=‘https://www.autoitscript.com/autoit3/docs/functions/Run.htm’][COLOR=#03697a]Run()[/COLOR][/URL], [URL=‘https://www.autoitscript.com/autoit3/docs/functions/RunWait.htm’][COLOR=#03697a]RunWait()[/COLOR][/URL], [URL=‘https://www.autoitscript.com/autoit3/docs/functions/ShellExecute.htm’][COLOR=#03697a]ShellExecute()[/COLOR][/URL] and [URL=‘https://www.autoitscript.com/autoit3/docs/functions/ShellExecuteWait.htm’][COLOR=#03697a]ShellExecuteWait()[/COLOR][/URL] now all set @error when they fail to run the application. AutoIt will no longer throw a fatal error when an application fails to run.
      [/LIST]

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Limiting program instances or processes, Unrealted to FOG, but still imaging Related

      tried autoit? different ways u cud do it… execute chrome within autoit.exe or have autoit watch in the background if process number over set limit, close last process and could do message prompt… all sorts, limit is endless.

      simple approach would be:

      #NoTrayIcon
      #include <Misc.au3>
      #include <MsgBoxConstants.au3>

      If _Singleton(“chrome”, 1) = 0 Then
      MsgBox(64, “Warning”, “Only one instance is allowed”)
      Else
      ShellExecute(@ProgramFilesDir & “\Google\Chrome\Application\chrome.exe”)
      EndIf

      compile that to .exe (even give it a relevant icon if u want even call it chrome etc)

      only downside is, u would need to remove all chrome shortcuts and make sure they run this instead. the other option as i say wud to have an .exe run at startup doing the same thing but on trigger events or loop so:

      While 1
      Do
      sleep (500)
      Until ProcessExist(“chrome.exe”) = 1

      Do stuff, close, msg prompt etc etc etc

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Hardware Independant Image

      no need to bloat your image with drivers

      model way (just look at driver stuff):
      [url]http://fogproject.org/forum/threads/utilizing-postscripts-rename-joindomain-drivers-snapins.12175/[/url]

      or Hardware ID way (also has a wiki page posted):
      [url]http://fogproject.org/forum/threads/automatic-hardware-detection-driver-installs-in-fog.11933/[/url]

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Laundry List of Issues

      put it this way, we have 2500 Devices, 23 different models (yes 23!! don’t ask, serious just don’t ask!) 18 sites “large” sites across the stretch of the country (UK) and we can rebuild a machine (with all the software, bells, whistles you name it + more) in under 15 minutes, regardless of what site and it only takes a minute of an engineers time to do (less if device is registered)
      just kick it off and check webgui in 15 mins or so.

      we only have 3 images to maintain (i use the methodology of, if it doesn’t update often or complex to configure (and is needed across the entire estate) or it takes a long time to install - add to image, otherwise do it in the snapin, so all we have on our base image is office and latest win updates of course.)
      anyway so:
      1 image for Win7 x86
      1 image for Win7 x64
      1 image for Win8.1 x64

      we have 1 snapin script to maintain that covers 15 variations of builds (script is 1.5MB)
      and a driver directory on server to maintain

      New model comes in:
      process is, create new folder in driver directory on server, add drivers to new folder (.inf) job done new model supported 🙂

      New software version released (been tested, ready/happy to use)
      process is, overwrite old software installer on server with new (amend script slightly if needed) - job done

      so yes, used right and setup right, FOG can be pretty damn powerful and low maintainance one thing you’ll always have with FOG which you won’t with most retail products. full control and full potential… there’s nothing FOG can’t do, only restriction is your/the community/us developers technical abilities and knowledge

      hope that helps your case study to sell FOG to your manager, i know all about having to convince management of FOG. 🙂 🙂
      now they love it that it’s saving them 1000’s upon 1000’s of £’s a year and same goes for engineer time/resources, travelling cost (no more need to travel to sites!)

      posted in FOG Problems
      Lee RowlettL
      Lee Rowlett
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 13
    • 14
    • 5 / 14