Running an installation from a share

(imported topic written by Sharonbi691)

Hi,

I have tried to deploy an installation from a share in the format of \comp_name\share.

however, no matter how i tried to do it, it failed.

here is how i tried it:

  1. waithidden cmd.exe /C “\comp_name\share\filename.exe /FLAG1 /FLAG2”

  2. waithidden cmd.exe /C \comp_name\share\filename.exe /FLAG1 /FLAG2

  3. created a batch file on the local drive c, looks like that:

@echo off

cls

\comp_name\share\filename.exe /FLAG1 /FLAG2

exit

It works fine if I run it locally. when I try using bigFix, it fails.

this is how i tried:

  1. wait C:\FileName.bat

  2. waithidden cmd.exe /C C:\FileName.bat

Any help would be appreciated!

(imported comment written by SystemAdmin)

The BES Client runs as the system account on computers and therefore does not have an associated user when it attempts to connect to a network share location. I suspect that you are having permission problems because when you run your script locally it uses your local user credentials to access the share point.

To get around this, you may need to use a Null Session Share which will allow anyone access to the files.

This article seems to describe how to set up a null session share for office patches but it should be relevant for you as well.

http://support.bigfix.com/bes/misc/null_session_share.html

(imported comment written by Sharonbi691)

thanks, I have succeeded running it without creating a null share,

however, I want to redirect the output to a file, and it does not work.

wait C:>RunAsCurrentUser.exe cmd.exe /C “\share\file.exe -oid 1.1.1.1111.1.1.1.101.1.3 >> c:\certs.txt”

wait C:>cmd.exe /C RunAsCurrentUser.exe “\share\file.exe -oid 1.1.1.1111.1.1.1.101.1.3 >> c:\certs.txt”

it creates the file but it remains empty. the output stays in the cmd window.

(same when running it straight on the local computer. if i run it without RunAsCurrentUser locally it works fine)

without the cmd.exe /C , it does not work at all…

any suggestions?

(imported comment written by jessewk)

instead of >> try either of these:

1>

Not sure if that will work, but worth a try.

([imported comment]( written by Sharonbi691)

didn’t work.

thanks anyway…

the problem is with RunAsCurrentUser command.

In order to bypass using it, I copied the file from the share locally and ran it locally without RunAsCurrentUser (same syntax as above) and it worked.

It is a little problematic when you need to run installation with relative addressing in that format from a share,

because you cannot download/copy the files to your local HD and run it from there (unless you preserve the tree)That was my original problem, and I did not find a solution for that yet…

combining RunAsCurrentUser with running a file from a share just does not work properly…