The obvious suspect on lines 2 & 3 is .\bi. I don't see any reference in the existing batch file to creating such a subdirectory. Where is the .\bi coming from, exactly? Unless the subdirectory \bi already exists in the directory you're running the batch file from, you'll have problems.
Neither lines 1 or 4 would have problems if you're in the incorrect place - it's just removing a directory it created. For example:
Your installer creates C:\mymod\bi
Your batch file runs, but runs from C:\
first line makes C:\ci
second line looks for c:\bi which doesn't exist, so you get invalid path.
third line looks for c:\bi\ci, which also doesn't exist, and you get an error.
fourth line removes C:\ci, which does exist via line one.
Let me guess - your installer creates the \bi subfolder, and you want to create \ci via the batch, not as a subfolder of \bi\, but as a sibling to it. But since your installer puts the batch file in that \bi directory, it's being run from that folder, so
first line: makes a subdirectory in current directory named ci. You're IN bi, so you make bi\ci
second line looks for \bi\bi, which doesn't exist
third line looks for \bi\bi\ci, which also doesn't exist.
fourth line removes bi\ci
Solution: Insert a new line before all others: cd..
Alternative solution: Move the batch file so it's in the same directory as the bi subfolder, instead of being inside the bi subfolder.
that will move you one step up the directory tree, so you'll be where you should be.
Thing to remember here is the . refers to the current directory, which will be wherever your batch file is run from.
Bookmarks