Custom Post-Imaging Actions (PSImage)
PSImage is not supported by FileWave SupportSupport, so pleasesupport dotickets should not submitbe ticketsopened with them aboutfor it. The information provided here is for educational purposes only. IfFor youpaid would like to purchase professional services hours for consulting assistancehelp setting up PSImage or customizing it pleasePSImage, contact professional.services@filewave.com. with your request. If you have existingExisting unused professionalProfessional servicesServices hours youmay mayalso be able to use themusable for this purpose.work. Any feedbackFeedback on PSImage can also be sentgo to the same email address. Any workWork on thisPSImage wouldhappens bethrough done on Discord or in working with Professional Services.Services. For the official Windows Imaging solution pleasesolution, see Network Imaging / IVS.IVS.
PSimagePSImage includes a mechanism for you to add post-imaging actions tofor the imaging workflow. These are executed by theThe to_do.bat file in the scripts folder of the psimage share andruns runthose actions with admin privileges under the context of the temporary local fwadmin account. ThisFileWave deletes that account is deleted at the end of the post-imaging phase. CustomYou can add custom post-imaging actions arein enabledtwo via 2 mechanisms:ways:
- The contents of the extra folder in the psimage share is copied to c:\windows\temp\psimage. Place any files/folders here that you want to be copied to the reimaged PC and run during the post-imaging phase. The c:\windows\temp\psimage folder will be deleted automatically from the reimaged PC at the end of the post-imaging phase.
- Use the to_do.bat file in the scripts folder of the psimage share to trigger any built-in Windows utilities or executables/installers that have been copied to c:\windows\temp\psimage. Note that the post-imaging phase does not have access to the
thepsimage share but only to the files copied to c:\windows\temp\psimage. If there are any commands that must be run or apps that must be installed immediatelyASAPafter reimaging, add them to the extra folder and trigger them via to_do.bat as necessary.
Please take note ofFollow the tips outlined in the sample to_do.bat forwhen how to triggerlaunching apps. There is a reboot at the end of theThe post-imaging phase reboots at the end, so be sure to launch executables withuse "start /wait", particularlyespecially for installers, soto that themake to_do.bat waits for them to finishwait before moving on to the next item in the script.command. Otherwise the system mightmay reboot prematurely before yourthe executable/installer has had a chance to finish running.finishes. If you need to deploy files to the hard disk of the reimaged PC, either include them in the disk image or copy them from c:\windows\temp\psimage,psimage. but doDo not move them as explained inthem; the sample to_do.bat file.explains why.
REM Copy files from psimage folder to their intended locations instead of moving them so they inherit security
REM permission from the existing parent folder. Otherwise the owner will be system account and no users will be able to
REM access the files.
REM
REM If adding registry settings with reg add with a value that includes spaces and double quotes in it, add
REM outer quotes (to maintain the spaces) and backslash escape the inner quotes to maintain them in the registry
REM value.
REM reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v bginfo /t REG_SZ /d "\"C:\Program Files\bginfo\Bginfo64.exe\" \"C:\Program Files\bginfo\config.bgi\" /timer:0 /silent /nolicprompt"
REM
REM If launching an executable use start /wait so the script waits for your binary to finish before rebooting.
REM If the commandline includes spaces use start /wait "" <your_command_line>.
REM start /wait "" "c:\windows\temp\psimage\Firefox Setup 88.0.1.exe" /S
REM
REM For logging redirect the output for your commands with >> c:\windows\temp\psimage.log
REM start /wait "" "c:\windows\temp\psimage\Firefox Setup 88.0.1.exe" /S >> c:\windows\temp\psimage.log
REM
REM To redirect both stderr and stdout for your commands use >> c:\windows\temp\psimage.log 2>&1
REM start /wait "" "c:\windows\temp\psimage\Firefox Setup 88.0.1.exe" /S >> c:\windows\temp\psimage.log 2>&1
REM
REM ========ENTER YOUR POST-IMAGING COMMANDS BELOW========
echo Running to_do.bat >> c:\windows\temp\psimage.log