Jump to content

setting cd-rom drive varible


Recommended Posts

Hey guys how can i set the cdrom varible with out it bring up errors when it scans the drives, also i use wpi if i replace %systemdrive% with %cdrom% will it run becuse here is my current half completed install.cmd

@echo off
title Windows 2003 Professional Edition Setup
ECHO.
ECHO ---------------------------------
ECHO.
ECHO.
ECHO Over the next few minutes you will see a post setup screen
ECHO this screen will let you select and install various sofware
ECHO applications, windows updates, and registry tweaks being
ECHO implemented. The computer will restart automatically
ECHO once the whole process has finished!
ECHO.
ECHO Please Leave in your Windows 2003 Disk to avoid errors during post install

ECHO.
ECHO ---------------------------------
ECHO.
ECHO Scanning for cd rom drive
IF EXIST D:\AUTORUN.INF set CDROM=D:
IF EXIST E:\AUTORUN.INF set CDROM=E:
IF EXIST F:\AUTORUN.INF set CDROM=F:
IF EXIST G:\AUTORUN.INF set CDROM=G:
IF EXIST H:\AUTORUN.INF set CDROM=H:
IF EXIST I:\AUTORUN.INF set CDROM=I:
IF EXIST J:\AUTORUN.INF set CDROM=J:
IF EXIST K:\AUTORUN.INF set CDROM=K:
IF EXIST L:\AUTORUN.INF set CDROM=L:
IF EXIST M:\AUTORUN.INF set CDROM=M:
IF EXIST N:\AUTORUN.INF set CDROM=N:

ECHO.
ECHO Removing Wallpapers and Screensavers...
DEL "%systemdrive%\WINDOWS\Web\Wallpaper\Windows Server 2003.bmp"


ECHO.
ECHO ---------------------------------
ECHO.
ECHO Installing 'Windows Products Setup' Startmenu Shortcut
ECHO DO NOT DELETE THIS SHORTCUT
COPY "%cdrom%\$oem$\$1\install\Windows Products Setup.lnk" "%allusersprofile%\Start Menu"
ECHO.
ECHO ---------------------------------
ECHO.
ECHO Starting Cleartype Tune
start /wait %cdrom%\$oem$\$1\install\cleartweak.exe
ECHO.
ECHO ---------------------------------
ECHO.
ECHO Starting Windows Products Setup
ECHO.
ECHO Warning if a dialog comes up saying a script is taking to long to complete
ECHO make sure you let it have more time by selecting the correct option
ECHO.
ECHO To Continue with the setup press enter or the space key
PAUSE
ECHO.
ECHO  Continuing Setup
start /wait %systemdrive%\install\wpi\WPI.hta
ECHO.
ECHO Post Setup complete
ECHO.

ECHO Removing useless shortcuts...
DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Update.lnk"
DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk"
DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk"
DEL /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"
DEL /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"
DEL /Q "%AllUsersProfile%\Start Menu\Programs\Adobe Reader 6.0.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Java Web Start.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Alcohol 120%.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Kazaa Lite K++.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Mozilla Firefox.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Nero StartSmart.lnk"
DEL /Q "%UserProfile%\Desktop\1-Click Maintenance.lnk"
DEL /Q "%UserProfile%\Desktop\Shareaza.lnk"
DEL /Q "%UserProfile%\Desktop\TuneUp Utilities 2004.lnk"
DEL /Q "%UserProfile%\Desktop\Steam.lnk"
DEL /Q "%UserProfile%\Desktop\FlashFXP.lnk"
DEL /Q "%AllUsersProfile%\Desktop\3ds max 6.lnk"
DEL /Q "%AllUsersProfile%\Desktop\3ds max 7.lnk"
DEL /Q "%AllUsersProfile%\Desktop\CyberLink PowerDVD.lnk"
DEL /Q "%UserProfile%\Desktop\Opera.lnk"
ECHO ---------------------------------
ECHO Windows 2003 Modifcations being applied
start /wait %cdrom%\install\Win2003.exe /u
regsvr32 /s \windows\system32\COMDLG32.OCX
ECHO.
ECHO ---------------------------------
ECHO.
ECHO.
ECHO.
EXIT

cuz im just wondering if the %cdrom% will be carried into wpi and back out into other install.cmd thats run for the setups from wpi

Link to comment
Share on other sites


Hey un4given1 ;)

