Blog Posts tagged with KACE KACE

Ask a question

Install Quicktime to Windows Environment from Scripts

To Install Quicktime to a Windows environment by script, follow these steps:

  1. Create a new online Kscript under scripting.
  2. Upload the version of quicktime installer you want to deploy as a dependency.
  3. Under Policy and Job Rules, select Add to add a task.
  4. (optional) Add a verify option to verify the application is not previously installed.
  5. Under On Success, select Run a batch file.
  6. Populate the contents of the batch file with:

    QuickTimeInstaller.exe /extract
    msiexec /i "%cd%\QuickTime.msi" /passive DESKTOP_SHORTCUTS=NO
    msiexec /i "%cd%\AppleSoftwareUpdate.msi" /passive
    msiexec /i "%cd%\AppleApplicationSupport.msi" /passive

  7. Check Wait for startup and save the script.

The batch file will add itself to the dependency and the script should look something like this:

Be the first to comment

Create Desktop Shortcut via Kace 1000 Desktop Shortcuts Wizard

I used the schortcut tool to make desktop shortcuts but it wouldn't take a UNC path. So I created the shortcut using a drive letter, then edited "To edit the policy using this editor" click here. Plugged in my UNC path and it worked great.

Be the first to comment

Email Alert on ticket close

There seems to have been many people unable to get a close ticket rule to work since the 5.4 upgrade based on old rules they were using or modifying ones they found online. Below is a confirmed working ticket rule for 5.4 that will email on closing a ticket.

 

**Warning** As a precaution first run this rule WITHOUT the send an email for each result by clicking run now at the bottom of the ticket rule screen. This ensures all prior tickets are marked as sent without generating emails for all past tickets.


**************NOTIFY ON TICKET CLOSE****************************

RULE TO NOTIFY ON TICKET CLOSE AND MARK THE TICKET AS EMAIL SENT

*************************SELECT SQL****************************

select

HD_TICKET . *,

date_format(HD_TICKET.CREATED,'%b %d %Y %I:%i:%s %p') as CREATED,

date_format(HD_TICKET.MODIFIED,'%b %d %Y %I:%i:%s %p') as MODIFIED,

HD_STATUS.NAME as STATUS_NAME,

HD_STATUS.ORDINAL as STATUS_ORDINAL,

HD_IMPACT.ORDINAL as IMPACT_ORDINAL,

HD_CATEGORY.ORDINAL as CATEGORY_ORDINAL,

HD_PRIORITY.ORDINAL as PRIORITY_NUMBER,

HTC.COMMENT_LOC as CRES,

STATE,

if((datediff(DUE_DATE, now()) = 0),2,

if((datediff(DUE_DATE, now()) < 0),1,3)) as SORT_OVERDUE_STATUS,

if(unix_timestamp(TIME_OPENED) > 0,TIME_OPENED,1 << 62) as SORT_TIME_OPENED,

if(unix_timestamp(TIME_STALLED) > 0,TIME_STALLED,1 << 62) as SORT_TIME_STALLED,

if(unix_timestamp(TIME_CLOSED) > 0,TIME_CLOSED,1 << 62) as SORT_TIME_CLOSED,

if(unix_timestamp(ESCALATED) > 0,ESCALATED,1 << 62) as SORT_ESCALATED,

if(unix_timestamp(HD_TICKET.CREATED) > 0,HD_TICKET.CREATED,1 << 62) as SORT_TIME_CREATED,

if(unix_timestamp(HD_TICKET.MODIFIED) > 0,HD_TICKET.MODIFIED,1 << 62) as SORT_MODIFIED,

if(unix_timestamp(HD_TICKET.DUE_DATE) > 0,HD_TICKET.DUE_DATE,1 << 62) as SORT_DUE_DATE,

case upper(STATE)

when 'CLOSED' then unix_timestamp(HD_TICKET.TIME_CLOSED) - unix_timestamp(HD_TICKET.TIME_OPENED)

