midiboy Posted March 30, 2008 Share Posted March 30, 2008 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 Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted March 30, 2008 Share Posted March 30, 2008 How did you set the network path during start-up? Link to comment Share on other sites More sharing options...
midiboy Posted March 30, 2008 Author Share Posted March 30, 2008 Hi Kelsenellenelvian,thanks for your quick reply.This is what I am doing during startup:set zone=domain.localset share=\\domain.local\shares\AIWset username=domain\AIW_Installerset password=pwset WPIconfig=path_to\config.jsset WPIoptions=path_to\useroptions.jsset WPIfolderNetwork=path_to\WPIFOR /f "usebackq tokens=2" %%i IN (`net use * %SHARE% %PASSWORD% /user:%USERNAME% /PERSISTENT:NO^|find ":"`) DO SET DRIVE=%%iping -n 2 127.0.0.1>nulif exist %DRIVE%\AIW_Base goto servermode:servermodeREG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "file" /T "REG_DWORD" /D "1" /FREG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "file" /T "REG_DWORD" /D "1" /FREG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "http" /T "REG_DWORD" /D "1" /FREG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "http" /T "REG_DWORD" /D "1" /FREG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "https" /T "REG_DWORD" /D "1" /FREG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "https" /T "REG_DWORD" /D "1" /FREG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" /V "AutoDetect" /T "REG_DWORD" /D "0" /FREG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" /V "AutoDetect" /T "REG_DWORD" /D "0" /FREG 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" /FREG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "http" /T "REG_DWORD" /D "1" /FREG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\%ZONE%" /V "https" /T "REG_DWORD" /D "1" /FREG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" /V "AutoDetect" /T "REG_DWORD" /D "0" /FREG UNLOAD "HKU\CUSTOM"IF EXIST "%DRIVE%\%WPIconfig%" REG ADD "HKCU\Software\WPI" /V "ConfigFile" /D "%DRIVE%\%WPIconfig%" /FIF EXIST "%DRIVE%\%WPIoptions%" REG ADD "HKCU\Software\WPI" /V "OptionsFile" /D "%DRIVE%\%WPIoptions%" /Fstart "" /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 registryThen 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 Link to comment Share on other sites More sharing options...
zorphnog Posted March 31, 2008 Share Posted March 31, 2008 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? Link to comment Share on other sites More sharing options...
midiboy Posted March 31, 2008 Author Share Posted March 31, 2008 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 Link to comment Share on other sites More sharing options...
zorphnog Posted March 31, 2008 Share Posted March 31, 2008 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")@KelThis 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. Link to comment Share on other sites More sharing options...
midiboy Posted March 31, 2008 Author Share Posted March 31, 2008 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 Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted April 1, 2008 Share Posted April 1, 2008 @KelThis 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!!! Link to comment Share on other sites More sharing options...
midiboy Posted April 1, 2008 Author Share Posted April 1, 2008 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 Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted April 1, 2008 Share Posted April 1, 2008 Yup it is in the next version (just waiting on some danmed buttons) Link to comment Share on other sites More sharing options...
midiboy Posted June 9, 2008 Author Share Posted June 9, 2008 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 Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted June 9, 2008 Share Posted June 9, 2008 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. Link to comment Share on other sites More sharing options...
midiboy Posted June 9, 2008 Author Share Posted June 9, 2008 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 Link to comment Share on other sites More sharing options...
mritter Posted June 10, 2008 Share Posted June 10, 2008 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. Link to comment Share on other sites More sharing options...
midiboy Posted June 10, 2008 Author Share Posted June 10, 2008 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now