[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

02/04/2008 at 06:50AM PST, ID: 23134867
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

VB Script -  Fails full execution first run, prompts empty box seconond rum

Asked by Singnetsvc in VB Script, Windows Batch Scripting

Tags: VB Script

Hi All

I am currently working on a online avaliable script which takes a shadow backup of virtual images attached to virtual server. My Issue is that the script does not run full function first attempt, but displays an empty box with an OK botton on second attempt.

The script creates two windows command line files, if they dont exist on first run, the second half of the script fail to run. If they do exist, a bocx with an OK button appears whcih must be pressed in order to have the script continue and complete.  My issue is that i need to identify what is causing the empty box and how do i get rid of it so that teh script can complete.

The code that i believe is having the issue is below

Regards, Alan



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
Set objVM = Nothing
 
' Create Shadow copy of VM drive
oExCmd.WriteLine "vshadow.exe -script=setvar1.cmd -p d:"
oExCmd.WriteLine "call setvar1.cmd"
oExCmd.WriteLine "vshadow.exe -el=%SHADOW_ID_1%,x:"
oExCmd.Close
Result = objShell.run(sExCmd,vbMinimized, TRUE)
 
'BOX APPEARS HERE'
 
' Start VM machine up from saved state
For each objVM in virtualServer.VirtualMachines
    'See if vm machine is Saved. If so then resume
    If objVM.State = 2 then
        'Start virtual machine
            objVM.Startup
    End If
Next
Set objVM = Nothing
WScript.Sleep 10000
 
 
If Result = 0 then
'Loop through all vm machines
    For each objVM in virtualServer.VirtualMachines
        'See if vm machine is running. If so copy shadow backup of vm disk drives
        If objVM.State = 5 then
 
            'Copy virtual hard disks and undo disks
            For each vhd in objVM.HardDiskConnections
                MyArray = Split(vhd.undoHardDisk.file,"\")
                Filename = MyArray(Ubound(MyArray))
                SourceName = "x" & Right(vhd.undoHardDisk.file,Len(vhd.undoHardDisk.file)-1)
                wscript.echo vhd.undoHardDisk.file
                wscript.echo SourceName
                objFSO.CopyFile SourceName,DestBackupDir & Filename
                MyArray = Split(vhd.HardDisk.file,"\")
                Filename = MyArray(Ubound(MyArray))
                SourceName = "x" & Right(vhd.HardDisk.file,Len(vhd.HardDisk.file)-1)
                objFSO.CopyFile SourceName,DestBackupDir & Filename
            Next
 
        End If
[+][-]02/04/08 08:06 AM, ID: 20815576

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/04/08 09:21 AM, ID: 20816212

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/04/08 09:23 AM, ID: 20816231

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/04/08 12:43 PM, ID: 20817773

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02/05/08 01:29 AM, ID: 20821666

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Windows Batch Scripting
Tags: VB Script
Sign Up Now!
Solution Provided By: Singnetsvc
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20090824-EE-VQP-74 / EE_QW_2_20070628