Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


raf1231

Help with BAT/CMD + File-Directories Add-On

Recommended Posts

:hello:

I'm trying to create an Add-On that will copy a file-folder & files to a specific location on the system drive. I've provided a brief example of what I'm trying to do.

1. First is a directory tree of the file-folder & files I want to copy. The folder names are in upper-case & are preceded by an asterisk. The file names are in lower-case & are preceded by a #-sign.

2. Second is a sample of the CMD/BAT file which I converted into an EXE file using BAT-to-EXE-Converter.

I created an 'svcpack' folder that contains the 'START_MENU_SHORTCUTS' directory & files plus the 'FILES-TO-COPY.EXE' command. My 'entries.ini' file contains:

[EditFile]

I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram

[AddProgram]

FILES-TO-COPY.exe

I used 'AlphaZIP' to create a CAB file taking in both "svcpack" & "entries.ini". For some reason, this causes the XP Pro Set-Up process to run through set-up, Windows start-up (file copying) & quit with a message stating 'there is a problem with set-up & to contact your administrator' just before the point where the PC is suppose to re-boot to bring up XP for the first time.

What's the correct way to turn this into an Add-On file for my XP PRO Slipstream CD?

Please keep in mind, this is just a simple example; my end product will be much more involved and considerably larger. Thanks in advance for your time & assistance.

======================================================

FILE-FOLDER & FILES TO BE COPIED TO C:\Documents and Settings\All Users\Start Menu\Programs

-------------------------------------------------------------------------------------

* START_MENU_SHORTCUTS

* DRIVER-UPDATES

* DRIVERGUIDE-TOOLKIT

# driverguide-toolkit-home-page.lnk

# driverguide-toolkit.lnk

* FTP-FILESHARE-&-P2P

# free-rapid-downloader.lnk

* MSG-&-CDs

# msg-&-cds--common-ctop-messages.lnk

# msg-&-cds--device-manager-error-codes.lnk

# msg-&-cds--security-event-messages.lnk

* SECURITY-&-CLEANERS

* AVG-ANTI-VIRUS

# avg-free-user-interface.lnk

# avg-kill.lnk

# avg-start.lnk

# uninstall-avg-free.lnk

* CCLEANER

# ccleaner-homepage.url

# ccleaner.lnk

# uninstall-ccleaner.lnk

* MS-MRT-PGM

# downloaded-ms-mrt-pgm.lnk

# ms-mrt-web-site.url

* SYSTEM-INFO

# belarc-advisor.lnk

# win-sys-info.lnk

======================================================

FILES-TO-COPY.CMD

-------------------------------------------------------------------------------------

set PrimDrive=%SystemDrive%

xcopy "START_MENU_SHORTCUTS"

"%PrimDrive%\Documents and Settings\All Users\Start Menu\Programs" /E /C /R /I

======================================================

Share this post


Link to post
Share on other sites

Welcome @ MSFN-Forums!

Sorry about my re-question, but why don`t you use $OEM$-Method for that?

It would be quiet easier to build the structure and links.

Share this post


Link to post
Share on other sites

:thumbup

Don't mind the re-question since it offers another thought on how to accomplish my tasks.

The answer to your question is: As I've looked over the forum, I've seem $OEM$ mentioned in different places but I didn't really understand what it was about. I did a quick search this morning & located one post - seems it has to do with the 'RunOnce' tab in nlite where the code will be run after the XP install at the beginning of the first logon. After thinking about things last night, the stuff I want to do really needs to be done AFTER the XP install. So, this is probably the way I should go.

I'll research the forum more this evening when I have more time. It would be of help if you could possibly direct me to some other post addressing the $OEM$-Method.

Thanks for the quick response. :hello:

Share this post


Link to post
Share on other sites

A little overview of $OEM$: http://unattended.msfn.org/unattended.xp/view/web/18/

Not explained is how to copy a shortcut to startmenu, so here we go.

First of all you might use this pre-prepared $OEM$-structure: http://www.german-winlite.de/wbb/index.php...D=6982#post6982

Don`t mind the thread is german - the structure of the folders is the same.

Only use it as an example.

"$OEM$\$DOCS\Default User" is the basic folder for every new user who logs on.

To put files or links there means every new user gets this in his own "Documents & Settings".

The folderstructure in $OEM$ is like that in "Documents & Settings", so if we put "MyProg.lnk"

into folder "$OEM$\$DOCS\Default User\Startmenu\MyOwnFolder" it will exist in Startmenu

for every User.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...