Using a DOS variable in action script

(imported topic written by jreinec1)

How can I use a DOS variable in an action script without using the DOS command?

Here is my relevance statement which is working properly to see if the share is available (names changed to protect the innocent):

exists file ("\" & (value of variable “variable1” of environment) & “\sharename\directory\installer.msi”)

The following statement does work for the action script:

wait “{pathname of system folder & “\msiexec”}” /i \server-name\sharename\directory\installer.msi /t installer.mst /quiet /norestart

I need to use an environment variable for the server name but, it does not resolve the path using the variable with the following statement

wait “{pathname of system folder & “\msiexec”}” /i \%variable1%\sharename\directory\installer.msi /t installer.mst /quiet /norestart

However, the following DOES work but leaves a dos window open while installing:

dos msiexec /i \%variable1%\sharename\directory\installer.msi /t installer.mst /quiet /norestart

I need to use an environment variable, called “variable1” for the server name. I can get it to work in command line format but I cannot get it to resolve the DOS variable when calling from an action script.

msiexec /i “\%variable1%\sharename\directory\installer.msi” /t installer.mst /quiet /norestart


(imported comment written by jessewk)

You can use this, but remember that unless your share is setup as a null session, the BES Client probably does not have access to the share because the BES Client runs as SYSTEM:

wait “{pathname of system folder & “\msiexec”}” /i “{value of variable “variable1” of environment}\sharename\directory\installer.msi” /t installer.mst /quiet /norestart

To get an idea how to adapt your action to use the BES deployment infrastructure, search the forum for ‘null session’. There are a lot of advantages to using BES instead of network shares.