durex Posted December 27, 2004 Posted December 27, 2004 Anyone know why certain windows commands dont work at the beginning of the RunOnceEx?2 things in particular...the VidChange program doesnt seem to be working... I have it as the very 1st thing in my runonce; the program is in my $$\System32 folder...REG ADD %KEY%\000 /V 1 /D "1395VidChng.exe 1024x768x32@85 -q" /falso, like the 3rd or 4th thing is trying to remove a folder...REG ADD %KEY%\021 /V 3 /D "RD /S /Q %systemdrive%\OfficeTEMP" /fit actually comes back with an error saying it cant find the program 'RD'.. its as though windows doesnt recognize it as a native command.I know Ive had issues with VBScripts where because its so early in the runonce and windows hasnt 'fully booted' that many vb commands dont work, perhaps this is something like that issue?any ideas?Thanks guys.
DLF Posted December 27, 2004 Posted December 27, 2004 Cant advise on 1st issue as dont use it but re 2nd issue, cant you move that to your cleanup cmd instead?
vcBlackBox Posted December 27, 2004 Posted December 27, 2004 The reason why RD and other DOS command like copy, and MD won't work in RunOnceEx like that is because they are DOS internal commands. You'll need to specify the command interpreter first (CMD /C). In your case.REG ADD %KEY%\021 /V 3 /D "CMD /C RD /S /Q %systemdrive%\OfficeTEMP" /fI'm not familiar with 1395VidChng.exe program. I think it has something to do with your 1024x768x32@85 argument.Try enlosing that with quotes. REG ADD %KEY%\000 /V 1 /D "1395VidChng.exe \"1024x768x32@85 -q\"" /f
gunsmokingman Posted December 27, 2004 Posted December 27, 2004 Try This It A Edit Version Of My CleanUp Template.I have It Set To Remove OfficeTemp, And Delete This Vbs File. Cut And Paste This And Save As As OTCleanUp.cmdecho offclsmode con: cols=55 lines=3COLOR F3TITLE REMOVE OfficeTEMP > %Systemdrive%\CleanUp1.vbs echo Dim Garbage>> %Systemdrive%\CleanUp1.vbs echo set Garbage = (CreateObject("Scripting.FileSystemObject"))>> %Systemdrive%\CleanUp1.vbs echo msgbox "Starting Clean UP?",vbokonly+48,"Clean Up">> %Systemdrive%\CleanUp1.vbs echo wscript.sleep 500>> %Systemdrive%\CleanUp1.vbs echo Garbage.DeleteFolder ("%Systemdrive%\OfficeTEMP")>> %Systemdrive%\CleanUp1.vbs echo Delete=("%Systemdrive%\OfficeTEMP\")>> %Systemdrive%\CleanUp1.vbs echo wscript.sleep 500>> %Systemdrive%\CleanUp1.vbs echo Garbage.DeleteFile ("\CleanUp1.vbs")>> %Systemdrive%\CleanUp1.vbs echo wscript.sleep 500>> %Systemdrive%\CleanUp1.vbs echo Delete=("\CleanUp1.vbs")start /w %Systemdrive%\CleanUp1.vbsECHO.ping -n 2 127.0.0.1>nul | set/p = Processing Final Clean Up!exit
mattofak Posted December 27, 2004 Posted December 27, 2004 The answer is quite simple really, for you first probREG ADD %KEY%\000 /V 1 /D "%windir%\system32\1395VidChng.exe" 1024x768x32@85 -qand for your second prob, this should work...REG ADD %KEY%\021 /V 3 /D "%windir%\system32\cmd.exe" RD /S /Q %systemdrive%\OfficeTEMPthe reason is, windows needs the program in qoutes in order to find it, and then any args come after the end qoute...
Alanoll Posted December 27, 2004 Posted December 27, 2004 REG ADD %KEY%\000 /V 1 /D "%windir%\system32\1395VidChng.exe" 1024x768x32@85 -qREG ADD %KEY%\021 /V 3 /D "%windir%\system32\cmd.exe" RD /S /Q %systemdrive%\OfficeTEMP Those won't import correctly. Bare in mind, that REG is the program for this instance, and the quoted strings are imported into the registry. If it isn't surrounded in quotes, it won't get imported.
ankap Posted December 27, 2004 Posted December 27, 2004 I think u dont need first one u can specify resolution in winnt.sif [Display]BitsPerPel = 32Vrefresh = 85Xresolution = 1024Yresolution = 768For second put it in your cleanup.cmd if u have or put this kind.REG ADD %KEY%\021 /V 3 /D "cmd /c RD /S /Q %systemdrive%\OfficeTEMP" /f
durex Posted December 28, 2004 Author Posted December 28, 2004 thx for the help guys... Ill give it another shot
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