Q&A : Wise Script Editor -Part 1


Greetings!

While you deal with  re-packaging the knowledge about wise scripting is very essential.’Wise script editor’ is a tool which help you to deal with wise scripts.In repackaging technology,this is one of the easiest way to build a script.

Here by I’m starting a series of posts regarding this technology.The explanations will be in Questions and Answers form.I will try to cover some of the examples also.Hope you will enjoy this reading..

1.What is wise script editor?

WiseScript Editor is a separate script authoring environment that lets you create powerful .EXEs to use as custom actions in Windows Installer Editor. Use this powerful feature to extend the capabilities of Microsoft Windows Installer and simplify installation tasks, such as parsing or arithmetic functions, that are difficult to accomplish with Windows Installer.

2. What is the advantage of Creating an .EXE with WiseScript Editor compared to writing your own custom program to create an .EXE?

  •  WiseScript Editor has pre-created, easy-to-use script actions that have been specifically designed to fulfill common installation needs.
  • You can pass Windows Installer properties in and out of the WiseScript Editor  .EXE.
  • Within a WiseScript Editor .EXE, you can evaluate Windows Installer conditions.

3.What is the disadvantage of using wise script?

The disadvantage to using WiseScript Editor is that Windows Installer does not know about or manage system changes performed by a WiseScript .EXE, such as installation of a file.

4.How will you edit the script ?

          Use the commands on the Edit menu, the right-click menu, or the tools on the toolbar to edit your script. You can edit only one script line at a time, but you can cut, copy, or paste several lines at one time.

5.How will you comment out script lines?

       1. Select the line or lines in the script that you want to disable.

       2. Select Edit menu > Comment.

The commented lines appear in green. To reactivate commented lines,select them again and select Comment a second time.

6.Why we use conditionals and loops in script.Explain with an example?

Conditionals specify script actions that are executed only when certain conditions are satisfied. For example, in WiseScript, you can test what version of Windows a destination computer is running, then execute different script actions depending on whether they.re running Windows 95/98/Me or Windows NT4/2000/XP.

Loops are used to indicate actions that should be repeated until a certain condition is met. For example, you might prompt the end user to enter a particular piece of information during installation. If you want to make sure that the information an end user enters meets certain criteria, you can use a loop to repeat the prompt until the data entered is appropriate.

7.Wat are all the characteristics of variable?

  •  Variable names must begin with a letter.
  •  Variable names cannot begin with an underscore (_) character.
  •  Variable names can contain only numbers, letters, and underscore
  • characters.
  •  Variable names must be 28 characters or less.
  •  They hold ASCII text, not binary data.
  •  They can be up to 32 KB in length.

 8.What is the use of the item ‘Add Text to INSTALL.LOG’ ?

Use the Add Text to INSTALL.LOG script action to add commands to the installation log.

9.What is the use of the item ‘Add to AUTOEXEC.BAT’ ?

The Add to AUTOEXEC.BAT script action edits the AUTOEXEC.BAT file, which is executed during startup, to allow you to add commands that are executed before Windows loads.

10.How will you append the existing autoexec.bat using

Once you open the window ,In line number section Enter zero to append the command to the end of the file

11. What is the use of the item  ‘Add to CONFIG.SYS’?

The Add to CONFIG.SYS script action edits the CONFIG.SYS file to add new commands.

12. What is the use of the item  ‘Add to SYSTEM.INI’?

The Add to SYSTEM.INI script action lets you add a device entry to the SYSTEM.INI file. If you use this command, Windows is restarted when installation of the .MSI is complete, to force the new device driver to be loaded.

Just stoping for a while.Will be back with more interesting questions.Please keep watch on this.

[To be continued..]

Advertisements

3 Responses to “Q&A : Wise Script Editor -Part 1”


  1. 1 Shirisha March 3, 2010 at 11:57 am

    Good one. It helped me in understanding the overview of WSE. For your 6th answer, it would be great if you can provide the script lines also as am novice at WSE.

  2. 2 Amit March 12, 2011 at 10:31 pm

    Hi,

    I am trying to install the files using wise script. I want to pass my “Install File” source file path or only file name runtime.

    Is that possible? Below is the sample code that i am using.

    item: If/While Statement
    Variable=TEXTFILE
    Flags=00010001
    end
    item: Read/Update Text File
    Variable=VALTEXT
    Pathname=C:\testing\Test\Common Shortcuts.txt
    end
    remarked item: Parse String
    Source=%VALTEXT%
    Pattern=
    Variable1=FILE_NAME
    Variable2=SHORTCUT_NAME
    end
    item: Set Variable
    Variable=NEWPATH
    Value=%_LOCALSTAGING_%/%VALTEXT%
    end
    item: Set Variable
    Variable=NEWSHORTCUT_PATH
    Value=%SHORTCUTPATH%\Support\
    end
    item: Set Variable
    Variable=NEWSHORTCUT_PATH
    Value=%VALTEXT%
    Flags=00000001
    end
    breakpoint item: Install File
    Source=%NEWPATH%
    Destination=%NEWSHORTCUT_PATH%
    Flags=0000000010000010
    Patch Existing=%_LOCALSTAGING_%\
    end
    remarked item: Set File Attributes
    Pathname=C:\testing\Test\aa.txt
    end
    remarked item: If/While Statement
    Variable=FILE_NAME
    end
    remarked item: Exit Installation
    end
    remarked item: Set Variable
    Variable=TEXTFILE
    Value=0
    end
    remarked item: Display Message
    Title=Test
    Text=Checking…
    end
    remarked item: End Block
    end
    item: End Block
    end
    item: Set Variable
    Variable=TEXTFILE
    end
    item: End Block
    end

  3. 3 Amit March 12, 2011 at 10:33 pm

    Hi,

    I am trying to install the files using wise script. I want to pass my “Install File” source file path or only file name runtime.

    Is that possible? Below is the sample code that i am using.

    item: If/While Statement
    Variable=TEXTFILE
    Flags=00010001
    end
    item: Read/Update Text File
    Variable=VALTEXT
    Pathname=C:\testing\Test\Common Shortcuts.txt
    end
    remarked item: Parse String
    Source=%VALTEXT%
    Pattern=
    Variable1=FILE_NAME
    Variable2=SHORTCUT_NAME
    end
    item: Set Variable
    Variable=NEWPATH
    Value=%_LOCALSTAGING_%/%VALTEXT%
    end
    item: Set Variable
    Variable=NEWSHORTCUT_PATH
    Value=%SHORTCUTPATH%\Support\
    end
    item: Set Variable
    Variable=NEWSHORTCUT_PATH
    Value=%VALTEXT%
    Flags=00000001
    end
    breakpoint item: Install File
    Source=%NEWPATH%
    Destination=%NEWSHORTCUT_PATH%
    Flags=0000000010000010
    Patch Existing=%_LOCALSTAGING_%\
    end
    item: End Block
    end
    item: Set Variable
    Variable=TEXTFILE
    end
    item: End Block
    end


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: