/build/static/layout/Breadcrumb_cap_w.png

How to use the RunOnce Task during a scripted install

I need to run a couple scripts after the Post-installation tasks are completed and the computer reboots (scripted install).  I created a Run Once Task as per instructions but can't figure how to get it to work?  The last Post-install task I have is loading IE9 with a Restart afterward.  After the computer boots back up I need the K2000 to run a couple scripts and done. What am I doing wrong?


0 Comments   [ + ] Show comments

Answers (2)

Posted by: dugullett 12 years ago
Red Belt
1

You followed the instructions from this link?

http://www.itninja.com/question/k2000-postinstall-task-converter

What are your midlevel and post tasks? If you uploaded those scripts as an application then make sure you are calling it in your command line. Not just "script.cmd".


Comments:
  • I guess that is where I'm confused (not the first time). The only mid-level task is the "run once" task i created per steps 2-4 of instructions. The Post install tasks I have are Adobe reader, Flash, Java, Office 2010 and IE9. IE9 is the last task so I have it set to reboot because the scripts I want to run depend on the other items being fully installed. How does the mid-level "run once" task tell the k2000 to continue installing something else? - rjobe 12 years ago
    • On the scripts you are running are they .bat scripts? Did you add a new BAT Script, or did you upload them as a "New Application"? After the reboot is the directory C:\Kace still there? If so is there anything in that directory? - dugullett 12 years ago
  • I've got one task (App) that is a .vbs (uploaded) and the command line executes the script. The other is a .Bat executed from the command line. Yes the Kace directory is still there and populated. We have to wait till a couple of the installed programs are open the first time to complete. If we delete the files before hand we have to point to program installer location. - rjobe 12 years ago
    • If I'm understanding you correctly it sounds like that first script after the restart will run, but then stop all other post installs afterwards? Try taking some other apps and putting them right after your VB script and see if they run. It sounds to me like something is stopping your post installs from finishing.

      This link might help a little more to describe what I'm talking about. http://www.itninja.com/question/k2000-sysprepped-image-deployment-post-installation-task-problems - dugullett 12 years ago
Posted by: SMal.tmcc 12 years ago
Red Belt
0

I add the run once prior to post reboot:

start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v ipv6kill /d "reg.exe add \"HKLM\SYSTEM\CurrentControlSet\services\Tcpip6\Parameters\" /v DisabledComponents /t REG_DWORD /d 4294967295 /f"

net user installer /delete

cmd /c md "%allusersprofile%\Dell\KACE" & cmd /c move /y "%systemdrive%\KACE\k2000_deployment_info.conf" "%allusersprofile%\Dell\KACE\k2000_deployment_info.conf"

start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v kclean /d "c:\kcleanup.exe"

 
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