Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

EASY: Remove Filename?

EASY: Remove Filename?

EASY: Remove Filename?

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!

RE: EASY: Remove Filename?

This was my fault...

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

But I was passing this to my wise script

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. :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close