Problems getting executables to run from sub folders

(imported topic written by scott.craddolph91)

I have several legacy application I need to transfer to BigFix - I’m having problems once I upload my folder which has subdirectories for different parts of the program to execute - in my _download directory on my test machine I have the following:

gs800w32 (This is the first directory)

gsv43w32 (This is the second directory)

if i were to run these from my c: drive the command (dos) would be

c:\gs800w32\gs800w32.exe and

c:\gsv43w32\gsv43w32.exe respectively.

In BigFix if I run

wait cmd.exe /c \gs800w32\gs800w32.exe

wait cmd.exe /c \gsv43w32\gsv43w32.exe

I get a failure - how would code be written to do the switch to the subfolder to run the executable?

Scott C.

(imported comment written by BenKus)

Hi Scott,

You want them to be in these locations permanently?

Try this:

waithidden cmd.exe /C mkdir "C:\gs800w32"
waithidden cmd.exe /C mkdir "C:\gsv43w32"
copy __Download\gs800w32.exe "C:\gs800w32\gs800w32.exe"
copy __Download\gsv43w32.exe “C:\gsv43w32\gsv43w32.exe”

waithidden cmd.exe /C "C:\gs800w32\gs800w32.exe"
waithidden cmd.exe /C “C:\gsv43w32\gsv43w32.exe”

Otherwise, if you just want to run them without copying them permanently, you would do:

waithidden cmd.exe /C "__Download\gs800w32\gs800w32.exe"
waithidden cmd.exe /C “__Download\gsv43w32\gsv43w32.exe”

Ben

(imported comment written by scott.craddolph91)

I used the following in my code:

waithidden cmd.exe /C “__Download\gs800w32\gs800w32.exe”

waithidden cmd.exe /C “__Download\gsv43w32\gsv43w32.exe”

Tested the job and Bigfix reported the job as complete but the software still did not load - I checked the _ download directory which for my group shows up in C:\Program Files\BigFix Enterprise\BES Client__BESData\CustomSite_DCMA_NMC_Software__Download - the files are there - if you manually run the .exe’s from the _download they work. Where am I going wrong here.

Scott C.

(imported comment written by lmpymilk91)

Have you tried something like this?

This will set the starting path for the exe and keep the path when the file runs.

waithidden cmd.exe /C start /D"__Download\gsv43w32" /I “gsv43w32.exe”

waithidden cmd.exe /C start /D"C:\gsv43w32" /I “gsv43w32.exe”

(imported comment written by BenKus)

Do you have an extra directory in there?

Does this work?

waithidden cmd.exe /C “__Download\gs800w32.exe”

waithidden cmd.exe /C “__Download\gsv43w32.exe”

Ben

(imported comment written by scott.craddolph91)

Everything worked last night - my co-worker looked at the code and I inadvertently had “/c” when it should have been “/C”. Thanks all for assistance :slight_smile:

2 posts were split to a new topic: How do you use escape characters?