Jump to content

Defrag in RunOnceEx


Recommended Posts


is there like another line i can add in winnt.sif after the last line of:

[GUIRunOnce]

%systemdrive%\install\start.cmd

after that i would like a defrage or setup Scheduled Tasks so defrags automanily after all the installation is done is there away to do it one or the other got to do it?

Link to comment
Share on other sites

is there like another line i can add in winnt.sif after the last line of:

[GUIRunOnce]

%systemdrive%\install\start.cmd

after that i would like a defrage or setup Scheduled Tasks so defrags automanily after all the installation is done is there away to do it one or the other got to do it?

Read the title,

Defrag in RunOnceEx

Where in there does it say GUIRunOnce?

@kyuuzo

What command are you attempting to use?

Link to comment
Share on other sites

? can i get the code to defrag the HDD plzz? i tryed the code what kyuuzo post this code:

REG ADD %KEY%\003 /VE /D "Defraging System Drive" /f

REG ADD %KEY%\003 /V 1 /D "%windir%\system32\defrag.exe %systemdrive%" /f

oh by the way i use

start /wait %system%\application\application.exe /s because it is simlpe for me

for any application that is just and example you thing you can help with the coded for this with the secript that gunsmokingman posted?

Link to comment
Share on other sites

Is it so difficult to open up a cmd window and type "defrag /?"...

defrag <volume> [-a][-f] [-v] [-?]

  volume  drive letter or mount point (d: or d:\vol\mountpoint)

  -a          Analyze only

  -f          Force defragmentation, even if free space is low

  -v          Verbose output

  -?          Display this help text

So I guess the best command would be:

REG ADD %KEY%\003 /VE /D "Defragging System Drive" /F

REG ADD %KEY%\003 /V 1 /D "DEFRAG %SystemDrive% -F" /F

Link to comment
Share on other sites

You could also use schtasks. Type at a cmd box schtasks /? to get available syntax. The Help and support centre in your startmenu will give some better info.

You could use this to schedule defrag to run once after setup.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...