/build/static/layout/Breadcrumb_cap_w.png

Copy Signature template to %appdata%\Microsoft\Signatures

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

Answers (7)

Posted by: holcomb36 11 years ago
Senior White Belt
1

I

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

Comments:
  • Nothing in the folder even though log says success. - holcomb36 11 years ago
    • try taking the space out of the name - SMal.tmcc 11 years ago
  • could you post the xml file contents
    170-1359053863_expanded.xml and/or 170-1359053863.xml - SMal.tmcc 11 years ago
Posted by: AbhayR 11 years ago
Red Belt
1

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\config\systemprofile\AppData\Roaming

C:\Windows\system32>ECHO %USERPROFILE%

C:\Windows\system32\config\systemprofile

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

 


Comments:
  • yes I am running as user logged in to console. - holcomb36 11 years ago
Posted by: holcomb36 11 years ago
Senior White Belt
0

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.

Posted by: holcomb36 11 years ago
Senior White Belt
0

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



Comments:
  • 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%? - SMal.tmcc 11 years ago
    • are you running this online? - SMal.tmcc 11 years ago
  • yes just a typo the \ is before appdata and yes I am running it online. - holcomb36 11 years ago
    • not sure what zip program kace uses on the kbox to run the unzips with
      almost sounds like a bug with the call - SMal.tmcc 11 years ago
  • 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. - holcomb36 11 years ago
Posted by: holcomb36 11 years ago
Senior White Belt
0
  <?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" />
  </dependencies>
  <execute disconnected="false" logged_off="false" />
  </config>
- <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 />
  </on_verify_failure>
  </verify>
  </compliance>
  </kbot>
  </kbots>

Comments:
  • I have since fixed the typo in dependency - holcomb36 11 years ago
  • 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 - SMal.tmcc 11 years ago
Posted by: jdornan 11 years ago
Red Belt
0

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

 

Posted by: SMal.tmcc 11 years ago
Red Belt
0

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


Comments:
  • since %appdata% is an user variable you have to run your scripts as users. - SMal.tmcc 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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