ewingum Posted June 29, 2004 Share Posted June 29, 2004 I'm creating unattended windows xp cds using XPCREATE (i posted my question here and not in XPCREATE's forum because it is not XPCREATE-specifiec questions). i'm using RunOnceEx.cmd in $OEM$ to install after the first logon (Using RunOnceEx in the registry) several updates and apps and to call a cmd (which is the last procedure that is registered thru the RunOnceEx.cmd) that is contents are:cmdow @ /HID@echo offnet user aspnet /deleteDEL "%AllUsersProfile%\Desktop\Java Web Start.lnk"DEL "%AllUsersProfile%\Desktop\Microsoft Baseline Security Analyzer 1.2.lnk"RD /S /Q %systemdrive%\install\shutdown.exe -r -f -t 00EXITnow, the problem is that the computer doesn't restart at all. I want the computer to restart without a warning, so using -t xx where xx is not 00 or just -r -f (that automatically calls -t 30). i don't care to have a delay of like 10sec but if it will eventually restart after 10sec. Any suggestions?Another problem is that the windows does not change the resolution of the screen. in the winnt.sif i wrote:[Display] BitsPerPel=32 XResolution=800 YResolution=600 Vrefresh=85and because that didn't work i used the 1365VidChng.exe that is on http://unattended.msfn.org . i wrote on RunOnceEx.cmd:REG ADD %KEY%\025 /VE /D "Setting screen resolution" /fREG ADD %KEY%\025 /V 1 /D "%systemdrive%\install\1365VidChng.exe 800x600x32@85 -q" /fAgain, it seems to activate the file but it does not change the resolution.Thanks Link to comment Share on other sites More sharing options...
GreenMachine Posted June 29, 2004 Share Posted June 29, 2004 Lemme guess ... RD /S /Q %systemdrive%\install\shutdown.exe -r -f -t 00This code is in a file in the %systemdrive%\install\ directory, which is deleted before it can call shutdown? If so, reverse the order of the two commands above.This is NOT an XPCREATE problem: thank you for posting here, and not there! Link to comment Share on other sites More sharing options...
ewingum Posted June 29, 2004 Author Share Posted June 29, 2004 Indeed, i guess this is the problem.weird that i haven't noticed. {EDIT: now i remember that i thought that since the CMD is already loaded at memory it will noe cause problems and execute the shutdown command anyway. i have to say that it seems to me weird that it hadn't worked, tough i think it is indeed the problem (i don't see any other reason)}so i guess that i'll register the RD at RunOnceEx in the registry thru this cmd, so it'll restart and remove the folder after the restart. Tnx! and now for the second problem btw, how can i create an xpcreate generated cd with sp2rc2? i slipstreamed it to CDSource but it than downloads SP1a setup to slipstream it instead :-\p.s. - i really appriciate ur work! Two thumbs up Link to comment Share on other sites More sharing options...
GreenMachine Posted June 29, 2004 Share Posted June 29, 2004 Just change the order of the two commands, and the shutdown timeout to 5, and it will start the shutdown counter, delete the directory, and exit.Never tried XPCREATE with SP2, as there are not any hotfixes to slipstream. You could set DLAUTO=NO in XPCREATE.INI, and you will have complete control over files used.Missed ... Welcome to MSFN! Link to comment Share on other sites More sharing options...
ewingum Posted June 29, 2004 Author Share Posted June 29, 2004 Tnx is there a way to have a timeout and yet to have no warning screen (this RPC-is-terminated-so-i-have-to-shutdown like screen)? Link to comment Share on other sites More sharing options...
GreenMachine Posted June 29, 2004 Share Posted June 29, 2004 Hmmm ... I think I'm just going to stroll back to the XPCREATE forum, where I know (or can make up) the answers ... Sorry! Link to comment Share on other sites More sharing options...
ewingum Posted June 29, 2004 Author Share Posted June 29, 2004 Well, I've created a vb utility that recieves as a parameter the time (in seconds) to wait before restart/shutdown. it should be used like thisShutDownTim /r[optinal] x[optional]where x is the time and /r (or -r - note that it is not case sensitive) is the parameter for restarting.x can be between or equals to 0 and 60. (0<=x<=60)if there are no parameters or invalid parameters, it will reset/shutdown without waiting (as if x was 0).For example:shutdowntim /R 30 - this will restart the computer after 30 seconds.Works like charm, feel free to use it.If someone wants to host it on their website, feel free to do so with credits (Created by Ewingum).ShutDownTim.exe Link to comment Share on other sites More sharing options...
GreenMachine Posted June 29, 2004 Share Posted June 29, 2004 Now that you mention it ...You just need to wait a certain amount of time, and then shutdown with 0 seconds. I use the PING command to a non-existant address to do a "WAIT". You can adjust the time with -n (number of PINGs) and -w (wait inbetween PINGs). This example waits 5 seconds 10 times:ping -n 10 -w 5000 1.1.1.1 > NULYou're EXE file should be fine, too. Thanks for sharing that! The only real advantage of this method would be that the PING command is already available. 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