RunAsCurrentUser fails?

(imported topic written by kandiraja)

Hi,

I am composing a Task to download a file from a shared drive and the executing the same file. I have a vbscript inside my Task to download the file from share and it works flawless.

I am trying to do these following 2 statements at the end of my Task.

wait cmd /c cscript c:\temp\VBWCCopy.vbs

wait __Download\RunAsCurrentUser-2.0.3.1.exe --w --q cmd.exe /K C:\temp<myCmdFile>.cmd

and I am trying to run this from a QNA tool action window on the machine. For some reason I always get (exit code = -1) for the second wait statement.

the other info that I can find from the QNA tool was that in the action flow that shows up at the bottom shows both of the above statement in the same line.

I am getting stuck at this point for 3 weeks now. Any inputs will be highly appreciated.

(imported comment written by jgstew)

You say “QNA tool”, are you using the Fixlet Debugger?

I would also recommend testing this through the console as the way these things actually work will differ between the fixlet debugger and the console. Using the Fixlet debugger is great to start, but it is not indicative of what will happen through actions in the console.

(imported comment written by Renehasp)

How do you test through the console? Is there a guide or are you referring to a regular command shell “cmd”?

(imported comment written by jgstew)

When I say the Console, I mean the IEM / BigFix console. You can test actions using the windows only FixletDebugger’s “action” tab, but you can also create a fixlet or task and put what you are trying to do in the actionscript and test it that way by sending it to some Testing endpoints. This is important to do once you get it working in the debugger because the environment is a bit different, particularly when it comes to user stuff.

To better test, you can use PSExec to run things from the system account, which is how IEM / BigFix works, but even that is not exactly the same.