Topic
  • 2 replies
  • Latest Post - ‏2013-10-08T13:27:51Z by mcalvi91
mcalvi91
mcalvi91
41 Posts

Pinned topic runascurrentuser & vbs

‏2013-10-04T21:47:55Z |

We have a VBS script which we are attempting to push out that needs to run with the user's credentials but are having issues getting it to run with the runascurrentuser.exe file.  Our actionscript is below.

//get files
prefetch maxget.vbs.tmp sha1:9b8b3144fb5f302cb680623f272208449e79ff0c size:775 http://as-tem1-loc.domain.com:52311/Uploads/9b8b3144fb5f302cb680623f272208449e79ff0c/somescript.vbs.tmp
prefetch RunAsCurrentUser-2.0.3.1.exe sha1:ee47505ebfb2790b9da8a20ed70e67158e9753d0 size:342528 http://software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.3.1.exe

//extract vbs script
extract somescript.vbs.tmp

if { not exists folder "C:\temp" }
  waithidden c:\windows\system32\cmd.exe /c mkdir "C:\temp"
endif

// clean temp and other files
delete __createfile
delete c:\temp\somescript.vbs
delete c:\temp\runsomescript.cmd

// temp file to create batch file
createfile until end
c:\windows\system32\cscript.exe /nologo c:\temp\somescript.vbs > c:\temp\output.txt 2>&1
end

// move to temp folder
move __createfile c:\temp\runsomescript.cmd


move __Download\RunAsCurrentUser-2.0.3.1.exe c:\temp\RunAsCurrentUser.exe
move __Download\somescript.vbs c:\temp\somescript.vbs

// run it
waithidden c:\temp\RunAsCurrentUser.exe --w --q c:\windows\system32\cmd.exe /c c:\temp\runsomescript.cmd
 

The BES client logs shows all succeeds for the command "   Command succeeded (Exit Code=0) waithidden c:\temp\RunAsCurrentUser.exe --w --q c:\windows\system32\cmd.exe /c c:\temp\runsomescript.cmd (fixlet 5592)"

 

but the script has no output and should.  it seems that the RACU isnt functioning correct.  Any help would be appreciated. 

  • liuhoting
    liuhoting
    32 Posts

    Re: runascurrentuser & vbs

    ‏2013-10-08T07:07:55Z  

    Is this on a UAC enabled machine? I think Runascurrentuser won't work correctly if that stuff is enabled. And I think you have to change the BESClient to be in interactive mode (there should be a fixlet in the BES Support site that enables this).

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014747701

  • mcalvi91
    mcalvi91
    41 Posts

    Re: runascurrentuser & vbs

    ‏2013-10-08T13:27:51Z  
    • liuhoting
    • ‏2013-10-08T07:07:55Z

    Is this on a UAC enabled machine? I think Runascurrentuser won't work correctly if that stuff is enabled. And I think you have to change the BESClient to be in interactive mode (there should be a fixlet in the BES Support site that enables this).

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014747701

    Has the same error in XP so it is not UAC.

     

    Will check the interactive mode.