Deploying a folder to local system as K2000 PostInstall job
I'm trying to deploy Eclipse to a bunch of systems as a K2000 Post Install task. It is already a zip file. I assumed I could use copy or xcopy to get the folder and all its files copied to the directory of my choosing, but I'm not having much luck. Anyone know how to do this? Any examples would be most helpful. Thanks!
Answers (6)
I copy directories and files as a mid level task all the time. I map the W: drive as part of my KBE. You can add the line below to the task and change the xcopy command to x:, also if you are coping a lot of files or doing multiple copies put a "start /wait" in front of xcopy.
net use X: \\server\share password /user:domain/username
Comments:
-
As dugullett mentioned you are using an app I am using a bat script. Call your bat file so it returns to the kace flow after the installeclispe.bat terminates. could you list your eclispe.bat? try: call installeclkispe.bat in the command line - SMal.tmcc 12 years ago
-
start /wait xcopy eclipse\* "C:\Program Files (x86)\Eclipse\" /s /i
xcopy eclipse.lnk "C:\Users\Public\Desktop"
xcopy eclipse.lnk "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\" - tdickert 12 years ago
-
Thanks, I'll give this a shot and report back. I am coming from using Altiris DS and am unfamiliar with "call" (never had to use it or saw it mentioned before now). - tdickert 12 years ago
-
I rememeber using "if""Then" statements then doing a "call" or "gosub" then having a "return" at the end of the sub routine. But that was DOS basic and batch file days. - SMal.tmcc 12 years ago
-
Adding Call worked fantastic. Thank you both for your help! - tdickert 12 years ago
also create a link and place on server and copy it to c:\users\public desktop or C:\ProgramData\Microsoft\Windows\Start Menu\Programs if you want it to appear on the desktop or in the start menu.
Comments:
-
Thanks for the tip! But now I am having another issue. None of the post-install tasks scheduled after my Eclipse copy-task will run. I have the files zipped up with this bat file:
start /wait xcopy eclipse\* "C:\Program Files (x86)\Eclipse\" /s /i
xcopy eclipse.lnk "C:\Users\Public\Desktop"
xcopy eclipse.lnk "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\"
exit - tdickert 12 years ago-
Are you importing this bat as an app, or adding "new batch script"? If you are uploading it as an app make sure to "call" the bat in the command line. - dugullett 12 years ago
-
Thanks did not give that a thought, I just assumed it is a bat script like the screen shot I provided - SMal.tmcc 12 years ago
-
Do not use exit in your batch file - SMal.tmcc 12 years ago
-
When I first wrote setup the bat file I didn't have the exit, but I also can't remember if I had the start /wait in there. I'll give it a shot and let you know. - tdickert 12 years ago
-
The start /wait just keeps the script from getting ahead of itself. I also notice you do not specify the soucre path. - SMal.tmcc 12 years ago
-
When I removed the Exit from the bat file, it no longer runs the task at all (does not copy the files down) but it does skip the task and completes the rest of the post install tasks. Very strange. - tdickert 12 years ago
-
where are you copying the files from? The task you created is it a mid level (k2000) bat script? - SMal.tmcc 12 years ago
-
See screenshot above. Inside the Zip file is a folder named "eclipse", the .lnk, and the bat file. - tdickert 12 years ago