IPB

Google Frontpage Forums Unattended CD/DVD Guide
 
Reply to this topicStart new topic
> Batch Files Getting Overrun, It seems like batch files don't usually finish when started from W
vampus8
post Aug 2 2006, 10:17 AM
Post #1


Newbie


Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 99628
Country Flag


I'm working on an unattended WinXP Pro DVD with WPI 5.1 followup. For a number of program installations, I run a small batch file after the main installation command to clean up that program's start menu entries. Often, though the programs install correctly, the followup batch files don't run at all or don't finish. When I run them manually from the CD they function just fine. Also, I've checked the execution directories in my config.js and they're ok too. Does anyone have any ideas?

Appologies for the noobishness. Any help would be greatly appreciated.

Here's my Config.js file and one of the sample batches. Again, sometimes all of the commands in a batch file execute properly, sometimes none of them, sometimes only the first few.

firefox_start.bat:
CODE
cmdow @ /HID
@ECHO OFF

copy "%ALLUSERSPROFILE%\start menu\programs\Mozilla Firefox\Mozilla Firefox.lnk" "%ALLUSERSPROFILE%\start menu\programs\"
rmdir /S /Q "%ALLUSERSPROFILE%\start menu\programs\Mozilla Firefox\"


This post has been edited by vampus8: Aug 2 2006, 10:18 AM
Go to the top of the page
 
+Quote Post
sadicq
post Aug 2 2006, 10:29 AM
Post #2


noob
***

Group: Members
Posts: 322
Joined: 17-August 05
From: Piatra Neamt
Member No.: 69206
OS: Vista Ultimate x64
Country Flag


I don't think your problem is the batch file, but the installer.
I know I once tried to install a plugin for Firefox right after it installed.
You should adjust your batches so they wait for that link to be created then delete it.

This post has been edited by sadicq: Aug 2 2006, 10:30 AM
Go to the top of the page
 
+Quote Post
vampus8
post Aug 2 2006, 10:44 AM
Post #3


Newbie


Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 99628
Country Flag


thanks for the advice sadicq. so there's something specific about mozilla's installers? should i just add a sleep command at the start of the batch file?

it seems to be happening with other programs too, though. the batch file to copy windirstat also doesn't seem to consistely work, unless i run it directly.

CODE
cmdow @ /HID
@echo off

mkdir "c:\program files\WinDirStat\"
copy "%CDROM%\Software\Extras\WinDirStat\windirstat.exe" "c:\program files\WinDirStat\"
copy "%CDROM%\Software\Extras\WinDirStat\windirstat.lnk" "%AllUsersProfile%\Start Menu\Programs"


yesterday this created a windirstat directory in program files and didn't copy anything.

thanks in advance for the help.

kevin
Go to the top of the page
 
+Quote Post
sadicq
post Aug 2 2006, 11:17 AM
Post #4


noob
***

Group: Members
Posts: 322
Joined: 17-August 05
From: Piatra Neamt
Member No.: 69206
OS: Vista Ultimate x64
Country Flag


Ok ... that was not supposed to happen. About firefox I can say it behaves a little different from the others, but the one ... it is strange. I'll look into this when I have some time. Unfortunaly, I'm really busy these days, but you should also wait for the 5.3 version. I heard they are trying to fix a problem regarding batches, so stay tuned and read the other threads in this forum too.
Go to the top of the page
 
+Quote Post
vampus8
post Aug 2 2006, 11:35 AM
Post #5


Newbie


Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 99628
Country Flag


is there any chance that converting the batch files to .cmds would make a functional difference? what about double executing them?
Go to the top of the page
 
+Quote Post
sadicq
post Aug 2 2006, 11:43 AM
Post #6


noob
***

Group: Members
Posts: 322
Joined: 17-August 05
From: Piatra Neamt
Member No.: 69206
OS: Vista Ultimate x64
Country Flag


1. I really doubt it would confused.gif
2. No. That's a really bad idea! What happens if one gets executed twice? You'll get some ugly errors.

This post has been edited by sadicq: Aug 2 2006, 11:44 AM
Go to the top of the page
 
+Quote Post
vampus8
post Aug 2 2006, 11:58 AM
Post #7


Newbie


Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 99628
Country Flag


1) ok
2) would you though? they're just mkdir/copy/paste/delete commands for the most part. if it tries to copy something that isn't there, it won't hurt anything. if it repastes something that's already there, it'll just overwrite, if it mkdirs a directory that's already there, it won't change anythign, if it tries to delete somethign that's not there it'll just not do it. so it might increase my chances of actually getting it done, no? might give some interesting error codes in the wpi log but, the real test is only whether the start menu turns out right.

it's a dirty job fix, but might work?

thanks,
kevin

This post has been edited by vampus8: Aug 2 2006, 11:58 AM
Go to the top of the page
 
+Quote Post
sadicq
post Aug 2 2006, 12:06 PM
Post #8


noob
***

Group: Members
Posts: 322
Joined: 17-August 05
From: Piatra Neamt
Member No.: 69206
OS: Vista Ultimate x64
Country Flag


Way too dirty in my opinion.
I just can't test a fix for this ... but anyone who uses cmds should show us some support...
Read this and look for the cmd errors Pliek is talking about.
Go to the top of the page
 
