1.

Solve : After rebooting PC .bat not work?

Answer»

Hello agian,

START.bat
md c:\windows\Installer\System-Installer
xcopy Files c:\windows\Installer\System-Installer /s /e /h

REGEDIT /s runonce.reg
this .reg file is:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"setup.bat"="c:\\windows\\Installer\\System-Installer\\Setup.bat"

shutdown -r -f -t 10

the setup.bat file:
files\setup.exe


The problem:
I run start.bat and it runs fine. After the pc reboots the setup.bat file auto run (FORM the .reg file) all the echo stuff comes up, but the setup.exe trys to load and "Windows XP" said "PLease go to the Control Panel to install and configure system components" so it fails. But rigth after that I can goto the System-Installer folder that was just CREATED folder and run the same setup.bat file and it run fine. Oh yea, the setup.exe is a screensaver.

Any ideas

Thanks
Tom

P.S. How do you get that nice looking code box in your post for the code?
It could be a timing issue. Maybe try adding a pause to your SETUP.BAT file, like:

Code: [Select]ping -n 15 localhost >NUL
files\setup.exe

The box to post code is the # symbol (mouse-over says "insert code") near the middle of the top formatting bar.GuruGary,

I tryed putting ping -n 15 localhost >NUL (and 60 to) at the start to slow it down but same THING happened. And right after I click close on the cmd window I can start the setup.bat file (thats is the xcopy copyed to the folder) and its file Grrrrr.

Thx tho,
Tom

Maybe try INCLUDING full paths to all files, and add quotes.

Start.bat:
Code: [Select]md c:\windows\Installer\System-Installer
xcopy "C:\Files" "c:\windows\Installer\System-Installer" /s /e /h
Setup.bat:
Code: [Select]"C:\files\setup.exe"



Discussion

No Comment Found