Topic: Windows7-USB-DVD-tool adding WOW to Script  (Read 2502 times)

Windows7-USB-DVD-tool adding WOW to Script
« on: December 28, 2014, 05:57:55 PM »

Prz42

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Jan 2014
  • Posts: 513
I used PC Packed to create a script for Windows7-USB-DVD-tool.  It worked fine for x86 build, but wanted to
add one file to Windows\SysWOW64, so it could work in x64.  The file is IoWrapper.dll and if I copy it to the location
it works, but the script doesn't do it. The line in the script I added doesn't execute what I need. This is the line
Code: [Select]
[Main]
Title=Windows7-USB-DVD-tool
Type=script
Author=Plugin Creator
Description=(v1.0.30.0)
Credits=http://TheOven.org
Version=001
Download_Level=2
Level=5
Selected=True
Mandatory=False
NoWarning=False
Contact=http://TheOven.org
Date=2014.12.27
Depend=
Disable=
CertifiedBy=
Certification=
HistoryNotes=
History001='Plugin Creator' http://TheOven.org/index.php?topic=178
History002=

[Interface]
pBevel1=pBevel1,1,12,4,6,133,105
pCheckBox1="Desktop shortcut",1,3,8,10,122,18,True
pCheckBox2="Start Menu shortcut",1,3,8,48,122,18,True
pCheckBox3="Quicklaunch shortcut",1,3,8,29,122,18,False
pTextBox1="Start Menu folder:",1,0,11,85,119,18,"System Tools"
Image_Software=,1,5,142,44,301,223
ScrollBox_RunFromWhere="Run from RAM",1,4,143,6,130,21,"Run from Normal","Run from RAM","Run from CD"
Button_Launch_Program=Launch,1,8,13,207,80,25,Launch_Program
pWebLabel1=HomePage,1,10,20,283,200,18,
pWebLabel2="Plugin Page",1,10,80,283,200,18,http://TheOven.org/index.php?board=9

[Variables]
%ProgramTitle%=DVD to USB
%ProgramEXE%=Windows7-USB-DVD-Download-Tool.exe
%ProgramFolder%=DVD to USB
%SetupFile%=%SetupFilex86%
%SetupFilex86%=DVD to USB.7z
%SetupFilex64%=

[Process]
Arch,x86
Echo,"Processing %ScriptTitle%..."
StrFormat,REPLACE,%ScrollBox_RunFromWhere%,"Run from ","",%Here%
If,Not,%Here%,Equal,Normal,RunFrom,%Here%
//--
Run,%ScriptFile%,Extract
//--
If,Not,ExistDir,%Target_Prog%,DirMake,%Target_Prog%
If,ExistDir,%Target_Prog%\%ProgramFolder%,Shellexecute,Hide,cmd.exe,"/C rd /s /q #$q%Target_Prog%\%ProgramFolder%#$q"
If,ExistDir,%Target_Prog%\%ProgramFolder%,Call,DirDelete,%Target_Prog%\%ProgramFolder%
DirCopy,%ProjectTemp%\TempExtractFolder\%ProgramFolder%\%ProgramFolder%,%Target_Prog%
//--

If,%SourceArch%,Equal,x64,Begin
DirCopy,"%Target_Prog%\%ProgramFolder%\IoWrapper.dll","%Target_Win%\SysWOW64",NOWARN
End

//--
//Registry
//--
If,%pCheckBox1%,Equal,True,Add_Shortcut,Desktop
If,%pCheckBox2%,Equal,True,Add_Shortcut,StartMenu,%pTextBox1%
If,%pCheckBox3%,Equal,True,Add_Shortcut,QuickLaunch
If,%SourceArch%,Equal,x64,Begin
DirCopy,"%Target_Prog%\%ProgramFolder%\IoWrapper.dll","%Target_Win%\SysWOW64",NOWARN
End
As you can see I need some help :embarrassed:
« Last Edit: December 28, 2014, 06:13:12 PM by Mark »

