I have been tryin to copy 3 files to 3 different paths.  The command lines I have written all work in a command prompt.  When I copy them to KACE and run the script, the command prompt pops ups on the client screen but the files do not copy to thier destination. 

The three lines of script I have are:

start /wait xcopy \\(SERVERNAME)\library\software\scripts\Registry.pol c:\Windows\System32\GroupPolicy\Machine\ /E /C /I /Q /G /H /R /K /Y /Z /J
start /wait xcopy \\(SERVERNAME)\library\software\scripts\gpt.ini c:\Windows\System32\GroupPolicy\ /E /C /I /Q /G /H /R /K /Y /Z /J
start /wait xcopy \\SERVERNAME)\library\software\scripts\loudprint1-PC-printers.vbs c:\Windows\System32\GroupPolicy\Machine\Scripts\Startup\ /E /C /I /Q /G /H /R /K /Y /Z /J

I have in the script the three files as dependencies and have also tried running the directly from the kbot folder.

I have tried putting the three lines in a bat file and executing the bat file.

I have tried incasing the individual locations in quotes: start /wait xcopy "\\(SERVERNAME)\library\software\scripts\Registry.pol" "c:\Windows\System32\GroupPolicy\Machine\ /E /C /I /Q /G /H /R /K /Y /Z /J"

This is something that cannot be pushed out via Group Policy from AD.  This application is only used in select rooms and the users can login at other location that we don't want the policy in effect.

These are all Windows 7 systems.

I know I am missing something so if someone can let me know what it is I would greatly appreate it.

Thanks

PS one more thing... would like to eventually get this to run silent.

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1
drop the start  /wait

Create a zip with the 3 files, an install.bat, and a vbs file to hide the bat running.  Upload the zip as a dependency.





use this to run the kscript



http://www.itninja.com/blog/view/how-to-hide-running-a-batch-file-from-a-kscript-with-version-5-5
Answered 07/18/2014 by: SMal.tmcc
Red Belt

  • you will need to run this as local system or admin not logged on user since they have no rights to system32
    • I set up the script indentical to your instruction. I don't see any dos windows pop up. The files still do not get written to thier destinations. I have it set to run as the local administrator using Run As User: (Name) Password: (Password)
      • The bat file will run outside of KACE and it works.
      • lets dump the switches that are not needed. use just /q /y /r /h
      • On the kscript page point the mouse at the script and get the id= from the bottom of the browser page.

        On a machine that this is already pushed to go to C:\ProgramData\Dell\KACE\kbots_cache. you should have an xml file there that starts with that id.

        edit it in notepad
        look thru to xxxxxxx the admin password
        save to your desktop

        then go to
        C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\###
        and give me a screen shot of the directory.

        also can you include a screen shot of your kscript?

        if it easier for you, email all that to smal.tmcc@gmail.com
      • Got it figured out for both 32 bit and 64 bit
        change the install.bat:

        %windir%\Sysnative\attrib c:\windows\system32\grouppolicy -h -r -s
        %windir%\Sysnative\attrib c:\windows\system32\grouppolicy\*.* /s /d -h -r -s

        %windir%\Sysnative\xcopy Registry.pol c:\Windows\System32\GroupPolicy\Machine\ /q /y

        %windir%\Sysnative\xcopy gpt.ini c:\Windows\System32\GroupPolicy\ /q /y

        %windir%\Sysnative\xcopy "loudprint1-PC-printers.vbs" c:\Windows\System32\GroupPolicy\Machine\Scripts\Startup\ /q /y
Please log in to comment

Answers

0
Still nothing copied.
Answered 07/18/2014 by: adminlo
White Belt

Please log in to comment
-1
Without knowing much about Kace, if it happens to use a localservice account to handle the installation, this account will not have network access privileges hence it will not be able to access the network source.
As a test, put the files locally and try the (amended) xcopy operation via Kace with a local source and target.
A copy may require you to make a connection to the source server using NET USE and a domain account with access to this source location and then run an XCOPY operation.  It's probably much simpler to create a small installer for these three files and deploy that via KACE rather than struggling with DOS commands.
Answered 07/21/2014 by: EdT
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share