when 'OPENED' then unix_timestamp(now()) - unix_timestamp(HD_TICKET.TIME_OPENED)

else unix_timestamp(now()) - unix_timestamp(HD_TICKET.CREATED)

end as AGE,

if((length(U1.FULL_NAME) = 0),U1.USER_NAME,U1.FULL_NAME) as OWNER_NAME,U1.FULL_NAME as OWNER_FULLNAME,U1.EMAIL as OWNER_EMAIL,

if((length(U1.FULL_NAME) = 0),U1.USER_NAME,U1.FULL_NAME) as OWNER_NAME,U1.FULL_NAME as OWNER_FULLNAME,U1.EMAIL as OWNER_EMAIL,

if(U1.ID is null,'z',concat('a',

if((length(U1.FULL_NAME) = 0),U1.USER_NAME,U1.FULL_NAME))) as SORT_OWNER_NAME,

if((length(U2.FULL_NAME) = 0),U2.USER_NAME,U2.FULL_NAME) as SUBMITTER_NAME,U2.FULL_NAME as SUBMITTER_FULLNAME,U2.EMAIL as SUBMITTER_EMAIL,

if(U2.ID is null,'z',concat('a',

if((length(U2.FULL_NAME) = 0),U2.USER_NAME,U2.FULL_NAME))) as SORT_SUBMITTER_NAME,

if(U3.ID is null,'z',concat('a',

if((length(U3.FULL_NAME) = 0),U3.USER_NAME,U3.FULL_NAME))) as SORT_APPROVER_NAME,

if(APPROVAL = 'rejected','Rejected',

if(APPROVAL = 'info','More Info Needed',

if(APPROVAL = 'approved','Approved',

if(APPROVER_ID > 0, 'Pending', '')))) as APPROVAL_STATUS,

Q.NAME as QUEUE_NAME

from (HD_TICKET, HD_PRIORITY, HD_STATUS, HD_IMPACT, HD_CATEGORY)

left join USER U1 ON U1.ID = HD_TICKET.OWNER_ID

left join USER U2 ON U2.ID = HD_TICKET.SUBMITTER_ID

left join USER U3 ON U3.ID = HD_TICKET.APPROVER_ID

left join HD_QUEUE Q ON Q.ID = HD_TICKET.HD_QUEUE_ID

left join MACHINE M1 ON M1.ID = HD_TICKET.MACHINE_ID

left join HD_TICKET_CHANGE HTC on HTC.HD_TICKET_ID = HD_TICKET.ID

where HD_PRIORITY.ID = HD_PRIORITY_ID

and HTC.DESCRIPTION like '%Closed%'

and HD_STATUS.ID = HD_STATUS_ID

and HD_IMPACT.ID = HD_IMPACT_ID

and HD_CATEGORY.ID = HD_CATEGORY_ID

and ((HD_STATUS.STATE = 'closed')

and HD_TICKET.RESOLUTION not like '%Closed Email Sent')

and HD_TICKET.HD_QUEUE_ID = 1

**********************END SELECT*****************************

 

*********************EMAIL TEMPLATE***************************
 

SUBJECT:            Closure Notice for TICKET [$id]
 

EMAIL COLUMN:  SUBMITTER_EMAIL
 

EMAIL BODY:       $submitter_name,

                           Your ticket  '$title'

                           Was closed on $time_closed

                           See below

 

                           RESOLUTION DETAILS

                            ********************

                           Closed By:     $owner_name

                           Resolution:    $cres

                           Thanks for your business,

                           $owner_name

                           The Help desk Team
 

******************END EMAIL TEMPLATE**********************

 

********************UPDATE QUERY*************************
 

update HD_TICKET as T

