Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

last commands in main batch dont work

Featured Replies

I have 2 batch file..

first_boot.cmd

CLS
@echo off
ECHO.
ECHO Removing Wallpapers and Screensavers...
DEL "%systemroot%\*.bmp"
DEL "%systemroot%\Web\Wallpaper\*.jpg"
DEL "%systemroot%\system32\dllcache\*.scr"
DEL "%systemroot%\system32\*.scr"

ECHO.
ECHO Removing useless shortcuts...
DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Update.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk"

ECHO.
ECHO Applying Registry Tweaks...
REGEDIT /S %systemdrive%\install\RegTweaks.reg

ECHO.
ECHO Copying patched UXTheme.dll...
REN %systemroot%\System32\uxtheme.dll uxtheme.old
COPY "%systemdrive%\Install\uxtheme\uxtheme.dll" "%systemroot%\System32\"

ECHO.
ECHO Copying PSKill.exe...
COPY "%systemdrive%\Install\Tools\pskill.exe" "%systemroot%"

CLS
@ECHO OFF
ECHO.
ECHO Ejecting CD-ROM Drives...
ECHO If you are using a cd rom please remove it from
ECHO the cdrom drive and If you have a second cd place
ECHO it in the drive at this time please.
ECHO.
ECHO If you are using a dvd please remove it
ECHO at this time.
ECHO.
ECHO Wait till the cdrom/dvd drive quits blinking
ECHO and then ...
start cscript %systemdrive%\install\Tools\cd_eject.vbs >null
PSKill cscript.exe >null
ECHO.
PAUSE

IF EXIST %systemdrive%\install\applications.cmd GOTO APPS
SET CDROM2=
IF EXIST D:\install\applications.cmd SET CDROM2=D:
IF EXIST E:\install\applications.cmd SET CDROM2=E:
IF EXIST F:\install\applications.cmd SET CDROM2=F:
IF EXIST G:\install\applications.cmd SET CDROM2=G:
IF EXIST H:\install\applications.cmd SET CDROM2=H:
IF EXIST I:\install\applications.cmd SET CDROM2=I:
IF EXIST J:\install\applications.cmd SET CDROM2=J:
IF EXIST K:\install\applications.cmd SET CDROM2=K:

IF NOT EXIST %CDROM2%\install\applications.cmd GOTO APPS

:APPS
ECHO Running Applications Batch ...
ECHO.
start /wait %CDROM2%\install\applications.cmd

ECHO Moving programs shortcuts ...
ECHO.
MOVE /y "%systemdrive%\Documents and Settings\All Users\Desktop\*.lnk" "%systemdrive%\Documents and Settings\All Users\Desktop\Programs\"

ECHO.
ECHO Deleting Temp Installation Files...
RD /S /Q %systemdrive%\Install
RD /S /Q %systemdrive%\Drivers

ECHO.
ECHO Restarting the PC in 1 minute...
shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"

EXIT

and applications.cmd (Second CD)

CLS
@echo off
ECHO.
ECHO Installing Office 2003 Professional Hebrew Edition
ECHO Please wait...
start /wait %CDROM2%\install\Applications\Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-

ECHO.
ECHO Installing ICQ Lite 4.0 Build #1646 + Patch
ECHO Please wait...
start /wait %CDROM2%\install\Applications\IcqLite4\icq4.exe /S
pskill icqlite.exe

ECHO.
ECHO Installing Ad-Aware SE Personal Build 1.03
ECHO Please wait...
start /wait %CDROM2%\install\Applications\AdAwareSE\Adaware-SE.msi /passive /n
pskill Adaware.exe
pskill hh.exe
pskill Ad-Aware.exe

ECHO.
ECHO Installing Daemon Tools 3.33
ECHO Please wait...
start /wait %CDROM2%\install\Applications\DaemonTools\daemon.msi /q /passive /norestart

