Flexible Security For Your Peace of Mind

Failing Specops Deploy package

(Last updated on August 2, 2018)

A customer had a problem with a App Deploy package that’s not working.
He says it works fine when executing manually with runas administrator, but it’s not working when using Specops Deploy, on a computer target.

I asked him for the package to have a look at it. He was trying to execute a script to change drive letters on a PC.

And Deploy was giving feedback : -2147467259 Unidentified Error

This is the details of the script, quite basic stuff.

Script file Diskpart_Volume_letters.cmd
Diskpart.exe /s \computernamed$SpecopsDeployDisk_lettersassign_letters.txt
File: Assign_Letters.txt

Select disk 1
select volume 2
assign letter=V
Select disk 2
select volume 3
assign letter=W
Select disk 3
select volume 4
assign letter=X
Select disk 4
select volume 5
assign letter=Y
Select disk 5
select volume 6
assign letter=Z
Pause

When Specops Deploy / App execute a deployment, it’s done in System Context. So when the script is trying to access \computernamed$ its not doing it as the user, but as the computer account.
Normally, the computer account is not part of Administrators on \computername so it won’t have access to connect to d$.

And it’s generally a good practice to use the full path to a executable in a script file.

The solution in this case was to put both the script file and Assign_Letter.txt in the same directory on a share where the computer account has access to read.
And modify the scriptfile a little.

%windir%system32Diskpart.exe /s %SpecopsDeployExecuteDir%assign_letters.txt

That will give the full path to Diskpart.exe so we know that Windows can find the file. And it will read the assign_letters.txt file from the same directory as Diskpart_Volume_Letters.cmd is executed from (no matter if it’s downloaded or executed over the network with Deploy).

Case closed

Tags:

Written by

Aimee Ravacon

More Articles
Back to Blog