Command to copy a file to machine?

AGNET

New Member
Is there a way to include a file in the install folder and run a command during post-setup to copy it to a specific place on the C drive, such as the program files folder or the windows folder? I created a folder in the unpacked .iso folder for the installer disk that holds all the installers for the software that will install during the post-setup step but I'd also like to copy files and documents to certain areas on the C drive to be available for the end user or to replace certain files in the program files folder (the master-preferences files for chrome, for one...) Is that possible or no?
 
post-setup
option Command in icon Add from toolbar
copy
in params:
/Y pathfilesource pathfiledestination
 
What would be the pathfilesource? Can I assume by the time the ISO is created that it will be D:?
 
drop your files here:
sources\$oem$\$$\Setup\scripts

...and add the commands in NTLITE with only the file name to execute or "copy filename.ext" without quotes.

the destination could be:
%programfiles% C:\program files for x64 in x64 environment
%programdata% C:\program data folder
%SystemDrive% C:\
%windir% C:\Windows folder

For long names as "start menu", use quotes at the start and the end of the destination path, if you plan to move a file from one place to another in your drive, use quotes for the source path too if it has long file names.
 
Do I need the drive name after the environment variable? or are you just providing both examples?
 
Would this example work? /Y copy master_preferences %programfiles(x86)%\Google\Chrome\Application
 
command:
copy
parameter:
/y master_preferences %programfiles(x86)%\Google\Chrome\Application

You don't need to add the drive letter.
 
@AGNET, Btw you can also copy it directly to the image file structure under the mount directory and deploy with Windows without scripts. See here for more info.

@Kasual, don't forget the quotes, as %programfiles(x86)% has a space in it.
"%programfiles(x86)%\Google\Chrome\Application"
 
you can use SetupComplete.cmd or OOBE.cmd to copy files using xcopy command. these 2 cmd files should be inside setup/scripts folder. oobe.cmd will launch before setupcomplete. you can pick one ...

you can create oem folder yourself.. they are not there by default.
oem folder can have subfolders. $$ and $1.

$1 folder will put everything inside c:// (maybe you need to put at main c drive. quick solution)
$$ folder will put everything inside c://Windows

should be like this
maindirectoryOFiso\$OEM$\$$\Setup

...$OEM$\$$\Setup\Scripts AND ...$OEM$\$$\Setup\Files

there can be 2 paths like this. and you can put your xcopy command inside setupcomplete.cmd or oobe.cmd which is inside scripts folder.. and command will be like this

xcopy c:\\Windows\Setup\Files\thefilethatyouwanttocopy thelocationyouwant

you don't need to put any command inside ntlite. setupcomplete.cmd and oobe.cmd will deploy automatically.
 
Last edited:
Back
Top