ForensiT Homepage
Forum Home Forum Home > ForensiT Support > Domain Migration
  New Posts New Posts RSS Feed - Migration of french PC
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Migration of french PC

 Post Reply Post Reply
Author
Message
zmad View Drop Down
Newbie
Newbie


Joined: 04 Nov 2009
Location: Canada
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote zmad Quote  Post ReplyReply Direct Link To This Post Topic: Migration of french PC
    Posted: 03 Feb 2010 at 6:17am

Hi,

 I tried to join the domain and migrate profiles of a French PC (OS: XP French) with migrate.exe...but I had an error: THIS SCRIPT REQUIRES WINDOWS SCRIPT HOST 5.6

It fails in Migrate.vbs in the following routine:

'Check WSH version

If not CDbl(WScript.Version)>=5.6 then

MsgBox "This script requires Windows Script Host 5.6", vbCritical, "Script Error"

WScript.Quit

End If

And the version in French has a different digit grouping; ex:

German:"1.234,9" or French "1 234,9" style digit grouping

 

My question is what the best workarround to fix this situation. OUR SCRIPT HOST VERSION IS 5.7

Thank you

Regards,

Back to Top
Support View Drop Down
Moderator Group
Moderator Group


Joined: 09 Nov 2006
Location: United Kingdom
Status: Offline
Points: 1844
Post Options Post Options   Thanks (0) Thanks(0)   Quote Support Quote  Post ReplyReply Direct Link To This Post Posted: 03 Feb 2010 at 6:56am

Hi,

Yes you are quite right. The Windows Scripting Host (WSH) is implemented in English, even on a French language machine. So when you ask WSH for its version number it returns ‘5.6’ not ‘5,6’
 
The script uses the CDbl function to convert the version number string to a number, but on a French language machine ‘5.6’ is not a number (‘5,6’ is) so it falls over with a  “Type incompatible” error. (Or just goes to the next line if not debugging.)
 
The answer is to convert the version number returned by WSH to the French language format before you check it. You need to replace the lines
 
'Check WSH version
If not CDbl(WScript.Version)>=5.6 then
...etc...
 
With something like:
 
'Check WSH version
Dim version
If GetLocale=1036 Then
               version=Replace(WScript.Version, ".", ",")
Else
               version=WScript.Version
End If
 
If not CDbl(version)>=5.6 then
... etc ...

Note that the locale version is important: 1036 is the locale number for France, it will be different for, say, Canada. To check which locale your French language machines are set up for just create a .vbs file with this line:
 
MsgBox GetLocale

Of course, if you are confident that all your machines are running 5.7, you can just delete this check altogether.

 


Edited by Support - 03 Feb 2010 at 6:57am
Back to Top
zmad View Drop Down
Newbie
Newbie


Joined: 04 Nov 2009
Location: Canada
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote zmad Quote  Post ReplyReply Direct Link To This Post Posted: 03 Feb 2010 at 7:56am
OK! since I run the silent version Migrate.exe for the migration, Do I need when I change the migrate.vbs to generate the migrate.exe?
Thanks
Back to Top
Support View Drop Down
Moderator Group
Moderator Group


Joined: 09 Nov 2006
Location: United Kingdom
Status: Offline
Points: 1844
Post Options Post Options   Thanks (0) Thanks(0)   Quote Support Quote  Post ReplyReply Direct Link To This Post Posted: 03 Feb 2010 at 8:24am
Yes you do. Edit the migrate.vbs file, then when you're done open the "Deployment Kit" and drag and drop the migrate.vbs file on the Deployment Kit window. A new migrate.exe file will be created in the same location as the migrate.vbs script.
Back to Top
zmad View Drop Down
Newbie
Newbie


Joined: 04 Nov 2009
Location: Canada
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote zmad Quote  Post ReplyReply Direct Link To This Post Posted: 04 Feb 2010 at 6:19am
Hi I used the following code...with GetLocal() we deal with a lot of options
Cheers
 
 
'Check WSH version

Decimal= ReadReg("HKCU\Control Panel\International\sDecimal")

if Decimal = "." then

version=WScript.Version

Else

version=Replace(WScript.Version, ".", ",")

End If

If not CDbl(Version)>=5.6 then

MsgBox "This script requires Windows Script Host 5.6", vbCritical, "Script Error"

WScript.Quit

End If

'Functions

Function ReadReg(RegPath)

Dim objRegistry, Key

Set objRegistry = CreateObject("Wscript.shell")

Key = objRegistry.RegRead(RegPath)

ReadReg = Key

End Function

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.

This page was generated in 0.063 seconds.