Hi
I'm running composer and linked clones. I want to be able to use a script when a new machine has been clond. I have a VBS script and a Bta-file on the parent image. This is the content of the BAT file:
echo off
cls
cscript c:\windows\addcomputer.vbs
I have attached a PIC from the pool configuration in Vmview Manager. The script doesn't run when a new machine is cloned.
When a new machine is ready, I can log on to it and run the BAT file. Then everything works fine.
Any suggestions?
You must use only the post synchronisation script.
Now here is the trick.
The post synchronosation script runs only the first line in your BAT file. Since the first line is Echo off, it will only run this.
To solve this, you can do the following:
- Put only your vbs into the bat file OR
- Create a second bat file that contains all your actions and run the second bat file from the first bat file. In the post synchronisation script, you use the first bat file.
Bart
If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!
does the script resist in the virtual machine at C:\windows?
try to add somethin like: echo test >c:\test.txt to try if it is executed ....
Don't forget to award the points if this answer was helpful for you.
Blog:
Hmm, strange. When I do Echo test>c:\test.txt in my BAT file it executes. But When I want to run my VBS script from the BAT file it does not execute
Are you using cscript.exe to call it from the batch?
Sent with my BlackBerry
Yes
Please could you provide the complete path to the cscript.exe in the script ... c:\windows\....
Regards,
Christoph
Don't forget to award the points if this answer was helpful for you.
Blog:
In your addcomp2.bat, please try to put cscript.exe instead of cscript (without .exe) and test it?
Bart
If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!
hi,
I am using .bat file for Post synchronization script, i have added path C:\scripts\test.bat for Post synchronization script. script doesn't worked. but when i run script manually it is not working, if i run it as "run as a administrator" it works. what command will work for Post synchronization script "run as a administrator"
Believe,
Charvo Benjamin