/build/static/layout/Breadcrumb_cap_w.png

Scripted installation - K2000 reboots in a middle of postinstallation task

Hi!

I have a bat-script in a postinstallation task, it`s start fine BUT K2000 thinks the installations is done and restart the computer when the scripts is running. Can I delay the restart or something ?

Many thx!

0 Comments   [ + ] Show comments

Answers (6)

Posted by: SMal.tmcc 9 years ago
Red Belt
0
can you share your bat script?

Comments:
  • net use x: \\10.102.130.18\c$

    set source=X:\Win7\PSTools /y
    mkdir c:\PSTools
    set destination=C:\PSTools
    xcopy %source% %destination%

    C:\PsTools\PsExec.exe /accepteula \\10.102.130.18 "C:\updates\cmd\DoUpdate.cmd - Swede 9 years ago
Posted by: SMal.tmcc 9 years ago
Red Belt
0
try this

start /wait net use x: \\10.102.130.18\c$

set source=X:\Win7\PSTools /y
mkdir c:\PSTools
set destination=C:\PSTools
start /wait xcopy %source% %destination%

start /wait C:\PsTools\PsExec.exe /accepteula \\10.102.130.18 "C:\updates\cmd\DoUpdate.cmd


Comments:
  • also another thing you can do since you own a k2000 is go to \\ikbox\peinst\winpe_build\amd64\windows\system32 (or x86) and get the file ksleep.exe, add that to your image and that allows you to easily put delays in your scripts (c:\temp\ksleep.exe 30) causes a 30 second delay between steps. - SMal.tmcc 9 years ago
  • Thx, first I will test start /wait commands, have made the changes now and start a new installation. Hopefully it will work now! =) - Swede 9 years ago
    • should do it, pretty sure psexec was being called before everything was copied. I have ran into that problem in the past with some of my scripts - SMal.tmcc 9 years ago
Posted by: Swede 9 years ago
Blue Belt
0
Did not work with start /wait, scripts start fine, but after about 15-20 sec computer restart and the installation is done.

Comments:
  • post your command file - SMal.tmcc 9 years ago
    • Command file? You mean my BAT script ? - Swede 9 years ago
      • the file you are calling with psexec. C:\updates\cmd\DoUpdate.cmd - SMal.tmcc 9 years ago
  • also just noticed, hopefully a typo, the double quote is missing after the .cmd call - SMal.tmcc 9 years ago
    • No, I have only have one double quote - Swede 9 years ago
      • Is a big cmd, I have upload it to dropbox. Link is: https://www.dropbox.com/s/pq7j6bm1v1v56qb/DoUpdate.cmd?dl=0 - Swede 9 years ago
      • try either removing that one or add one and see if it runs while I look at the cmd file - SMal.tmcc 9 years ago
Posted by: Swede 9 years ago
Blue Belt
0
Have add one double quote now, maybe is the command file is the problem, not the batch file ?

Comments:
  • You are right it is huge. Checking it in between image tests and I just got back from Vacation so still getting caught up, may take me a few to scan. It could be in the cmd especially with all the err checks that skip to other areas. Something could be causing it to jump to the end and miss major parts very easily - SMal.tmcc 9 years ago
    • if you run it from your machine to another manually does it work? - SMal.tmcc 9 years ago
      • Yes working good - Swede 9 years ago
Posted by: SMal.tmcc 9 years ago
Red Belt
0

also looking at network share calls from explorer should look more like


start /wait C:\PsTools\PsExec.exe /accepteula \\10.102.130.18\C$\updates\cmd\DoUpdate.cmd
Posted by: Swede 9 years ago
Blue Belt
0
Maybe I should skip call the cmd-file, and call the Updateinstaller.exe (WSUS) ?

Comments:
  • would be better. also you can call the wuauclt with the switches to have it attach to wsus and update thru it. http://www.itninja.com/question/using-wsus-as-a-post-install-task - SMal.tmcc 9 years ago
    • But I don`t find any silent switches for Updateinstaller.exe - Swede 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