Actions after reboot

(imported topic written by rdamours91)

I want to be able to copy a qbw.ini file… if it exists on the root of C: to C:\Program Files\Intuit\QuickBooks 2007 folder after the setup runs.

Is it as simple as putting the copy in after the setup.exe as the setup does a forced reboot?

download http://bigfix.epsb.ca:52311/Uploads/221d7689ade99944e9fdbf28213ddc26cfec0da5/bigE19.tmp

continue if { (size of it = 520773710 and sha1 of it = “221d7689ade99944e9fdbf28213ddc26cfec0da5”) of file “bigE19.tmp” of folder “__Download”}

extract bigE19.tmp

dos xcopy /y __Download\FakeReg.html “C:\Program Files\Intuit\QuickBooks 2007\Components\Services”

dos xcopy /y __Download\brand_quickbooks.gif “C:\Program Files\Intuit\QuickBooks 2007\Components\Services”

dos xcopy /y __Download\qbai_reg_tools.sys “C:\Program Files\Intuit\QuickBooks 2007\Components\Services”

wait __Download\Qbooks\setup.exe -s -f2"c:\qbooksinst2007.log"

(imported comment written by BenKus)

Hey rdamours,

It looks good. Is this not working? (note that you have double back-slashes in last line).

Ben

(imported comment written by rdamours91)

It works great actually…

I’m just wondering about the last part where I would like to copy another .ini in after the forced reboot of the setup…

Will the job continue to run anything I put in after the setup?

(imported comment written by BenKus)

It is a good question and I think it will change based on certain timing events. If the setup.exe forces the restart immediately before it finishes running, then probably the line after the setup.exe would not run. But if the setup.exe triggered a restart and waited for a bit, then it would give your copy command a chance to run.

I would think you would need to try it to know for sure.

Ben

(imported comment written by rdamours91)

The command after the forced reboot definately don’t get a chance to finish…

Other than a second job is a baseline the way to go…

(imported comment written by dgibson91)

Why not have the action do the reboot instead of the setup? This way the reboot will not happen until everything is done.

(imported comment written by rdamours91)

I had a supplied setup.iss set to me from the manufacturer for a new version…the reboot is in the .iss file.

I would prefer to have the reboot in the action…which is how I do all my installs…so I have control of the reboot process.

(imported comment written by brolly3391)

Hello rdamours,

Modify your .iss to suppress the reboot and use this action script?

download http://bigfix.epsb.ca:52311/Uploads/221 … bigE19.tmp

continue if { (size of it = 520773710 and sha1 of it = “221d7689ade99944e9fdbf28213ddc26cfec0da5”) of file “bigE19.tmp” of folder “__Download”}

extract bigE19.tmp

dos xcopy /y __Download\FakeReg.html “C:\Program Files\Intuit\QuickBooks 2007\Components\Services”

dos xcopy /y __Download\brand_quickbooks.gif “C:\Program Files\Intuit\QuickBooks 2007\Components\Services”

dos xcopy /y __Download\qbai_reg_tools.sys “C:\Program Files\Intuit\QuickBooks 2007\Components\Services”

wait __Download\Qbooks\setup.exe -s -f2"c:\qbooksinst2007.log"

if exists file “C:\qbw.ini”

delete “C:\Program Files\Intuit\QuickBooks 2007\qbw.ini”

copy “C:\qbw.ini” “C:\Program Files\Intuit\QuickBooks 2007\qbw.ini”

endif

Note that this is a BES 6.x forward script as we are using if/endif.

When you take your action you can use the post-action tab to specify how you would like the reboot to occur and you will be insured of the copy taking place before the restart.

Cheers,

Brolly