IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2013-10-08T13:27:51Z by 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
prefetch RunAsCurrentUser- sha1:ee47505ebfb2790b9da8a20ed70e67158e9753d0 size:342528

//extract vbs script
extract somescript.vbs.tmp

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

// 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

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

move __Download\RunAsCurrentUser- 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.