When I take action using the following fixlet it fails. I can see on the target client that my netuse.vbs file gets created so I’m thinking the RunAsCurrentUser part is failing but not sure why. Any help is appreciated.
Here is the fixlet.
prefetch RunAsCurrentUser.exe sha1:ee47505ebfb2790b9da8a20ed70e67158e9753d0 size:342528 http:
//software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.3.1.exe utility __Download\RunAsCurrentUser.exe delete __appendfile delete
"C:\Program Files\BigFix Enterprise\BES Client\netuse.vbs" appendfile Dim network, drives, i, fso, WshShell, f appendfile Set fso = CreateObject(
"Scripting.FileSystemObject") appendfile Set network = CreateObject(
"WScript.Network") appendfile set WshShell = CreateObject(
"WScript.Shell") appendfile set f = fso.CreateTextFile(WshShell.ExpandEnvironmentStrings(
"%USERPROFILE%") &
"\drives.txt",True) appendfile Set drives = network.EnumNetworkDrives appendfile
for i = 0 To drives.Count - 1 Step 2 appendfile f.WriteLine drives.Item(i) &
" " & drives.Item(i+1) appendfile next appendfile f.Close copy __appendfile
"C:\Program Files\BigFix Enterprise\BES Client\netuse.vbs" delete __appendfile wait
"__Download\RunAsCurrentUser.exe" --w
"C:\Program Files\BigFix Enterprise\BES Client\netuse.vbs" delete
"C:\Program Files\BigFix Enterprise\BES Client\netuse.vbs"
Thanks for the reply. I ended up using wscript instead of cscript to avoid having the cmd window flash on the screen.
Now my action runs to completion and all execution details say complete to include creation of my drives.txt file on the client. That said the console says the action FAILED with Exit code 0. Is there a way to see why it says failed?
This may be due to what type of action you have. What is the success criteria? If you created a “fixlet” and not a “task” then the original relevance has to become invalid for the action to succeed. If its a task it merely has to run all lines without failing. You can still change this on your original fixlet by fixing the success criteria.