ECHO.
ECHO Installing DivX 5.2
ECHO Please wait...
start /wait %CDROM2%\install\Applications\DivX52\DivX52.exe /S

ECHO.
ECHO Installing FlashGet 1.60a
ECHO Please wait...
start /wait %CDROM2%\install\Applications\FlashGet160\fgf160a.exe /S

ECHO.
ECHO Installing FlashFXP 3.0 Final
ECHO Please wait...
start /wait %CDROM2%\install\Applications\FlashFxp3\FlashFXP30.exe /Silent

ECHO.
ECHO Registering FlashFXP 3.0 Final
ECHO Please wait...
copy /y "%CDROM2%\install\Applications\FlashFxp3\flashfxp.key" "%systemdrive%\Progra~1\FlashFXP\"

ECHO.
ECHO Installing Ahead Nero Burning Rom 6.3
ECHO Please wait...
start /wait %CDROM2%\install\Applications\Nero6\nero63117.exe /silent /noreboot

ECHO.
ECHO Registering Ahead Nero Burning Rom 6.3
ECHO Please wait...
REGEDIT /S %CDROM2%\install\Applications\Nero6\regnero.reg

ECHO.
ECHO Installing WinRar 3.40 Beta 4
ECHO Please wait...
start /wait %CDROM2%\install\Applications\WinRar34b4\wrar34b4.exe /s

ECHO.
ECHO Installing UltraISO 7.21 SR-2
ECHO Please wait...
start /wait %CDROM2%\install\Applications\UltraISO7\uiso7_me.exe /VERYSILENT /SP-

ECHO.
ECHO Registering UltraISO 7.21 SR-2
ECHO Please wait...
REGEDIT /S %CDROM2%\install\Applications\UltraISO7\reg.reg

ECHO.
ECHO Installing Serv-U 5.1
ECHO Please wait...
start /wait %CDROM2%\install\Applications\ServU51\susetup.exe /s
pskill servua~1.exe
pskill servut~1.exe

ECHO.
ECHO Registering Serv-U 5.1
ECHO Please wait...
copy /y "%CDROM2%\install\Applications\ServU51\ServUCert.key" "%systemdrive%\Progra~1\Serv-U\"

EXIT

The problem is that when its done do applications.cmd batch its done and dont do last commands in first_boot.cmd, This commands:

ECHO Moving programs shortcuts ...
ECHO.
MOVE /y "%systemdrive%\Documents and Settings\All Users\Desktop\*.lnk" "%systemdrive%\Documents and Settings\All Users\Desktop\Programs\"

ECHO.
ECHO Deleting Temp Installation Files...
RD /S /Q %systemdrive%\Install
RD /S /Q %systemdrive%\Drivers

ECHO.
ECHO Restarting the PC in 1 minute...
shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"

EXIT

Hmm whats problem?


first of all u need remove the - " that u put after the *.ink" and the one b4 the move path like this :

MOVE /y "%systemdrive%\Documents and Settings\All Users\Desktop\*.lnk %systemdrive%\Documents and Settings\All Users\Desktop\Programs\"

second, with RD command u can't remove a full folder, u can only remove an

empty folder with RD command.

second, with RD command u can't remove a full folder, u can only remove an

empty folder with RD command.

ummm, no :P lol

RD /S /Q "path\to\folder" it doesnt care whats in the folder, it will remove it

  • Author

I check and my command about Moving programs shortcuts works fine... and the Deleting Temp Installation Files works too (I check single command)...

RD /S /Q %systemdrive%\Install should be the last command executed in your batch, especially if your batch files are in the install directory otherwise any commands after that will not be executed because the batch file has been deleted...

  • Author

hmmm u dont understand me..

the command good and work but after applications.cmd its exit to desktop and dont do the command the after applications.cmd ..

I do understand but I'm just pointing out another issue you need to address.

Have you tried removing the EXIT from the applications.cmd?

I normally just do a CALL <CMD FILE>. Maybe you should try that.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.