Technical Tip

Managing Multiple Apps with the Same Name in NSL

Author Info

9 April 2008 - 6:28am
Submitted by: dguest

tip
Reads:

931

Score:
2
2
1
 
Comments:

0

Problem

A Forum reader recently asked:

"How can I manage 2 different applications with the same executable name? Is there any way to create two application definitions for the same executable name?"

And here is the response from David Guest ...

Solution

You can create two scripts and then call them from a single script. Let's assume that your application is called TestApp.exe, and it has two different versions.

1. Create a script for the first version and get it working.

2. Cut and paste the script into a generic script called "TestApp-Version1".

3. Create the second script for the second application and test it.

4. Cut and paste it into a generic script called "TestApp-Version2".

5. Get a script to work out what it is going to do, and which application is being run. Do this first by getting the MD5 hash of each application (a utility for this is at http://www.winmd5.com). As an example, the WinMD5 application which you can get from the web site has
the following MD5 hash: "944a1e869969dd8a4b64ca5e6ebc209a"

6. When you have the MD% hash for each application you can write a short script as follows:

#Application definition to determine which of 2 similar applications is 
being run
GetMD5 ?MD5Hash
If ?MD5Hash eq "944a1e869969dd8a4b64ca5e6ebc209a"
     Include "TestApp-Version1"
     EndScript
Else
     If ?MD5Hash eq "944a1e869969dd8a4b64ca5e6ebcfffc"
         Include "TestApp-Version2"
         EndScript
     Else
         MessageBox "This application is not supported"
     EndIf
EndIf
# End of Script


Author Info

9 April 2008 - 6:28am
Submitted by: dguest




User Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <cite> <code> <img> <ul> <ol> <li> <div> <dl> <dt> <dd> <b> <strong> <h1> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
3 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.