/build/static/layout/Breadcrumb_cap_w.png

changing result of a system search

LS,

I'm using Wise 4.62. I'm using a system search to get an install location. The only problem is, that I have to go 1 folder above the result of the search. Example:
The result of the search is c:\progam files\Microsoft\Office_02\Office10 and I need the make that c:\progam files\Microsoft\Office_02. How do I do this?

Thanks in advance.

0 Comments   [ + ] Show comments

Answers (18)

Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
[8D]

My idea would be to have a Custom Action that retrieves the property into a string variable and then modifies it.

Once modified, the CA would then set the property to the new value.

[8D] Keep cool. [8D]

Need to know the script etc???
Posted by: call2 19 years ago
Senior Yellow Belt
0
ORIGINAL: brenthunter2005

[8D]

Need to know the script etc???



If that would be possible? That would be great.

tnks.
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
[8D]

OK, this CA is in VBScript (so ensure your target computers have WSH installed etc)

strPROPERTY = Session.Property("YOUR_PROPERTY_IN_THE_PROPERTY_TABLE") 'Get your property from the Property table in the MSI.

strNEWPROPERTY = Left(strPROPERTY,InStrRev(strPROPERTY, "\") -1) 'Modify the string

Session.Property("strPROPERTY") = strNEWPROPERTY 'Put the string back into the property table


The sequence location of this CA would be best suited after the AppSearch action.

I hope this makes sense and helps.

[8D] Keep cool. [8D]
Posted by: call2 19 years ago
Senior Yellow Belt
0
Tanks,

That realy helped me out. [:D]
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
[8D]

No probs!

[8D]
Posted by: call2 19 years ago
Senior Yellow Belt
0
hmmm.....I can't get it to change the result of the appsearch.

Btw, I'm a moron with VB, so I'm probably doing something wrong. Here's what I do:

strPROPERTY = Session.Property("APPZOEKEN")
strNEWPROPERTY = Left(strPROPERTY,InStrRev(strPROPERTY, "\") -1)
Session.Property("StrPROPERTY") = strNEWPROPERTY
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
[8D]

Entries in the PROPERTY table are case-sensitive.

Whoops! I f**ked up in my code. <Note to self - double check my work!>

Your third line of code should be:

Session.Property("APPZOEKEN") = strNEWPROPERTY
Posted by: call2 19 years ago
Senior Yellow Belt
0
ORIGINAL: brenthunter2005

[8D]

Entries in the PROPERTY table are case-sensitive.

Whoops! I f**ked up in my code. <Note to self - double check my work!>

Your third line of code should be:

Session.Property("APPZOEKEN") = strNEWPROPERTY


I know, thats why I always use capitals for Properties I add myself.

I'm gonna try your correction.

The result of this code gos back into the same property? Right? I'm not sure.
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
Yeah, its basically just updating the property 'APPZOEKEN' with the new value you want.
Posted by: call2 19 years ago
Senior Yellow Belt
0
ORIGINAL: brenthunter2005

Yeah, its basically just updating the property 'APPZOEKEN' with the new value you want.

Oke, thats what I Thought.

It's not working right now, and I don't know what I'm doing wrong, but I'll keep trying.

I'm going home now, so if I don't succed, I gonna post tomorrow.

Thanks for all the help sofar!
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
[8D]

Ensure that the CA is running AFTER the 'AppSearch' action within the 'InstallExecuteSequence' table.


Also, you can add the MSGBOX function within the VBScript to display the string values during runtime. I kind of debugging option if you will...

[8D]
Posted by: call2 19 years ago
Senior Yellow Belt
0
It still won't work.

This is my InstallExecuteSequence table (just the AppSearch and my action)


AppSearch | NOT OEM_NOPREVIOUS | 100
APPZOEKENRES | NOT Installed | 101

So, It is after the AppSearch. I've displayed the value of APPZOEKEN in the dialogs of the MSI, and he doesn't change at any time. I've tried the MSGBOX but he doesn't show.

I tought I might have forgotten to install the VBR but I checked that, and I have insalled that so, I realy don't know what I'm doing wrong.

(I use the "Call VBScript From Embedded Code" function in Wise)
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
Hello call2

If the MSGBOX function in the CA isn't displaying a dialog box or anything, I think you have a bigger problem like the CA not running at all!
Posted by: call2 19 years ago
Senior Yellow Belt
0
Any ideas what could be wrong?
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
0
[8D] OK, a few things:

1. What OS are you deploying to?
2. Ensure that Windows Scripting Host (WSH) is installed. To test this, drop to the CMD prompt and type in cscript.exe.
3. Try removing the conditions from both of the actions.
4. If you are using WISE you can use 'debug' option and run through the MSI package ensuring that the custom actions are running.
5. As above, but logging the MSI installation using the command line: msiexec /I package.msi /l*v c:\temp\MSI_LOG.txt


Good luck!
Posted by: call2 19 years ago
Senior Yellow Belt
0
Oke, thanks

It's working now! [:)]

Thanks for all the help!!
Posted by: babric 19 years ago
Senior Purple Belt
0
Thanks too, I think it will help me a lot ! :-)
Posted by: brenthunter2005 19 years ago
Fifth Degree Brown Belt
-1
What did you have to do to get it working?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