Jump to content


Photo

newbee problem - WScript.CreateObject fails


  • Please log in to reply
2 replies to this topic

#1 jpank

jpank

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 October 2011 - 05:58 PM

HI,

I am trying to use SmartWIM.dll with SmartWIM.vbs, which I downloaded from SmartDeploy, to take a machine image.
I get the error: smartwim.vbs(13, 1) WScript.CreateObject: Could not create object named "SmartWIM"

=====This is the content of “CreateImage.cmd” which kicks off the job====

vshadow-2008-r2-x64.exe -script=vss-setvar.cmd -exec=vss-exec.cmd c:

=====This is the content of vss-exec.cmd, which gets executed after the shadow copy is created====

call %~dp0\vss-setvar.cmd
:: Define temporary drive letter
dosdev Q: %SHADOW_DEVICE_1%
:: Try to execute some commands on the snapshot device
cscript smartwim.vbs /capture q: o:\C_driveBackup.wim "Drive C"
:: Delete temporary drive letter
dosdev -r -d q:

=====Thanks for any help on this. More details are below.

John

-----------------------------------------------------------------
I have Windows 7 Enterprise. I installed SmartWIM using the install executable that I downloaded from SmartDeploy. Windows 7 comes with wimgapi.dll in C:\windows\system32 and in c:\windows\sysWOW64.

I am basically doing what is described at http://social.techne...6-95a84ae87a70.

The following is the output of running the job. It ran in an Administrator command window. I also tried running this is a 32bit command window (C:\windows\sysWOW64\cmd.exe).


F:\RUN_DIR>dir
Volume in drive F is MYDATA
Volume Serial Number is 8A6F-42E5

Directory of F:\RUN_DIR

10/25/2011 05:54 PM <DIR> .
10/25/2011 05:54 PM <DIR> ..
10/24/2011 08:21 PM 70 CreateImage.cmd
11/30/2009 06:16 AM 7,168 dosdev.exe
01/11/2011 12:09 PM 27,386 SmartWIM.vbs
10/23/2011 05:41 PM 2,502,136 SmartWIMSetup.exe
10/19/2010 09:36 PM 347,984 vshadow-2008-r2-x64.exe
10/24/2011 08:31 PM 269 vss-exec.cmd
10/24/2011 09:28 PM 309 vss-setvar.cmd
7 File(s) 2,988,618 bytes
2 Dir(s) 464,264,097,792 bytes free

F:\RUN_DIR>createimage

F:\RUN_DIR>vshadow-2008-r2-x64.exe -script=vss-setvar.cmd -exec=vss-exec.cmd c:


VSHADOW.EXE 3.0 - Volume Shadow Copy sample client.
Copyright © 2005 Microsoft Corporation. All rights reserved.


(Option: Generate SETVAR script 'vss-setvar.cmd')
(Option: Execute binary/script after shadow creation 'vss-exec.cmd')
(Option: Create shadow copy set)
(Gathering writer metadata...)
(Waiting for the asynchronous operation to finish...)
Initialize writer metadata ...
Discover directly excluded components ...
- Excluding writer 'Shadow Copy Optimization Writer' since it has no selected co
mponents for restore.
- Excluding writer 'BITS Writer' since it has no selected components for restore
.
- Excluding writer 'MSSearch Service Writer' since it has no selected components
for restore.
Discover components that reside outside the shadow set ...
Discover all excluded components ...
Discover excluded writers ...
Discover explicitly included components ...
Verifying explicitly specified writers/components ...
Select explicitly included components ...
* Writer 'Task Scheduler Writer':
- Add component \TasksStore
* Writer 'VSS Metadata Store Writer':
- Add component \WriterMetadataStore
* Writer 'Performance Counters Writer':
- Add component \PerformanceCounters
* Writer 'ASR Writer':
- Add component \ASR\ASR
- Add component \Volumes\Volume{cbf3a1fb-cbb4-11e0-9154-806e6f6e6963}
- Add component \Volumes\Volume{b8635bc2-fab3-11e0-9f32-000acd19228e}
- Add component \Volumes\Volume{995c9911-ce76-11e0-8f8e-000acd19228e}
- Add component \Volumes\Volume{79c1a057-cc01-11e0-b03b-00241ddb14a8}
- Add component \Volumes\Volume{79c1a050-cc01-11e0-b03b-00241ddb14a8}
- Add component \Volumes\Volume{d925da37-cd57-11e0-b5c1-000acd19228e}
- Add component \Volumes\Volume{cbf3a1fc-cbb4-11e0-9154-806e6f6e6963}
- Add component \Volumes\Volume{79c1a05a-cc01-11e0-b03b-00241ddb14a8}
- Add component \Volumes\Volume{b8635bb7-fab3-11e0-9f32-000acd19228e}
- Add component \Volumes\Volume{995c990a-ce76-11e0-8f8e-000acd19228e}
- Add component \Volumes\Volume{4c4a3fdf-cbb5-11e0-ad7f-00241ddb14a8}
- Add component \Disks\harddisk3
- Add component \Disks\harddisk0
- Add component \Disks\harddisk1
- Add component \Disks\harddisk2
- Add component \BCD\BCD
* Writer 'System Writer':
- Add component \System Files
* Writer 'SqlServerWriter':
- Add component \BIRD-W7\SQLEXPRESS\master
- Add component \BIRD-W7\SQLEXPRESS\model
- Add component \BIRD-W7\SQLEXPRESS\msdb
* Writer 'Registry Writer':
- Add component \Registry
* Writer 'COM+ REGDB Writer':
- Add component \COM+ REGDB
* Writer 'WMI Writer':
- Add component \WMI
Creating shadow set {619d3687-e8c1-4dd3-9e89-95434aeda231} ...
- Adding volume \\?\Volume{cbf3a1fb-cbb4-11e0-9154-806e6f6e6963}\ [C:\] to the s
hadow set...
Preparing for backup ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Creating the shadow (DoSnapshotSet) ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Shadow copy set succesfully created.