set T.RESOLUTION = CONCAT(T.RESOLUTION,'

Closed Email Sent')

where (T.ID in (<TICKET_IDS>))
 

**********************END QUERY**************************

View comments (9)

OSx 10.8 USB boot device

 You can easily create a bootable Mac OS X 10.8 Mountain Lion installer flash drive using the instructions below.

To create your own bootable USB device using your own flash drive (note that the device must be at least 8GB or larger), follow the instructions below.

1) Download OSX Moutain Lion from the App Store It will be downloaded to your Applications folder.

 

2) Right click on “Install Mac OS X Mountain Lion” installer and choose the option to “Show Package Contents”

Show Package Contents

 

3) Inside the Contents folder, you will find a SharedSupport folder and inside the SharedSupport folder you will find the InstallESD.dmg. This is the 10.8 Mountain Lion boot disc image.

 

InstallESD.dmg

4) Copy InstallESD.dmg to another folder like the Desktop.  To do so, simply click and drag the file to the desired location while holding down the Option key.

 

5) Plug in the flash drive and launch Disk Utility (/Applications/Utilities).

 

6) Make sure the flash drive is properly formatted highlighting the flash drive at the left (make sure to select the device and not the volume shown under it) and clicking the Erase tab across the top right.  Then ensure that the Format drop-down menu is set to Mac OS Extended (Journaled) and click the Erase button.  Confirm the dialog ensuring that you want to erase the device and all information on it.

Disk Utility Formatting

 

7) Select the Partition tab on the top right.

Creating Lion Installer Partition

Using the drop-down menu for Volume Scheme, choose 1 Partition as the partition scheme.

Choosing Number Of Partitions


8)
 Highlight the partition by clicking on it in the space it is shown below the Volume Scheme drop-down and then click on Options underneath it.  Select GUID Partition Table and click OK. This will allow the Mac boot from the drive.

GUID Partition Table

You may now name the device in the Name textbox. Insure that Format is set to Mac OS X Extended (Journaled). When you have finished, click the Apply button to format the USB device.  A warning will pop-up asking if you are sure you want to partition the media.  Click the Partition button to continue.

Formatting The Flash Drive

 

9) Click on the newly created volume listed under the USB device on the left. This volume will have the name of the device you set in the previous step.  Click the Restore tab at the top right.  In the Source area click the Image… button. Select the disk image InstallESD.dmg and click open (you may also drag-and-drop the disk image into the Source area).

Restoring Image To Disk

In the Destination area, make sure that the USB device’s name is showing. If it isn’t, simply click and drag the volume from the list at the left into the destination area.  Click Restore and confirm the dialog informing you the volume will be erased.  You will be prompted to enter the admin password for your Mac and the process will begin.

Restoring Erase Contents Warning

The bootable USB device will be created and a progress bar will show the current status of the operation at the bottom of the screen.

Restoration Progress Bar

 

10 ) When the operation is complete, you can verify that the flash drive is now bootable by selecting it and clicking the Info button in the upper left corner of the Disk Utility window.  Bootable status will show as Yes.

Bootable Flash Drive Information

 

To boot from the USB device, simply hold down the Option key while your Mac is booting up. A screen will appear asking you which volume you would like to boot the system from. Click on the OS X installer USB drive and the system will boot using the USB stick. You will see faster boot speeds using the USB installer compared to a DVD installer disc.

View comments (2)

Using copy command in your K1000 scripts

When you try to use the copy/xcopy command in a bacth included as a dependencay in your script you will get a silent failure.

No error returned

No file copied

I get questions about this several times a week.

The solution?


Instead of :
xcopy C:\Programdata\Dell\Kace\Kbox\path\kbot\package\file.ext  %userprofile%\Desktop\

Use the following instead:
start /wait xcopy C:\Programdata\Dell\Kace\Kbox\path\kbot\package\file.ext  %userprofile%\Desktop\

This also works with other commands that have issues running from withing the Scripting enviroment in KACE because they try to execute before the script releases control of the files they are trying to manipulate.

Give it a try.

Be the first to comment
Showing 1 - 5 of 29 results

Top Contributors

Talk About K1000 Reporting