I don't mean to gloat, but yes, I do see that both of us try to help people, and ask them to search when its relevant!

(pun intended... I'm referring to what you'd said about too many people responding with "search" instead of the answer)

Link to comment
Share on other sites

well ok i figured it all out but my windows still keeps giving errors when seraching the drives becuse it cant find a drive there

BTW why doesnt something like this get pinned

BTW can people stop replying with search i know how to search but i need a answer i coulendt find

Link to comment
Share on other sites

I also use wpi.

i think u should read this

http://unattended.msfn.org/xp/runonceex_cd.htm

ECHO Removing useless shortcuts...

DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Update.lnk"

DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk"

DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk"

DEL /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"

DEL /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"

DEL /Q "%AllUsersProfile%\Start Menu\Programs\Adobe Reader 6.0.lnk"

DEL /Q "%AllUsersProfile%\Desktop\Java Web Start.lnk"

DEL /Q "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk"

DEL /Q "%AllUsersProfile%\Desktop\Alcohol 120%.lnk"

DEL /Q "%AllUsersProfile%\Desktop\Kazaa Lite K++.lnk"

DEL /Q "%AllUsersProfile%\Desktop\Mozilla Firefox.lnk"

DEL /Q "%AllUsersProfile%\Desktop\Nero StartSmart.lnk"

DEL /Q "%UserProfile%\Desktop\1-Click Maintenance.lnk"

DEL /Q "%UserProfile%\Desktop\Shareaza.lnk"

DEL /Q "%UserProfile%\Desktop\TuneUp Utilities 2004.lnk"

DEL /Q "%UserProfile%\Desktop\Steam.lnk"

DEL /Q "%UserProfile%\Desktop\FlashFXP.lnk"

DEL /Q "%AllUsersProfile%\Desktop\3ds max 6.lnk"

DEL /Q "%AllUsersProfile%\Desktop\3ds max 7.lnk"

DEL /Q "%AllUsersProfile%\Desktop\CyberLink PowerDVD.lnk"

DEL /Q "%UserProfile%\Desktop\Opera.lnk"

this should be in the cleanup.cmd

Link to comment
Share on other sites

i told u to look at the link. ;)

if u just took a min to read u would see that your argument is wrong.

ECHO Scanning for cd rom drive

IF EXIST D:\AUTORUN.INF set CDROM=D:

IF EXIST E:\AUTORUN.INF set CDROM=E:

IF EXIST F:\AUTORUN.INF set CDROM=F:

IF EXIST G:\AUTORUN.INF set CDROM=G:

IF EXIST H:\AUTORUN.INF set CDROM=H:

IF EXIST I:\AUTORUN.INF set CDROM=I:

IF EXIST J:\AUTORUN.INF set CDROM=J:

IF EXIST K:\AUTORUN.INF set CDROM=K:

IF EXIST L:\AUTORUN.INF set CDROM=L:

IF EXIST M:\AUTORUN.INF set CDROM=M:

IF EXIST N:\AUTORUN.INF set CDROM=N:

It should be this
IF EXIST D:\CD.txt set CDROM=D:

IF EXIST E:\CD.txt set CDROM=E:

IF EXIST F:\CD.txt set CDROM=F:

IF EXIST G:\CD.txt set CDROM=G:

IF EXIST H:\CD.txt set CDROM=H:

IF EXIST I:\CD.txt set CDROM=I:

IF EXIST J:\CD.txt set CDROM=J:

pls read...

http://unattended.msfn.org/xp/runonceex_cd.htm

take about 15 to 20 mins

Link to comment
Share on other sites

look the instruction in unattended.msfn.org has worked for thousands.

i seriously believe there is something wrong with it. it isn't a sheep joke.

it does work. and why do u hv so many echo for?

up to you.

here is another method i use.

::Locate the CDROM drive if necessary, where AUTORUN.INF exists at the root...

FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%d\AUTORUN.INF SET CDROM=%%d

ECHO Warning if a dialog comes up saying a script is taking to long to complete

ECHO make sure you let it have more time by selecting the correct option

u need to hack the registry and add this

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles]"MaxScriptStatements"=dword:ffffffff
ECHO Installing 'Windows Products Setup' Startmenu Shortcut

ECHO DO NOT DELETE THIS SHORTCUT

COPY "%cdrom%\$oem$\$1\install\Windows Products Setup.lnk" "%allusersprofile%\Start Menu"

