Jump to content

Doing stuff after taskbar + desktop have loaded


Recommended Posts

Hi. I am making an unattended xp installation disc. Please tell me if there is a way to do some tasks automatically when it is in windows with the taskbar etc. I tried GuiRunOnce but that is too early - before the desktop appears. Also, is it possible to do this without the $OEM$ folders, because OEMPreinstall is off so that I can use SATA from floppy discs successfully.

Thanks.

Link to comment
Share on other sites


Hi. I am making an unattended xp installation disc. Please tell me if there is a way to do some tasks automatically when it is in windows with the taskbar etc. I tried GuiRunOnce but that is too early - before the desktop appears. Also, is it possible to do this without the $OEM$ folders, because OEMPreinstall is off so that I can use SATA from floppy discs successfully.

Thanks.

depending on the tasks you wish to do you could create a shorcut to a .cmd file or some program in the Startup folder. Question remains what do you want to do?

Link to comment
Share on other sites

one way to do it would be to use detachedprogram in winnt.sif.

Put your copycmd.cmd and startup.cmd in the i386 folder on the CD.

the 1 after the 3_ tells setup to copy the file to the windows dir.

You can change that if needed, just check in the txtsetup.sif.

but it has to be a sub of the windows dir.

edit txtsetup.sif

[SourceDisksFiles]
bootvid.dll  = 1,,,,,,3_,2,0,0,,1,2
copycmd.cmd = 1,,,,,,3_,1,0,0,,1,2
startup.cmd = 1,,,,,,3_,1,0,0,,1,2

Add this to your winnt.sif file.

[GuiUnattended]
DetachedProgram="%windir%\copycmd.cmd"

copycmd.cmd

xcopy /Y startup.cmd "%SystemDrive%Documents and Settings\All Users\Start\startu Menu\Programs\Startup\"

copycmd.cmd will be run at t39 during setup.

Link to comment
Share on other sites

Wow! Thanks for the indepth reply, however, it doesnt work! both files do get copied to the windir thru txtsetup.sif, but startup.cmd doesnt get put in the startup folder, and obviously does not start. Any suggestions/corrections/hints are appreciated, and thanks for that guide, would have been better if it worked first time! Shame...

Thank-you!

Link to comment
Share on other sites

do it the runonce method way...

as u mentioned detached method works for u...

use that one, but instead of copy method use a registry key (run or runonceex), if u use runonceex it'll start only once, if u use run its like the startup folder (a millisecond earlier tho..). but since u wanna run only one time that doesn't matter.

So just do a reg add on the batch file or import a pre-done regfile to your needs. that should work for sure (just look out if u have spaces or placeholders in the reg command (something like %systemdrive%) these are supported by reg.exe tho (somewhere in the msfn guides was a guide for that too...))

so u would copy 2 batchfiles via detached way, execute one thru guirunonce, that one would import (or create) registry entries on HCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run (one guide would be here: http://unattended.msfn.org/intermediate/me...s/runonceex.htm or u use "REGEDIT /S REGFILE.reg", where REGFILE.reg consists of the entries that have to be added to your run key).

the path should point at the 2nd batchfile, that would be executed when the PC starts. as far as i know the HCU does support a run key and so it would startup after the pc booted. The thing i am not 100% sure is, if the HCU is working already, because ur username never logged on before, a workaround could be a batchfile executed in HKLM\...\runonce\setup, which is executed after user logs on (read here: http://www.windowsnetworking.com/kbase/Win...pLocations.html.

but its strange that the copy method doesn't work for you tho... try the registry way (even tho its complicated and sucks... :) )

regards

-T

Link to comment
Share on other sites

do it the runonce method way...

as u mentioned detached method works for u...

use that one, but instead of copy method use a registry key (run or runonceex), if u use runonceex it'll start only once, if u use run its like the startup folder (a millisecond earlier tho..). but since u wanna run only one time that doesn't matter.

So just do a reg add on the batch file or import a pre-done regfile to your needs. that should work for sure (just look out if u have spaces or placeholders in the reg command (something like %systemdrive%) these are supported by reg.exe tho (somewhere in the msfn guides was a guide for that too...))

so u would copy 2 batchfiles via detached way, execute one thru guirunonce, that one would import (or create) registry entries on HCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run (one guide would be here: http://unattended.msfn.org/intermediate/me...s/runonceex.htm or u use "REGEDIT /S REGFILE.reg", where REGFILE.reg consists of the entries that have to be added to your run key).

the path should point at the 2nd batchfile, that would be executed when the PC starts. as far as i know the HCU does support a run key and so it would startup after the pc booted. The thing i am not 100% sure is, if the HCU is working already, because ur username never logged on before, a workaround could be a batchfile executed in HKLM\...\runonce\setup, which is executed after user logs on (read here: http://www.windowsnetworking.com/kbase/Win...pLocations.html.

but its strange that the copy method doesn't work for you tho... try the registry way (even tho its complicated and sucks...  :) )

regards

-T

I was just going to mention this! :)

I use it to change my resolution and other stuff on first startup! ;)

Link to comment
Share on other sites

Wow! Thanks for the indepth reply, however, it doesnt work! both files do get copied to the windir thru txtsetup.sif, but startup.cmd doesnt get put in the startup folder, and obviously does not start. Any suggestions/corrections/hints are appreciated, and thanks for that guide, would have been better if it worked first time! Shame...

Thank-you!

There was a big error in my copycmd.cmd change it to

either

xcopy /Y startup.cmd "%ALLUSERSPROFILE%\Start Menu\Programs\Startup\"

or

xcopy /Y startup.cmd "%USERPROFILE%\Start Menu\Programs\Startup\"

Link to comment
Share on other sites

Right, I havent yet tried the new copycmd, but the reg entries dont work either - the files get put in the windir thtough txtsetup again, but it looks like the problem is DetachedProgram. Any more ideas? Ill try the new copycmd today.

Link to comment
Share on other sites

Just use Cmdlines.txt to execute the cmdfile, instead of DetachedProgram. OEMPreinstall does not stop Cmdlines.txt from executing. Cmdlines.txt will execute even without a Winnt.sif.

Link to comment
Share on other sites

Just use Cmdlines.txt to execute the cmdfile, instead of DetachedProgram. OEMPreinstall does not stop Cmdlines.txt from executing. Cmdlines.txt will execute even without a Winnt.sif.

If I under stand right I thought the problem was he wants the .cmd file or

whatever to run after the taskbar appears.

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...