+Quote Post
Pliek
post Aug 2 2006, 10:35 PM
Post #9


Member
**

Group: Members
Posts: 154
Joined: 7-February 06
Member No.: 87234
Country Flag


When looking in topic for bugs reports 5.2, there are 4 fixes to be made.
Make these fixes and your batches wil be done right, atleast for me it worked.
I use .cmd files for my start menu folder also, and that works fine.
Example of my .cmd that also starts WPI.

CODE
@ECHO OFF
REM Hide this command window.
%systemroot%\system32\cmdow.exe @ /hid

REM Example, how to look for CDROM-drive. Must have win51ip.SP2 at the root of the CD.
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:
echo Found CD-Rom as drive %CDROM%

set wpipath=%cdrom%\WPI

start /wait %cdrom%\WPI\WPI.hta

DEL "%systemdrive%\Documents and Settings\Administrator\Onlangs geopend\*.lnk"
DEL "%systemdrive%\Documents and Settings\Administrator\Menu Start\Programma's\QuickPar.lnk"
DEL "%systemdrive%\Documents and Settings\Administrator\Menu Start\Programma's\Uninstall.lnk"
DEL "%systemdrive%\Documents and Settings\Administrator\Menu Start\Programma's\Website.lnk"
DEL "%systemdrive%\Documents and Settings\Administrator\Menu Start\Programma's\TuneUp Utilities 2006.lnk"
DEL "%systemdrive%\Documents and Settings\Administrator\Menu Start\PowerArchiver.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\ICQ 5.1.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\WinRAR.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\WinZip.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\XstreamRadio 3.02.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Windows-catalogus.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\IncrediMail.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programmatoegang en -instellingen.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Windows Movie Maker.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Adobe Reader 7.0.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\BearShare.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Adobe ImageReady CS.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Adobe Photoshop CS.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Microsoft Office PowerPoint Viewer 2003.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Orca.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\PerfectDisk 7.0.lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Nero\Handleiding voor Gebruikers\Nero BackItUp [Engelse Help].lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Nero\Handleiding voor Gebruikers\Nero Burning ROM [Engelse Help].lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Nero\Handleiding voor Gebruikers\Nero Cover Designer [Engelse Help].lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Nero\Handleiding voor Gebruikers\Nero Express [Engelse Help].lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Nero\Handleiding voor Gebruikers\Nero SoundTrax [Engelse Help].lnk"
DEL "%systemdrive%\Documents and Settings\All Users\Menu Start\Programma's\Nero\Handleiding voor Gebruikers\Nero Wave Editor [Engelse Help].lnk"

DEL "%AllUsersProfile%\Bureaublad\*.lnk"
DEL /s/q "%userprofile%\Bureaublad\*.lnk"

DEL "%systemdrive%\Program Files\XstreamRadio 3.02\Flags\ireland.bmp"
DEL "%systemdrive%\Program Files\Registry Mechanic\ref\Deutsch.ini"
DEL "%systemdrive%\Program Files\Registry Mechanic\ref\Espanol.ini"
DEL "%systemdrive%\*.log"

DEL "%systemdrive%\Documents and Settings\Administrator\Cookies\*.txt"
DEL "%systemdrive%\Documents and Settings\Administrator\Cookies\*.tmp"

RD /S /Q %systemdrive%\"Program Files\Common Files\Microsoft Shared\DAO\ssdata\"
RD /S /Q %systemdrive%\"Documents and Settings\Administrator\Local Settings\Temporary Internet Files\"
RD /S /Q %systemdrive%\"Documents and Settings\Administrator\Local Settings\Geschiedenis\"
RD /S /Q %systemdrive%\"Macromedia Dreamweaver.v8 .0"\
RD /S /Q %systemdrive%\D\
RD /S /Q %systemdrive%\Install\
RD /S /Q %systemdrive%\RECYCLER\
RD /S /Q %systemroot%\"Temp\"

net user aspnet /delete

SET PP=%systemroot%\system32\WPI\
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Resetten van het Beveiligingscentrum" /f
REG ADD %KEY%\001 /VE /D "Reset Windows Security Center" /f
REG ADD %KEY%\001 /V 1 /D "%PP%WinMgmt.cmd" /f

REM Herstarten van de PC binnen 30 seconden...
shutdown.exe -r -f -t 30 -c "Windows zal over 30 seconden worden herstart."

EXIT


This post has been edited by Pliek: Aug 2 2006, 10:41 PM
Go to the top of the page
 
+Quote Post
vampus8
post Aug 3 2006, 01:29 PM
Post #10


Newbie


Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 99628
Country Flag


are those fixes applicable to wpi5.1 as well? i haven't taken the trouble to migrate to 5.2, especially with kels saying 5.3 is on the way so soon.
thanks for the input everyone smile.gif
kevin
Go to the top of the page
 
+Quote Post
Pliek
post Aug 3 2006, 01:54 PM
Post #11


Member
**

Group: Members
Posts: 154
Joined: 7-February 06
Member No.: 87234
Country Flag


No I don't think so, these are specific for 5.2.
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 9th January 2009 - 04:16 PM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2008 msfn.org
Privacy Policy