Jump to content

using nlite's run once command to copy a folder using a batchfile?


KapnJackSparrow

Recommended Posts

how do I use nlite's run once command to copy a folder using a batch file?

basically I have a batch-file and a bunch of folders included on the disk, the batch-file uses a relative address and is normally able to copy the folders just fine however when I use the run once command in nlite it cannot find the folders, why is this? the command I used in nlite is as follows

%SOURCE%\MksTweaks\HD_Icons.reg

%SOURCE%\MksTweaks\Copy_Folders.bat

PAUSE

again it loads the batch-file the batch-file cannot find the folders that should be in the same directory. it also doesn't seem to load the .reg file but that's not too much of a problem if I get the batch-file working.

Copy_Folders.txt

Link to comment
Share on other sites


it's possible, but I don't think that's the problem.

it sounds more like the batch file is unable to find the source files, rather than the being unable to find the destination. if the batch-file starts in a different folder than it will no longer be near the source and thus will not be able to find them.

the problem is that the driver letters change and are unknown before hand... I can try replacing it with static destination and see if that fixes the problem.

if that doesn't work I can try giving it a static source like the C drive and keep the %HOMEDRIVE% see if that fixes the problem.

Edit:

The %HOMEDRIVE% is 100% not the problem. that works just fine.

For some reason the batch-file is being loaded from somewhere other than under %SOURCE%\MksTweaks\ and therefore using the ./ relative path for the source folders doesn't work because the batch-file and the folders being copied are not in the same directory.

a partial fix for this is going through an alternate operating system and copying the folders to a known absolute path such as C:/ or D:/ before beginning the installation process and then changing the batch-file to copy the folders from there. However I would very much like to keep all dependent files on the on the installation disk as I will not always have this option and I would really like to figure out how to make the path relative since I want to make this installation portable the machines that will have different drive letter assignments..

also my .reg files are not being Merged into the registry which is strange because they are in the same place as the batch-file which nlite is clearly able to find...

any idea's on how I can fix these issues?

post-359142-0-62281800-1353532913_thumb.

Edited by KapnJackSparrow
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...