Can't run vbs script

(imported topic written by jpeppers91)

I’ve been trying to run this script and I can’t seem to get it to work.

prefetch Computerrename.tmp sha1:fdf04c4d45210f8fcf12635ebc89cdeade3e29dc size:433

extract Computerrename.tmp

runhidden “{pathname of system folder}\cscript.exe” “{((pathname of client folder of current site) & “__Download\rename_computer.vbs.vbs”)}”

I’ve tried this with this iteration…

runhidden cscript /e:vbs rename_computer.vbs

Any ides? I found many posts with suggestions but nothing works.

(imported comment written by Tim.Rice)

I don’t use cscript very often, so pardon my questions …

I assume you included an inadvertent typo in your runhidden command. Did you really intend to execute the file called
? (note the duplicate .vbs extension).

i notice that the alternate iteration you listed includes the directive to specify /e:vbs, but you don not include this directive in your runhidden with the variable replacement.

Have you tried the command …

runhidden "{pathname of system folder}\cscript.exe" "/e:vbs {((pathname of client folder of current site) & "\__Download\rename_computer.vbs")}"

(imported comment written by jpeppers91)

I failed to remember that the BES client runs as system and doesn’t have access to AD. I’m going to have to use netdom do fix all these.

(imported comment written by SergioBenavides)

This is the command we use to run a VB script .

waithidden cscript.exe “C:\temt\MysampleVBS”

continue if {exit code of action = 0}