VMware Horizon Community
serinfbco
Enthusiast
Enthusiast
Jump to solution

QuickPrep Post-synchronisation VBS script failed

We have VBS script for post-synchronisation script but the Agent couldn't execute it. Here the log:

INFO  Ready  -  Running the PostSync script: "C:\Windows\System32\cscript.exe C:\script\psview.vbs" with timeout: 120000

FATAL Guest  -  RunScript: Unable to execute script: 00DB2088 , error = 2

FATAL Ready  -  Failed to run PostSyncScript: "C:\Windows\System32\cscript.exe C:\script\psview.vbs"Unable to create process for the scriptError 2 (0x2): Le fichier spécifié est introuvable.

The error "Fichier spécifié est introuvable" means "File not found"

The script is present on the parent image and the path is correct. There is no issue to execute the script when logged on the machine with the exact same line :"C:\Windows\System32\cscript.exe C:\script\psview.vbs"

We follow the VMware KB 1026999 and there is no indication that VBS is not supported. The workaroud is to call a .BAT script as post-sync script. This .BAT calls the VBS script and is working. Here what this KB states:

If you use a scripting language that needs an interpreter to execute the script, the script path must start with the interpreter binary. For example, C:\windows\system32\cscript.exe c:\script\myvb.vbs.

Anyone have clues about this? Thanks

0 Kudos
1 Solution

Accepted Solutions
serinfbco
Enthusiast
Enthusiast
Jump to solution

Finally we found the resolution. It's not well indicate in the Administration guide but in the "personalisation" section in the pool parameters, there is two fields:

Script filename => put C:\windows\system32\cscript.exe

Script Parameters => put the script filename ie C:\script\psview.vbs

View attached file.

Sans titre.png

View solution in original post

0 Kudos
2 Replies
mittim12
Immortal
Immortal
Jump to solution

Do you receive the same issue trying a different VB script? 

0 Kudos
serinfbco
Enthusiast
Enthusiast
Jump to solution

Finally we found the resolution. It's not well indicate in the Administration guide but in the "personalisation" section in the pool parameters, there is two fields:

Script filename => put C:\windows\system32\cscript.exe

Script Parameters => put the script filename ie C:\script\psview.vbs

View attached file.

Sans titre.png

0 Kudos