MCT Posted July 15, 2004 Share Posted July 15, 2004 im wanting 2 do this, so i dont have 20 copies of the same .reg file with only the drive letter different.. anyone know a program or something i can use 2 replace example C: with D: ? thanks @ECHO OFFIF EXIST C:\WIN51 set CDROM=C:IF EXIST D:\WIN51 set CDROM=D:IF EXIST E:\WIN51 set CDROM=E:IF EXIST F:\WIN51 set CDROM=F:IF EXIST G:\WIN51 set CDROM=G:IF EXIST H:\WIN51 set CDROM=H:IF EXIST I:\WIN51 set CDROM=I:IF EXIST J:\WIN51 set CDROM=J:IF EXIST K:\WIN51 set CDROM=K:IF EXIST L:\WIN51 set CDROM=L:IF EXIST M:\WIN51 set CDROM=M:IF EXIST N:\WIN51 set CDROM=N:IF EXIST O:\WIN51 set CDROM=O:IF EXIST P:\WIN51 set CDROM=P:IF EXIST Q:\WIN51 set CDROM=Q:IF EXIST R:\WIN51 set CDROM=R:IF EXIST S:\WIN51 set CDROM=S:IF EXIST T:\WIN51 set CDROM=T:IF EXIST U:\WIN51 set CDROM=U:IF EXIST V:\WIN51 set CDROM=V:IF EXIST W:\WIN51 set CDROM=W:IF EXIST X:\WIN51 set CDROM=X:IF EXIST Y:\WIN51 set CDROM=Y:IF EXIST Z:\WIN51 set CDROM=Z:mkdir "%programfiles%\Foobar2000"mkdir "%programfiles%\Foobar2000\Components"mkdir "%programfiles%\Foobar2000\Icons"mkdir "%AllUsersProfile%\Start Menu\Programs\Foobar2000"xcopy "%CDROM%\Install\Apps\FooBar2000\*.*" "%programfiles%\foobar2000" /Yxcopy "%CDROM%\Install\Apps\FooBar2000\Components\*.*" "%programfiles%\foobar2000\Components" /Yxcopy "%CDROM%\Install\Apps\FooBar2000\Icons\*.*" "%programfiles%\foobar2000\Icons" /Yshortcut.exe /f:"%ALLUSERSPROFILE%\Start Menu\Programs\foobar2000\Foobar2000.lnk" /a:c /t:"\Program Files\foobar2000\foobar2000.exe"shortcut.exe /f:"%ALLUSERSPROFILE%\Start Menu\Programs\foobar2000\uninstall.lnk" /a:c /t:"\Program Files\foobar2000\uninstall.exe"shortcut.exe /f:"%ALLUSERSPROFILE%\Start Menu\Programs\foobar2000\FooAssoc.lnk" /a:c /t:"\Program Files\foobar2000\fooassoc.exe"IF EXIST "a:\program files\Foobar2000\Foobar2000.exe" GOTO FoobaraIF EXIST "b:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarbIF EXIST "c:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarcIF EXIST "d:\program files\Foobar2000\Foobar2000.exe" GOTO FoobardIF EXIST "e:\program files\Foobar2000\Foobar2000.exe" GOTO FoobareIF EXIST "f:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarfIF EXIST "g:\program files\Foobar2000\Foobar2000.exe" GOTO FoobargIF EXIST "h:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarhIF EXIST "i:\program files\Foobar2000\Foobar2000.exe" GOTO FoobariIF EXIST "j:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarjIF EXIST "k:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarkIF EXIST "l:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarlIF EXIST "m:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarmIF EXIST "n:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarnIF EXIST "o:\program files\Foobar2000\Foobar2000.exe" GOTO FoobaroIF EXIST "p:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarpIF EXIST "q:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarqIF EXIST "r:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarrIF EXIST "s:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarsIF EXIST "t:\program files\Foobar2000\Foobar2000.exe" GOTO FoobartIF EXIST "u:\program files\Foobar2000\Foobar2000.exe" GOTO FoobaruIF EXIST "v:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarvIF EXIST "w:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarwIF EXIST "x:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarxIF EXIST "y:\program files\Foobar2000\Foobar2000.exe" GOTO FoobaryIF EXIST "z:\program files\Foobar2000\Foobar2000.exe" GOTO FoobarzGOTO END:FoobaraRegedit /S %CDROM%\Install\Reg\foobar2000a.regGOTO END:FoobarbRegedit /S %CDROM%\Install\Reg\foobar2000b.regGOTO END:FoobarcRegedit /S %CDROM%\Install\Reg\foobar2000d.regGOTO END:FoobareRegedit /S %CDROM%\Install\Reg\foobar2000e.regGOTO END:FoobarfRegedit /S %CDROM%\Install\Reg\foobar2000f.regGOTO END:FoobargRegedit /S %CDROM%\Install\Reg\foobar2000g.regGOTO END:FoobarhRegedit /S %CDROM%\Install\Reg\foobar2000h.regGOTO END:FoobariRegedit /S %CDROM%\Install\Reg\foobar2000i.regGOTO END:FoobarjRegedit /S %CDROM%\Install\Reg\foobar2000j.regGOTO END:FoobarkRegedit /S %CDROM%\Install\Reg\foobar2000k.regGOTO END:FoobarlRegedit /S %CDROM%\Install\Reg\foobar2000l.regGOTO END:FoobarmRegedit /S %CDROM%\Install\Reg\foobar2000m.regGOTO END:FoobarnRegedit /S %CDROM%\Install\Reg\foobar2000n.regGOTO END:FoobaroRegedit /S %CDROM%\Install\Reg\foobar2000o.regGOTO END:FoobarpRegedit /S %CDROM%\Install\Reg\foobar2000p.regGOTO END:FoobarqRegedit /S %CDROM%\Install\Reg\foobar2000q.regGOTO END:FoobarrRegedit /S %CDROM%\Install\Reg\foobar2000r.regGOTO END:FoobarsRegedit /S %CDROM%\Install\Reg\foobar2000s.regGOTO END:FoobartRegedit /S %CDROM%\Install\Reg\foobar2000t.regGOTO END:FoobaruRegedit /S %CDROM%\Install\Reg\foobar2000u.regGOTO END:FoobarvRegedit /S %CDROM%\Install\Reg\foobar2000v.regGOTO END:FoobarwRegedit /S %CDROM%\Install\Reg\foobar2000w.regGOTO END:FoobarxRegedit /S %CDROM%\Install\Reg\foobar2000x.regGOTO END:FoobaryRegedit /S %CDROM%\Install\Reg\foobar2000y.regGOTO END:FoobarzRegedit /S %CDROM%\Install\Reg\foobar2000z.regGOTO END:END Link to comment Share on other sites More sharing options...
Alanoll Posted July 15, 2004 Share Posted July 15, 2004 have you considered using REG.EXE? Supposedly you can replace values.....So then you just have those few lines in your REG file that require the change in your CMD file (RunOnceEX maybe?) Link to comment Share on other sites More sharing options...
MCT Posted July 15, 2004 Author Share Posted July 15, 2004 ill look into reg.exe thanks Link to comment Share on other sites More sharing options...
Alanoll Posted July 15, 2004 Share Posted July 15, 2004 If it's just for replacing C: with %CDROM% or whatever, refer to the RunOnceEX from CD guide on the website, it should show you the syntax pretty much for REG.EXE and give you an example of usage. Link to comment Share on other sites More sharing options...
MCT Posted July 15, 2004 Author Share Posted July 15, 2004 i think we're on 2 sepeate paths now :S lol im lost instead of having :FoobareRegedit /S %CDROM%\Install\Reg\foobar2000e.regit would mod the original .reg file & replace C: with E: anything that will do that? Link to comment Share on other sites More sharing options...
|00| Posted July 15, 2004 Share Posted July 15, 2004 why not to call a little vbs script via a .cmd file ?e.g================================VBS script (call it foo.vbs)it aims to install all formatsbtw you can modify itplace it in ...\$OEM$\$1\Install\applications\foobarwith foobar.exe (rename it if necessary)================================Set WshShell = WScript.CreateObject("WScript.Shell")On Error Resume NextWshShell.Run ("c:\install\applications\foobar\foobar.exe /S")WScript.Sleep 10000WshShell.SendKeys "{DOWN}"WScript.Sleep 800WshShell.SendKeys "{TAB 2}"WScript.Sleep 500WshShell.SendKeys "{ENTER}"WScript.Sleep 6000WshShell.SendKeys "{SPACE}"WScript.Sleep 500WshShell.SendKeys "{TAB 2}"WScript.Sleep 500WshShell.SendKeys "{ENTER}"WScript.Sleep 500Wscript.Quit================================in the batch that you call with winnt.sif e.g================================ECHO Installing foobar v0.8 specialECHO please, wait...start /wait %systemdrive%\install\Applications\foobar\foo.vbs00post edited Link to comment Share on other sites More sharing options...
|00| Posted July 15, 2004 Share Posted July 15, 2004 with a vbs script you can install each option you wantyou don't need .regbut you are wright if you need it, it is :REGEDIT /S00 Link to comment Share on other sites More sharing options...
MCT Posted July 15, 2004 Author Share Posted July 15, 2004 i never thought of that that could be a good possibility, do u know of a guide or something i can refrence off of 2 learn vbs ? ive never done it b4 EDIT: found one, http://msdn.microsoft.com/library/default....mthsendkeys.asp if anyone wants itthanks Link to comment Share on other sites More sharing options...
|00| Posted July 15, 2004 Share Posted July 15, 2004 to make it simpleSet WshShell = WScript.NOCreateObject("WScript.Shell")On Error Resume Next--> copy and paste itWshShell.Run--> too run a commandhere, runs foobar installWScript.Sleep 10000--> pause 10000 ms = 10 secWshShell.SendKeys--> DOWN = DOWN--> TAB 2 = TAB two timesWscript.Quit--> to closeif you want to know the keys, make a simple install and note each key you need to install foobar you own way...00 Link to comment Share on other sites More sharing options...
|00| Posted July 15, 2004 Share Posted July 15, 2004 you can do it to with auto-itinstead of vbs scripting :http://www.hiddensoft.com/autoit3/ Link to comment Share on other sites More sharing options...
MCT Posted July 15, 2004 Author Share Posted July 15, 2004 that was easy enough i think i got it, thanks 2 all that replied Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now