ECHO.

ECHO ---------------------------------

that is automatically installed by xp. in addition u can put it the correct $oem$ path

so u dont need to use copy

http://unattended.msfn.org/xp/oemfolders.htm read it

Link to comment
Share on other sites

well heres how it goes this is the first windows the user sees it tells them what is going on so the first command

cmdow @ /HID

was removed then i ahve so many echos to say what is going on and ive inlcuded the updated code below

@echo off
title Windows 2003 Professional Edition Setup
ECHO.
ECHO ---------------------------------
ECHO.
ECHO.
ECHO Over the next few minutes you will see a post setup screen
ECHO this screen will let you select and install various sofware
ECHO applications, windows updates, and registry tweaks being
ECHO implemented. It is reccomended that you restart your computer
ECHO after setup if finished
ECHO.
ECHO Please insert your Windows 2003 Disk to avoid errors during post install
ECHO.
ECHO ---------------------------------
ECHO.
ECHO Scanning for cd rom drive
IF EXIST D:\CD.txt set CDROM=D:
IF EXIST E:\CD.txt set CDROM=E:
IF EXIST F:\CD.txt set CDROM=F:
IF EXIST G:\CD.txt set CDROM=G:
IF EXIST H:\CD.txt set CDROM=H:
IF EXIST I:\CD.txt set CDROM=I:
IF EXIST J:\CD.txt set CDROM=J:
IF EXIST K:\CD.txt set CDROM=K:
IF EXIST L:\CD.txt set CDROM=L:
IF EXIST M:\CD.txt set CDROM=M:
IF EXIST N:\CD.txt set CDROM=N:
ECHO ---------------------------------
ECHO.
ECHO Starting Windows Products Setup
ECHO.
ECHO Warning if a dialog comes up saying a script is taking to long to complete
ECHO make sure you let it have more time by selecting the correct option
ECHO.
ECHO To Continue with the setup press enter or the space key
PAUSE
ECHO.
ECHO  Continuing Setup
start /wait %systemdrive%\install\wpi\WPI.hta
ECHO.
ECHO Post Setup complete
ECHO.

ECHO Removing useless shortcuts...
DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Update.lnk"
DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk"
DEL /Q "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk"
DEL /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"
DEL /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"
DEL /Q "%AllUsersProfile%\Start Menu\Programs\Adobe Reader 6.0.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Java Web Start.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Alcohol 120%.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Kazaa Lite K++.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Mozilla Firefox.lnk"
DEL /Q "%AllUsersProfile%\Desktop\Nero StartSmart.lnk"
DEL /Q "%UserProfile%\Desktop\1-Click Maintenance.lnk"
DEL /Q "%UserProfile%\Desktop\Shareaza.lnk"
DEL /Q "%UserProfile%\Desktop\TuneUp Utilities 2004.lnk"
DEL /Q "%UserProfile%\Desktop\Steam.lnk"
DEL /Q "%UserProfile%\Desktop\FlashFXP.lnk"
DEL /Q "%AllUsersProfile%\Desktop\3ds max 6.lnk"
DEL /Q "%AllUsersProfile%\Desktop\3ds max 7.lnk"
DEL /Q "%AllUsersProfile%\Desktop\CyberLink PowerDVD.lnk"
DEL /Q "%UserProfile%\Desktop\Opera.lnk"

EXIT

PS i included the clean up thing becuse why not make it one file the real cleanup.cmd deletes other files by option in wpi

Link to comment
Share on other sites

in my opinion, u dont need that many echos.

i tell people throw it into the dvd drive, go pickup your kids, come home and your all set to go. go take a shower, go take poopoo

they wont sit there starring at it

i hv my cleanup run during wpi as my 999th excutable of my wpi.

Link to comment
Share on other sites

Hey guys how can i set the cdrom varible with out it bring up errors when it scans the drives, also i use wpi if i replace %systemdrive% with %cdrom%  will it run becuse here is my current half completed install.cmd

The CDROM variable is being set in the batch script, but is not being used. the CDROM variable is only useful within the file that set it. If you are using a CDROM variable within WPI, and have no set CDROM variable within it, then WPI could be creating the error?

Link to comment
Share on other sites

this is all being ran before wpi

PS this install is not unattended becuse if it was people would have a hell of alot of software being installed now i know it works all i want is someone to fix this error

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...