Please enable JavaScript to view this site.

LinMin Snapshot Manager™ 2022 User Guide

Nav: Using LinMin Snapshot Manager > Scripts

LSM Example Script: Windows sysprep

Scroll Prev Top Next More

LSM provides an example Windows Script illustrating how to place files on a Windows Machine.

 

In this example:

/home/LinMin/service/serviceScripts/ram_os_Scripts/LSM_WindowsSysprepGeneralize_OnReboot.sh

 

Upon execution of the example Windows Script on the RAM Agent, a Windows Script LSMsysprep.cmd gets placed in 2 locations on the Windows file system:

%WINDIR%\Users\Administrator\LSMsysprep.cmd

%WINDIR%\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\LSMsysprep.cmd

 

Upon reboot and login, the sysprep command gets automatically executed with the parameters:

sysprep.exe /generalize /generalize /reboot /oobe

 

 

 

Select example Script as a Payload stage:

 

Payload Manage Stages > Select Script > LSM RAM Agent deploys Windows Script to invoke sysprep to generalize the OS on reboot > Commit

 

 

Copy the example Script then edit and register/update it

 

Copy the file to:

/home/LinMin/service/serviceScripts/User_source_ram_os_Scripts/My-Windows-Example-Script.sh

 

Edit the file, then register the Script so it can be used as a Payload stage:

 

Scripts > Source User RAM Agent Scripts to Register or Replace > [Register] My-Windows-Example-Script.sh > Commit

 

If you further modify the file, you need to replace the previously-registered Script, after making sure that it is Not In Use:

 

Scripts > Source User RAM Agent Scripts to Register or Replace > [Replace] My-Windows-Example-Script.sh > Commit

 

 

 

 

 

 

Search keyword(s): user_scripts

 

 

 

 

 

© 2007-2022 Laurent Gharda DBA LinMin. All Rights Reserved. User Guide last updated: Thursday, March 17, 2022, at 02:39 PM