Re: Windows7-USB-DVD-tool adding WOW to Script
« Reply #1 on: December 28, 2014, 06:18:06 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
You are facing a winbuilder bug with a bad syntax,
 I am sure bad syntax come after some trials, but you could not figure out bug and how to workaround ...

for your case here it is

If,%SourceArch%,Equal,x64,If,%TargetWOW64%,Equal,x86,FileCopy,%ProjectTemp%\TempExtractFolder\%ProgramFolder%\%ProgramFolder%\IoWrapper.dll,%Target_Win%\SysWOW64


tip:
 %TargetWOW64% = x86  says there is wow64 exists, if wow64 not exists on a project (future Win9SE ;)), there wouldn't be SysWOW64 , 32bit IoWrapper.dll at SysWOW64 would be meaningless ...... (ex: waik pe)  :thumbsup:

:turtle:
« Last Edit: December 28, 2014, 06:18:18 PM by Lancelot »

Re: Windows7-USB-DVD-tool adding WOW to Script
« Reply #2 on: December 28, 2014, 06:57:36 PM »

anshad

  • Chef
  • ***
  • Date Registered: Apr 2012
  • Posts: 323
Hi Mark

"Win7 USB-DVD tool" is so limited. Why not use "Rufus" which can even create XP and Linux setup USB disks ?.

https://rufus.akeo.ie/

Re: Windows7-USB-DVD-tool adding WOW to Script
« Reply #3 on: December 28, 2014, 08:53:40 PM »

Prz42

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Jan 2014
  • Posts: 513
Hi Lancelot,
You are facing a winbuilder bug with a bad syntax,
 I am sure bad syntax come after some trials, but you could not figure out bug and how to workaround ...

for your case here it is

If,%SourceArch%,Equal,x64,If,%TargetWOW64%,Equal,x86,FileCopy,%ProjectTemp%\TempExtractFolder\%ProgramFolder%\%ProgramFolder%\IoWrapper.dll,%Target_Win%\SysWOW64

Tip:
 %TargetWOW64% = x86  says there is wow64 exists, if wow64 not exists on a project (future Win9SE ;)), there wouldn't be SysWOW64 , 32bit IoWrapper.dll at SysWOW64 would be meaningless ...... (ex: waik pe)  :thumbsup:
Code: [Select]
[Process]
Arch,x86
Is the x86 in your code there because of the Arch,x86.  If that is the case would I be able to take out the Arch,x86 after the [Process]?
In any case inserting that line completed the script to work in WinPe x64.  Thanks for all the help.  :thumbsup:
It would be nice if the PC Pack had the option to insert the WOW64 and the file associations like (Portabilitron). The file associations in
(Portabilitron) is a extremely important tool. I uploaded your fix to Windows7-USB-DVD-tool adding WOW to Script.

Re: Windows7-USB-DVD-tool adding WOW to Script
« Reply #4 on: December 28, 2014, 09:16:55 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Arch,x86

says your application needs 32bit working environment (project you build),
 if there is not such environment plugin exits during build (nothing processed)...
   keep it since your application needs 32bit working environment  :thumbsup:

currently all projects around provide 32bit working environment (thanks to JFX),
 it was not like that in the past, and things may change in future  :wink:

++
PC Packed can not provide all options, it does its job nicely to provide a working plugin with clean, always working coding inside  :great:
 unless a simple portable application, there will be things required to add,
  at this point, starting with PC Packed and continue editions on it is easy (as you just practiced ;))
    PC Packed mission succeed  :great:

option to insert the WOW64 ! I am not sure about that, besides you add one line all ok now  :wink:
 you can use similar edits on other plugins you need  :thumbsup:

for editions, check PC Packed topic, at the end of first post I put many things,
 like Plugin Create Associate:
  which guides how to do file associations.

I hope above helps
:turtle:

 

Powered by EzPortal