Batch file can't find installers
#1
Posted 25 April 2007 - 12:54 PM
#2
Posted 25 April 2007 - 01:31 PM
What have you added to svcpack.inf?
Is the svcpack folder source names in dosnet.inf?
#3
Posted 26 April 2007 - 07:39 AM
Yzöwl, on Apr 25 2007, 04:31 PM, said:
What have you added to svcpack.inf?
Is the svcpack folder source names in dosnet.inf?
Sorry about the lack of information. I'm following the instructions on the MSFN site to make an unattended XP SP2 installer, and the Windows installer (with all the current hotfixes) works fine. I've been testing it under the latest version of Virtual PC.
The error occurs right after the hotfixes finish installing and it brings a dialog box saying "Windows cannot find x. make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.", where x is the application installer. The applications are named correctly and they are in the svcpack folder. The batch file works correctly when I run it outside of the windows installer.
To svcpack.inf I added, after the hotfixes and qchain, I added my apps batch file.
Yes, I have the svcpack folder source name in dosnet.inf.
If there is anymore information that would be helpful for you guys helping me out then let me know.
Thanks.
#4
Posted 26 April 2007 - 07:56 AM
#5
Posted 26 April 2007 - 08:01 AM
;Windows XP [Version] Signature="$Windows NT$" MajorVersion=5 MinorVersion=1 BuildNumber=2600 [SetupData] CatalogSubDir="\i386\SVCPACK" [ProductCatalogsToInstall] [SetupHotfixesToRun] KB931261.exe /q /n /z KB931784.exe /q /n /z KB931836.exe /q /n /z KB932168.exe /q /n /z qchain.exe apps.bat
That's my SVCPACK.inf file (though I removed most of the hotfixes to save space).
@echo off title Batch File Applications Installer echo. echo Begin Installation: echo. echo Mozilla Firefox 2 echo Please wait... start "Firefox" /wait "Firefox Setup 2.0.0.1.exe" /S echo. echo Adobe Reader 8 echo Please wait... start "Adobe Reader" /wait "AdbeRdr80_en_US.exe" /sAll echo Deleting Desktop Shortcut DEL "&ALLUSERSPROFILE&\Desktop\Adobe Reader 8.Ink" echo. echo WinSCP echo Please wait... start "WinSCP" /wait "winscp382setup.exe" /sp- /silent /norestart echo. echo Putty echo Please wait... copy putty.exe "&ALLUSERSPROFILE&\Desktop\" echo. echo Installation Finished echo. echo Restarting in 60 seconds shutdown.exe /r /f /t:60 /c "Restarting to finish application installation" exit
And that's my apps batch file.
This post has been edited by Patches7o9: 26 April 2007 - 08:01 AM
#6
Posted 26 April 2007 - 08:13 AM
to this %ALLUSERSPROFILE%
#7
Posted 26 April 2007 - 09:51 AM
#8
Posted 26 April 2007 - 09:57 AM
Also, qchain.exe shouldn't be necessary either.
#9
Posted 26 April 2007 - 10:52 AM
Thanks again.
#10
Posted 26 April 2007 - 12:25 PM
Maybe I should just have it run at a different stage of the installation?
#11
Posted 26 April 2007 - 12:32 PM
so create a folder on the disk for install, then
@echo off title Batch File Applications Installer for %%i 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 %%i:\win51ip.SP2 set CDROM=%%i: SET InstallPath=%CDROM%\Install echo. echo Begin Installation: echo. echo Mozilla Firefox 2 echo Please wait... start "Firefox" /wait "%InstallPath%\Firefox Setup 2.0.0.1.exe" /S echo. echo Adobe Reader 8 echo Please wait... start "Adobe Reader" /wait "%InstallPath%\AdbeRdr80_en_US.exe" /sAll echo Deleting Desktop Shortcut DEL "&ALLUSERSPROFILE&\Desktop\Adobe Reader 8.Ink" echo. echo WinSCP echo Please wait... start "WinSCP" /wait "%InstallPath%\winscp382setup.exe" /sp- /silent /norestart echo. echo Putty echo Please wait... copy %InstallPath%\putty.exe "&ALLUSERSPROFILE&\Desktop\" echo. echo Installation Finished echo. echo Restarting in 60 seconds shutdown.exe /r /f /t:60 /c "Restarting to finish application installation" exit
#12
Posted 26 April 2007 - 12:43 PM
phkninja, on Apr 26 2007, 03:32 PM, said:
so create a folder on the disk for install, then
(code snip)
I find the problem really odd though, since I can run the batch script fine in any other situation, but just when the installation runs it doesn't work.
I'll try the code above and see if it works.
Thanks.
#13
Posted 26 April 2007 - 03:11 PM
Quote
This will work as it is correct
Quote
#14
Posted 26 April 2007 - 03:28 PM
Patches7o9, on Apr 26 2007, 02:43 PM, said:
I'll try the code above and see if it works.
Thanks.
when you run it manually it is running from the folder in which the installers reside, when running from svcpack.inf it is being called when the relative path is more likely c:\windows\system32 so any executable the bathc would look for it would look in that folder not your folder with the installers.
You could solve that problem by adding a change directory command to the beginning of the script.
#15
Posted 26 April 2007 - 06:12 PM
Like IceMan says svcpack calls the programs from the system or system32 directory. By using a directory like the one i suggested above it means the apps install from cd and dont need to be copied to the hard drive at all. Either way its just a personal preference.
e.g.
my way
CD Layout
I386 Install |_(Apps) ........
using svcpack alone
i386 |_SVCPACK |__(Apps)
ou can fix the problem by adding the apps into the svcpack folder on the disk, or do as i said above and add them to the Install folder onm the disk, making the changes to the apps.bat to make the installers run from the cd.
#16
Posted 27 April 2007 - 10:29 AM
Thanks a bunch everybody.
This post has been edited by Patches7o9: 27 April 2007 - 10:29 AM



Help
Back to top









