Jump to content











Photo
- - - - -

Script to install program?


  • Please log in to reply
1 reply to this topic

#1 QuentinX5

QuentinX5

    Member

  • Members
  • 39 posts
  •  
    United States

Posted 17 June 2014 - 07:17 PM

So I've been tinkering more and more with scripts lately, learning tidbits of knowledge here and there, and I was wanting to create a script to install a program (MyDefrag), but I keep getting stuck trying to include everything I need to for the program. I tried using the program I already had installed on my PC, but it was a x64 version and I am using a x86 version of Win7PESE. A workaround that I found for it was to just include the installer as an executable on the desktop and install it once the PE loads, but I figured that there had to be a more efficient way of doing this, like a way that WinBuilder could install the program for me. My current method that I found online was a way to initiate the executable during the boot of the PE, but once again, I was just wanting to have it already installed. Steps in the right direction are very much appreciated. :)

Here is what I have right now (This is of course excluding the executable after it has been decompressed into the .script file):
 

[main]
Title=MyDefrag
Description=(v4.3.1)MyDefrag is a disk defragmenter and optimizer (a maintenance utility to make your harddisk faster) for Windows 2000, 2003, XP, Vista, 2008, Win7, and for X64.
Level=5
Version=1
Selected=True

[variables]
%ProgramTitle%=MyDefrag
%ProgramEXE%=MyDefrag-v4.3.1.exe
%ProgramFolder%="MyDefrag"

[process]
unpack
AddAutoRun,"MyDefrag","%PE_Programs%\%ProgramFolder%\%ProgramEXE%","/install"


#2 Danixu

Danixu

    Newbie

  • Members
  • 14 posts
  •  
    Spain

Posted 12 September 2014 - 08:25 PM

The best you can do is:

  • Get the portable version of program (if exist) and use it in your project
  • Use a virtual machine to see the changes in registry with InstallRite or similar, then add that changes to script file, and of course the program files.

Is better in Virtual Machine using Virtualbox, because you can use a clean windows installation and make an screenshot to revert to clean state after all is done.

 

For example, i've done my first script and i've used a virtual machine with installrite to extract the registry, then i've used "reg2WBS" to convert that reg file to WinBuilder script language, i've compressed all files in a 7z file and i've created something like:

Hive_Load,Machine
reg_add,0x1,%reg%\Classes\FilePreview.Doc
reg_add,0x1,%reg%\Classes\FilePreview.Doc,,"FilePreview.Doc"
......................More Stuff here.................
Hive_Unload,Machine

To install the registry in target Live, and:

Unpack,Folder,ActivePartitionRecoveryEnterprise.7z,True,%Target_prog%,%ProgramFolder%
// Add_Shortcuts
Add_Shortcut,Desktop

To extract the 7zip into the project and create a shortcut in desktop.

 

This is the best form, because all is like it was installed and start faster.

 

Srry for my english, I hope this helps.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users