KACE Product Support Question

Copy Signature template to %appdata%\Microsoft\Signatures

12/07/2012 7179 views

I am trying to unzip a file into all user profiles using %appdata%\Microsoft\Signatures as the target.  All this does is create the folder in c:\Program Files\Dell\Kace.  I am using the scripting tab in the K1000, the zip file is uploaded as a dependency.  If I put in a specific users profile as a destination it works perfectly.   Is there an easy way to do this?

0 Comments   [ + ] Show comments


All Answers



Log for Test appdata on 

Started: 01/24/2013 13:57:52
Finished: 01/24/2013 13:57:53
Elapsed Time: 1 second
Status: 1

Output Log

Running as: sholcomb

Debug Log

Running kbot: runkbot 170 1359053869
Validating kbot xml
Kbot xml C:\ProgramData\Dell\KACE\kbots_cache\170-1359053863_expanded.xml, Validation Success
Kbot Config Info - Start
id=170 name=Test appdata version=1359053863 type=policy
execute disconnected=false logged_off=false
execute events
Kbot Config Info - Finish
Answered 01/24/2013 by: holcomb36
Senior White Belt

  • Nothing in the folder even though log says success.
    • try taking the space out of the name
  • could you post the xml file contents
    170-1359053863_expanded.xml and/or 170-1359053863.xml

When you run a Online KScript with the default RunAs option i.e. System Account, the script will run under system account and the path for the variables on windows 7 will be 

C:\Windows\system32>ECHO %APPDATA%


C:\Windows\system32>ECHO %USERPROFILE%


Hence, please check if the file gets unzipped to above directories or run the script as "Run as user logged in to console"


Answered 01/24/2013 by: AbhayR
Red Belt

  • yes I am running as user logged in to console.

It works perfectly when I do this using a .txt file. 


cd C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\165  (yes I change this to match the dir of the file)

copy test.txt %userprofile%\appdata\Roaming\Microsoft\Signatures


I am running as User Logged in to console.




However the files I need to copy are in a folder and are .htm .xml .png .thmx


I tried just adding the  .htm file as a dependency and doing only that file but still nothing. I get a Run Success, but nothing in the folder. Tried Zipping .htm file and doing it that way and still nothing in folder.


What I need is a folder containing 4 files and an .htm file to be placed in every users signature folder so that they all have the required Outlook Signature format.

Answered 01/24/2013 by: holcomb36
Senior White Belt

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.

But it does unzip if I put in a specific user such as C:\users\jdoe\appdata\Roaming\Microsoft\Signatures, just doesnt work for %userprofile%appdata\Roaming\Microsoft\Signatures  (I have also tried %appdata% as another user advised. 

KACE Tech suggested batch file

cd C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\165

copy test.txt %userprofile%\appdata\Roaming\Microsoft\Signatures

and it only works with a .txt file doesnt work with a .htm or .png

Answered 01/24/2013 by: holcomb36
Senior White Belt

  • overlooked kace has built in unzip in script the target should be %appdata%\Microsoft\Signatures

    is it a typo that you a missing a \ after %userprofile%?
    • are you running this online?
  • yes just a typo the \ is before appdata and yes I am running it online.
    • not sure what zip program kace uses on the kbox to run the unzips with
      almost sounds like a bug with the call
  • KACE told me to run the batch file below instead but that only works if it is a .txt it wont work for any other file. Thanks for helping.
  <?xml version="1.0" encoding="utf-8" ?>
- <kbots xmlns="http://kace.com/Kbots.xsd">
- <kbot>
- <config name="Test appdata" type="policy" id="170" version="1359053863" description="">
- <dependencies>
  <dependency name="/packages/kbots/170/New Logo.zip" checksum="985464ab2ce1ba27ec37bff4d5bc5eb6" download_url="http://kbox.pressleyridge.org/packages/kbots/170/New Logo.zip.985464ab2ce1ba27ec37bff4d5bc5eb6" />
  <dependency name="/packages/kbots/170/New Logo_files.zip" checksum="58b236eb0b86c5117da6f2df96f2d500" download_url="http://kbox.pressleyridge.org/packages/kbots/170/New Logo_files.zip.58b236eb0b86c5117da6f2df96f2d500" />
  <execute disconnected="false" logged_off="false" />
- <compliance>
- <verify on_failure="break" attempts="1">
  <on_verify_success />
- <on_verify_failure>
  <file_unzip path="$(KACE_DATA_DIR)\kbots_cache\packages\kbots\170" file="New Logo_files.zip" target="%appdata%\Microsoft\Signatures" />
  <file_unzip path="$(KACE_DEPENDENY_DIR)" file="New Logo.zip" target="%appdata%\Microsoft\Signatures" />
  <on_remediation_success />
  <on_remediation_failure />
Answered 01/24/2013 by: holcomb36
Senior White Belt

  • I have since fixed the typo in dependency
  • the file looks good. I would try a different variable in the destination path
    maybe c:\users\%USERNAME%\appdata\Roaming\Microsoft\Signatures
    that directory does already exist correct, I do not have one of those in my profiles

Do you mean shared app stat as in literally all uusers or do you mean each user as in %username%


Answered 12/08/2012 by: jdornan
Red Belt


see http://www.itninja.com/question/xcopy-via-kace1000

Answered 12/10/2012 by: SMal.tmcc
Red Belt

  • since %appdata% is an user variable you have to run your scripts as users.
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