Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EASY: Remove Filename?

Status
Not open for further replies.

DroopyA

Programmer
Aug 5, 2003
52
US
Ok, All I need to do is remove the file name from the end of a string in a wise script. The path string comes from my Wise For Windows Installer setup and when it reaches my InstallMaster Script it looks like:

C:\Program Files\Setup.exe

But I need it to be

C:\Program Files


I know I can use the "Set Variable" Action to remove the "trailing backslashes" but when I click the "remove filename" checkbox, the filename is still in the variable.

How do I do this?

This is what I have now:


Set Variable MSDEPATH to %MSDEPATH% (with "remove trailing backslashes" marked as the operation)

Set Variable MSDEPATH to %MSDEPATH% (with "remove filename" checkbox checked and "Nothing" as the operation)

Set Variable MSDEPATH to %MSDEPATH% (with "remove trailing backslashes" marked as the operation)


What am I doing wrong?

Thanks you, and I'm sorry if this post seems sparatic. But I'm in a hurry, if I get this to work my install is complete.. HOORAY!
 
This was my fault...

VariableA = "C:\Program Files\myprogram.exe"

But I was passing this to my wise script
VariableA\MSDE\setup.exe

Thus, it was cutting the wrong file name and replacing it when it tried to execute the program I told it to run... which was setup.exe.

Just in case anybody cares. I don't like to leave my question unanswered in case somebody else makes the same mistakes I do. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top