XCOPY not working in KACE script works in Command prompt.
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.
Answers (3)
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
Comments:
-
you will need to run this as local system or admin not logged on user since they have no rights to system32 - SMal.tmcc 10 years ago
-
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) - adminlo 10 years ago
-
The bat file will run outside of KACE and it works. - adminlo 10 years ago
-
lets dump the switches that are not needed. use just /q /y /r /h - SMal.tmcc 10 years ago
-
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 - SMal.tmcc 10 years ago -
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 - SMal.tmcc 10 years ago