I was doing some customization on how to set default printer.in command prompt which looks something like this :
c:\windows\system32\cscript prnmngr.vbs -t -p “account” where account is my default printer name. it work perfectly .
when i try to transfer it to fixlex , it keep on failing on attempt, then i read though the forum that i can use something like RunAsCurrentUser.exe which i have put into fixlet as such:
I have change the RunAsCurrentUser.exe into run.exe. But the same result still occur. Does anyone have any idea where did i went wrong ? Appreciate anyone who can give a helping hand.
This should leave the cmd.exe window open on the computer and it will let you debug your command further… Also, you might try to verify that you action will indeed NOT work when run as the system account using the trick here: http://forum.bigfix.com/viewtopic.php?id=1098 so that you can verify that the user account is the problem.
continue if {(size of it = 131072 AND sha1 of it = “9fd47b14aee681a6bad6579d30d6fb3fa4cc3ae3”) of file “RunAsCurrentUser.exe” of folder “__Download”}
wait __Download/RunAsCurrentUser.exe --w {pathname of system folder}\cmd.exe /C {pathname of system folder}\cscript.exe {pathname of system folder}\prnmngr.vbs -t -p “account”
the surprise part is, it works !!! but the status reports back as “fail” even though it works. is there any way i can diagnose this ??
thanks again
P.S i did tried changing
wait __Download/RunAsCurrentUser.exe --w {pathname of system folder}\cmd.exe /C {pathname of system folder}\cscript.exe {pathname of system folder}\prnmngr.vbs -t -p “account”
into this:
wait __Download/RunAsCurrentUser.exe --w {pathname of system folder}\cmd.exe /K {pathname of system folder}\cscript.exe {pathname of system folder}\prnmngr.vbs -t -p “account”
and hope the screen will pop up for diagonse, but sadly it didn’t work. Really appreciate if you could give me some advice.
If I understand you correctly, you have it working except for the fact that it reports “failed”? If so, instead of using a custom Fixlet, use a custom Task, which will report “Completed”.