Results 1 to 4 of 4

Thread: vb shell help....or not?..?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Location
    earth
    Posts
    89

    vb shell help....or not?..?

    ok i dont know what to do here so hopefull you guys can give me some ideas ok i have a exe when it runs it makes a bunch of files in the dir its in so i put it in a folder called /data and made a shortcut to it in the main folder called myexe (so the exe file is in the folder called data and the folder called data is in the folder called myexe) and i made a shortcut to the exe file in the myexe folder i did this so when im in the folder myexe its clean looking and not files everywhere and you just click the shortcut to get to the exe file ok well i need to move the folder myexe alot (and i plan on puting it on other friends computers) but when i move it the shortcut gets messed up (no longer in the same location) so is there a way i can have the shortcut so instead of the shortcuts target being c:\my docs\bla bla\bla\myexe\data\file.exe it just be \data\file.exe that way it dont matter if i move the file i cant find out how to do this and if i cant then i need to write a progrom to shell the other program (problem with that) if i do that then the exefile i shell runs in the myexe folder somehow anyways all the files it creats go in the myexe folder instead of the data...... so if anyone understands that please help thanks (sorry for misspellings)
    Aim: zhahaman2001

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,222

    Re: vb shell help....or not?..?

    you could use relative pathing...

    IE)

    if you're in Program Files, and you wanna reference a file in C

    ../FileName.exe

    your current directory would just be the filename.exe

    **This is assuming VB takes relative pathing from its current location...Otherwise I believe there is an App.Path element that contains your current location


    HTH

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Location
    earth
    Posts
    89

    Re: vb shell help....or not?..?

    ok lets say im in c:\ and want to reference something in c:\folder1
    Aim: zhahaman2001

  4. #4
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,222

    Re: vb shell help....or not?..?

    .\folder1\file.exe

    would access that folder


    You could also have the user select the directory of the program, and write it to the registry.

    Once it is there, you could reference the file nomatter where they installed it to

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width