List of created shadow copies:


Querying all shadow copies with the SnapshotSetID {619d3687-e8c1-4dd3-9e89-95434
aeda231} ...

* SNAPSHOT ID = {7a6db5f9-8c86-4079-89fd-bfe00496e22b} ...
- Shadow copy Set: {619d3687-e8c1-4dd3-9e89-95434aeda231}
- Original count of shadow copies = 1
- Original Volume name: \\?\Volume{cbf3a1fb-cbb4-11e0-9154-806e6f6e6963}\ [C:
\]
- Creation Time: 10/25/2011 5:55:13 PM
- Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy26
- Originating machine: BIRD-W7
- Service machine: BIRD-W7
- Not Exposed
- Provider id: {b5946137-7b9f-4925-af80-51abd60b20d5}
- Attributes: Auto_Release Differential

Generating the SETVAR script (vss-setvar.cmd) ...
- Executing command 'vss-exec.cmd' ...
-----------------------------------------------------

F:\RUN_DIR>call F:\RUN_DIR\\vss-setvar.cmd

[This script is generated by VSHADOW.EXE for the shadow set {619d3687-e8c1-4dd3-
9e89-95434aeda231}]


F:\RUN_DIR>SET SHADOW_SET_ID={619d3687-e8c1-4dd3-9e89-95434aeda231}

F:\RUN_DIR>SET SHADOW_ID_1={7a6db5f9-8c86-4079-89fd-bfe00496e22b}

F:\RUN_DIR>SET SHADOW_DEVICE_1=\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy26


F:\RUN_DIR>dosdev Q: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy26
Q:: The operation completed successfully.

F:\RUN_DIR>cscript smartwim.vbs /capture q: o:\C_driveBackup.wim "Drive C"
Microsoft ® Windows Script Host Version 5.8
Copyright © Microsoft Corporation. All rights reserved.

F:\RUN_DIR\smartwim.vbs(13, 1) WScript.CreateObject: Could not create object nam
ed "SmartWIM".



F:\RUN_DIR>dosdev -r -d q:
q:: The operation completed successfully.
-----------------------------------------------------
- Mark all writers as succesfully backed up...
Completing the backup (BackupComplete) ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)

Snapshot creation done.

F:\RUN_DIR>


--------------------------------------
--------------------------------------

SmartWIM.dll seems to have been registered OK. I un-installed and re-installed and still have the problem. Here are most of the entries in my registry related to SmartWIM:

HKCR\Installer\Products\99...99\SourceList PackageName SmartWimSetup.msi
HKCR\Interface\{guid} (Default) ISmartWIM
HKCR\Interface\{guid} (Default) _ISmartWIMEvents
HKCR\SmartWIM (Default) SmartWIM Class
HKCR\SmartWIM\CurVer (Default) SmartWIM.2
HKCR\SmartWIM.2 (Default) SmartWIM Class
HKCR\TypeLib\{guid}\2.0\0\win32 (Default) C:\Programs Files (x86)\Prowess\SmartDeploy Imaging Component\32bit\SmartWIM.dll
HKCR\Wow6432Node\CLSID\{guid} (Default) SmartWIM Class
HKCR\Wow6432Node\CLSID\{guid} (Default) C:\Programs Files (x86)\Prowess\SmartDeploy Imaging Component\32bit\SmartWIM.dll
HKCR\Wow6432Node\CLSID\{guid} ThreadingModel Apartment
HKCR\Wow6432Node\CLSID\{guid}\ProgID (Default) SmartWIM.2
HKCR\Wow6432Node\CLSID\{guid}\VersionIndependentProgID (Default) SmartWIM
HKCR\Wow6432Node\Interface\{guid} (Default) ISmartWIM
HKCR\Wow6432Node\Interface\{guid} (Default) _ISmartWIMEvents
HKCR\Wow6432Node\TypeLib\{guid}\2.0\0\win32 (Default) C:\Programs Files (x86)\Prowess\SmartDeploy Imaging Component\32bit\SmartWIM.dll
HKLM\SOFTWARE\Classes\Installer\Products\99...99\SourceList PackageName SmartWimSetup.msi
HKLM\SOFTWARE\Classes\Installer\Products\99...99\SourceList LastUsedSource n;1;C:\Users\....
HKLM\SOFTWARE\Classes\Interface\{guid} (Default) ISmartWIM
HKLM\SOFTWARE\Classes\Interface\{guid} (Default) _ISmartWIMEvents
HKLM\SOFTWARE\Classes\SmartWIM (Default) SmartWIM CLass
HKLM\SOFTWARE\Classes\SmartWIM\CurVer (Default) SmartWIM.2
HKLM\SOFTWARE\Classes\SmartWIM.2 (Default) SmartWIM Class
HKLM\SOFTWARE\Classes\TypeLib\{guid}\2.0\0\win32 (Default) C:\Programs Files (x86)\Prowess\SmartDeploy Imaging Component\32bit\SmartWIM.dll
HKLM\SOFTWARE\Classes\Wow6432Node\CLSID\{guid} (Default) SmartWIM Class
HKLM\SOFTWARE\Classes\Wow6432Node\CLSID\{guid}\InProcServer32 (Default) C:\Programs Files (x86)\Prowess\SmartDeploy Imaging Component\32bit\SmartWIM.dll
HKLM\SOFTWARE\Classes\Wow6432Node\CLSID\{guid}\ProgID (Default) SmartWIM.2
HKLM\SOFTWARE\Classes\Wow6432Node\CLSID\{guid}\VersionIndependentProgID (Default) SmartWIM
HKLM\SOFTWARE\Classes\Wow6432Node\Interface\{guid} (Default) ISmartWIM
HKLM\SOFTWARE\Classes\Wow6432Node\Interface\{guid} (Default) _ISmartWIMEvents
HKLM\SOFTWARE\Classes\Wow6432Node\TypeLib\{guid}\2.0\0\win32 (Default) C:\Programs Files (x86)\Prowess\SmartDeploy Imaging Component\32bit\SmartWIM.dll

#2 Erik

Erik

    Advanced Member

  • Administrators
  • PipPipPip
  • 133 posts
  • Gender:Male

Posted 27 October 2011 - 03:31 PM

Hello There,

It looks like the problem is caused because the .cmd script is running with the 64bit command prompt. As the SmartWIM.dll that is in the installer form SmartDeploy.com is 32 bit you will need to use the SysWOW64\CMD.exe. In your script you could simply change SmartWIM.vbs to run as "C:\Windows\SysWOW64\CMD.exe /c cscript.exe [path to SmartWIM.vbs]".

Alternately if you would like to contact Support@SmartDeploy.com we can get you a copy of the 64 bit SmartWIM.dll which you can register and run normally.

Thanks,
Erik
SmartDeploy Enterprise: Systems Engineer

#3 jpank

jpank

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 28 October 2011 - 10:32 AM

Erik,

That was exactly the problem. I made the change you suggested and it created the image with no problems. I had earlier tried running the command that starts the job in a 32bit command window, but I neglected the fact that the VBS script would get run by a new 64bit instance of cmd.exe.

Thanks a lot,
John




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users