Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Recommended Posts

Hi guys,

has anyone come across this error yet ? I have started WPI over the network during a Vista WDS installation.

After WPI.hat has been called an error appears telling me that a script error has occured during execution. Since the error message is in german here´s the translation of the error:

Registry Key

"HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath" was not opened for reading.

If I click on "yes" to continue, everything runs fine.

I had a look at row 90 of the wpi.hta because that was specified in the error message but could not even relate the code there to the error message.

Any idea ?

Thanks for your help,

Alex

Share this post


Link to post
Share on other sites

Hi Kelsenellenelvian,

thanks for your quick reply.

This is what I am doing during startup:

set zone=domain.local
set share=\\domain.local\shares\AIW
set username=domain\AIW_Installer
set password=pw

set WPIconfig=path_to\config.js
set WPIoptions=path_to\useroptions.js
set WPIfolderNetwork=path_to\WPI

FOR /f "usebackq tokens=2" %%i IN (`net use * %SHARE% %PASSWORD% /user:%USERNAME% /PERSISTENT:NO^|find ":"`) DO SET DRIVE=%%i
ping -n 2 127.0.0.1>nul
if exist %DRIVE%\AIW_Base goto servermode

:servermode

REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "file" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "file" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "http" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "http" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "https" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "https" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" /V "AutoDetect" /T "REG_DWORD" /D "0" /F
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" /V "AutoDetect" /T "REG_DWORD" /D "0" /F

REG LOAD "HKU\CUSTOM" "%SystemDrive%\Users\Default\NTUSER.DAT"
REG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "file" /T "REG_DWORD" /D "1" /F
REG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "http" /T "REG_DWORD" /D "1" /F
REG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "https" /T "REG_DWORD" /D "1" /F
REG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" /V "AutoDetect" /T "REG_DWORD" /D "0" /F
REG UNLOAD "HKU\CUSTOM"

IF EXIST "%DRIVE%\%WPIconfig%" REG ADD "HKCU\Software\WPI" /V "ConfigFile" /D "%DRIVE%\%WPIconfig%" /F

IF EXIST "%DRIVE%\%WPIoptions%" REG ADD "HKCU\Software\WPI" /V "OptionsFile" /D "%DRIVE%\%WPIoptions%" /F

start "" /wait "%DRIVE%\%WPIfolderNetwork%\WPI.hta"

The first part sets the various variables.

Then, I am checking for the availability of the share and mount it as a drive.

Afterwards I am adding the domain to the intranet Zone so that I don´t get popups asking if the file is ok to install.

Then I am adding the WPI config and Options file to the registry

Then I am starting WPI from the network folder.

Everything is working fine, except for WPI showing that error message at the beginning, then it continues fine and all apps are getting installed.

The whole script is started from the setupcomplete.cmd by the way so UAC should not be a problem.

I also checked the registry while the error appears.

There is no "HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath" entry in the registry.

Any ideas ?

Thanks,

Alex

Share this post


Link to post
Share on other sites

Hmm. Never seen this one before. The line numbers are hardly ever correct. As soon as you started loading .js files they get messed up. I don't know of any specific calls to the setup key within WPI, but Kel would have to confirm that. How did you build your OS? nLite? I'm thinking this is related to your baseline OS and not WPI.

Why exactly are you adding the config and options files to the registry? You know you can add them via command line options right?

Share this post


Link to post
Share on other sites

Hi zorphnog!

How did you build your OS? nLite? I'm thinking this is related to your baseline OS and not WPI.

No, no nlite. I am not doing anything to the Vista install.wim. It is straight from a Vista + SP1 image (from MSDN). The only difference is, I am running the installation from WDS (Windows Deployment Services). If I take the same image, the same scripts (setupcomplete.cmd and all the WPI scripts) and run them "normally" from a DVD, WPI starts fine even though it is called from the network the same way.

So the difference in working vs. non working is WDS vs DVD installation.

But since the error only occurs when calling wpi.hat, it must be related to that as well somehow ? No ?

Why exactly are you adding the config and options files to the registry? You know you can add them via command line options right?

I don´t know, I used to write that script at a time where I obviously didn´t know and since it is working well I never touched it. I can try with commandline, maybe it helps with the error but I doubt it ...

Thanks for your help,

Alex

Share this post


Link to post
Share on other sites

Ah Vista! Sorry, I somehow missed that part. I see what the problem is now, as that key no longer exists under Vista. The problem exists in the core.js file in the section that determines the %CDROM% variable (lines 87 - 91):

if (cddrv=="")
{
cddrv = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath") + "\\";
cddrv = cddrv.substr(0,3);
}

The If statement should be changed to this to accommodate Vista:

if (cddrv=="" && getOSver()!="Vista")

@Kel

This is really not a good way to be determining the CD-Rom drive letter as the SourcePath value can be a CD-Rom drive, a network drive, a UNC path or an external drive that is no longer connected. I know you probably didn't write it, but I would suggest removing it all together.

Share this post


Link to post
Share on other sites

Hi !

Will try that, thanks !

Ah, and you may exclude that for Windows Server 2008 as well, not just Vista while you are at it :-)

Thanks for your help !

Alex

Share this post


Link to post
Share on other sites
@Kel

This is really not a good way to be determining the CD-Rom drive letter as the SourcePath value can be a CD-Rom drive, a network drive, a UNC path or an external drive that is no longer connected. I know you probably didn't write it, but I would suggest removing it all together.

KK DONE!!!

Share this post


Link to post
Share on other sites

Hi !

Tested the above workaround -> works ! Thanks!

I guess this will be in the next WPI version so I won´t have to change this again after an update ? :-)

Thanks for your help !

Alex

Share this post


Link to post
Share on other sites

Hi !

Sorry to say but this error is back in 6.5.1 !

Just tried it and got the same error again. I will change the relevant code in core.js again to see if it still works. Could you fix this again please for the next version ? Also it should be working on W2K8 also, so maybe also make an exception for that OS ?

Thanks,

Alex

Share this post


Link to post
Share on other sites

no need to make a version check for 08. It is the exact string and WinVer as Vista O_o... Just use Vista check. But I will get it added in anyway.

Share this post


Link to post
Share on other sites

Hi again,

thanks for the info. Now I did change the text in core.js according to the text in zorphnog´s message. Now I get a different error, actually two of them. Translated, they say: "Could not be saved: .\WPIscripts\Config.js and .\WPIScripts\windowoptions.js"

After I acknowledge those two messageboxes, WPI starts fine and continues to run fine afterwards.

Any ideas ? Did not have that problem with 6.1 :-)

Thanks,

Alex

Share this post


Link to post
Share on other sites

Use the attached WPI.hta and post what the 2 extra alert() messages say. The paths are probably not getting inhereted properly over the network.

Share this post


Link to post
Share on other sites

Hi Mark,

here´s the result!

1. First, the new Script error appears (saying that an error appeared in the script: clTheme is undefined + the URL)

2. Then the secdond messagebox and then (optionsfile)

3. The third messagebox (windowFile)

Afterwards, the 2 messageboxes mentioned above appear.

Is this enough info for you or do I have to check something else ?

Thanks for your help !

Alex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...