Jump to content











Photo
* * * * * 1 votes

pe2 - Windows PE 2.0 from WAIK 1.0


  • Please log in to reply
30 replies to this topic

#26 paraglider

paraglider

    Gold Member

  • .script developer
  • 1743 posts
  • Location:NC,USA
  •  
    United States

Posted 30 March 2008 - 01:27 PM

Look as though it has problems with the Vista + SP1 / W2008 AIK. oscdimg has moved to Tools\x86. Also get many vbs script errors reported.

#27 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 30 March 2008 - 02:08 PM

paraglider, thanks for trying this out.

The quotes (" ") are placed around the Source Directory Path by Winbuilder when the path is selected in the Paths Tab. When no log is being generated, it does suggest that there is something wrong with the Source Directory Path. I can't think why it would not work with quotes, and work without the quotes. I moved my 'Windows AIK\' around, changed the path, and Winbuilder placed the quotes around the new paths, and they all worked.

Also worth noting that, if the path is pointing to the wrong place (though with correct syntax), pe2 will look for 'Windows AIK\Tools\PETools\x86\winpe.wim' in the Environment Path %ProgramFiles%. In this case the script would run and a log would be generated.

oscdimg has moved to Tools\x86.


Aaaaaaaah! Why did they do that!? .... something to do with 64-bit deployment from 32-bit machines?

... and the .vbs errors. Do they occur when building on a Vista Machine? .vbs not backwards compatible? Or Anti-virus unhappy and blocking the .scripts? When building with Winbuilder, the .vbs script creates shortcuts to programs known to be in the Target Directory's system32 or Windows folder, such as notepad, taskmanager, regedit, etc. Can you say what are the specific errors?

Edit: Also a .vbs script is used to unzip some of the downloaded archives.

I'll have to look into all this when I get around to upgrading to Vista and the new WAIK.

In the meantime, I think I should say that pe2 is only compatible with Winbuilder on XP, and WAIK 1.0.

Thanks for the heads up.

#28 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 30 March 2008 - 02:43 PM

In light of the above queries about pe2, I have modified my signature, and the thread's heading.

#29 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 30 March 2008 - 03:56 PM

For anyone concerned - and I would be - here are the .vbs scripts created and run by pe2. As of version 008, they are created in the same folder as the the pe2 .scripts.


Shrtcut_Script.vbs
Set Shell = CreateObject("WScript.Shell")strStartMenu = "C:\winbuilder\Target\pe2\ProgramData\Microsoft\Windows\Start Menu"strPath = chr(34) & Wscript.Arguments.Item(1) & "\" & Wscript.Arguments.Item(2) & chr(34)If Wscript.Arguments.Item(6) = "" ThenstrIcon = Wscript.Arguments.Item(1) & "\" & Wscript.Arguments.Item(2)ElsestrIcon = Wscript.Arguments.Item(6)End IfSet link = Shell.CreateShortcut(strStartMenu & "\" & Wscript.Arguments.Item(0) & ".lnk")link.TargetPath = strPathlink.WorkingDirectory = Wscript.Arguments.Item(3)link.Arguments = Wscript.Arguments.Item(4)link.Description = Wscript.Arguments.Item(5)link.IconLocation = strIconlink.WindowStyle = Wscript.Arguments.Item(7)link.Save
Note that the path to the 'Start Menu' is not hard-coded when the .vbs file is created.This .vbs creates some shortcuts during the building of pe2 which may cause problems with security features and anti-virus. The file is also copied to the pe2 build, slightly modified to point to the booted pe2's 'start menu', and run at boot-time to create shortcuts to programs on an external drive or on x:\ drive. It is also modified in pe2 to create shortcuts to command-line executables at boot-time.Most of the .vbs is derived from the writings of MS's The Scripting Guy... very droll! :tabletalk: Unzip_Script.vbs
Set Shell = CreateObject("Shell.Application")strSource = Wscript.Arguments.Item(0)strTarget = Wscript.Arguments.Item(1)Set Source = Shell.NameSpace(strSource).Items( )Set Target = Shell.NameSpace(strTarget)Target.CopyHere Source
Edit: Pasted the correct code.This .vbs comes mainly from Rob van der Woude, and is used to unzip some downloaded archives (.zip and .cab) during the building process.

I think they are harmless, but none-the-less, may be troublesome to anti-virus programs and the like.

Regards :thumbsup:

#30 paraglider

paraglider

    Gold Member

  • .script developer
  • 1743 posts
  • Location:NC,USA
  •  
    United States

Posted 30 March 2008 - 05:41 PM

Yes I am running on Vista. Here is the scripting error I am getting.I notice I am also getting a pe2ArchiveDir directory created directly in the Projects directory.

#31 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 31 March 2008 - 01:28 AM

Yes I am running on Vista. Here is the scripting error I am getting.I notice I am also getting a pe2ArchiveDir directory created directly in the Projects directory.



The location of pe2ArchiveDir is intentional. Downloaded Archives are stored there and can be shared with other versions of pe2 - so that the there is no need to download the Archives again.

Now that Nuno has granted a server for pe2, this may not be required. I'm trying to find my way here. At the moment each version's Project Directory is designated 'pe2.xxx', to distinguish the versions, and the Scripts of each version can reference Winbuilder's '%ProjectDir%\pe2ArchiveDir\'. In the future, I imagine there could be a single 'pe2' Project Directory where the pe2 scripts are updated (overwritten) by Winbuilder's Download Center. And the single 'pe2' Directory could hold the 'pe2ArchivesDir' folder, because there would be no need for different versions to share the downloaded Archives - there would be just one version of pe2.

Looking at the log, it appears that the Archive Downloads are failing, and this is the probable cause of the unzip_script.vbs errors - i. e. there is no source to unzip. I expect that the pe2ArchiveDir folder is empty. (BTW, if this is the case, the errors are less severe than I previously suspected.)

In the past, I have had some minor 'misunderstandings' with Winbuilder's WebGetIfNotExist. I'll look to see if I can implement Winbuilder's 'If,Online...', or 'If,Ping...' to detect whether or not the Scripts have the required access to the internet. Unfortunately I can't do extensive testing of downloads because I'm on a slow old phone-line DialUp for the next few days.

(BTW, I have corrected a previous post providing the .vbs code from Rob van der Woude.)

Regards and thanks :thumbsup:

...continued here.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users