Click Here
home features news forums classifieds faqs links search
6155 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
22 crawler(s) on-line.
 95 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!

/  Forum Index
   /  Amiga Development
      /  Program path question
Register To Post

PosterThread
thinkchip 
Program path question
Posted on 3-May-2013 13:23:35
#1 ]
Super Member
Joined: 26-Mar-2004
Posts: 1185
From: Salt Lake City, Utah, USA

I have a question that might have a simple answer or not. When you have a program that a user can install anywhere, how can the program get the drive and folder where it's been copied to?

_________________
X5000 / microA1(OS4.1 FE U2) / CodeBench / Imagine / Blender
Lightwave 2019 / Microsoft Visual C++

 Status: Offline
Profile     Report this post  
abalaban 
Re: Program path question
Posted on 3-May-2013 13:39:33
#2 ]
Super Member
Joined: 1-Oct-2004
Posts: 1115
From: France

@thinkchip

Really easy just use IDOS->GetProgramDir() and if you want to disambiguate the result (under several volume with the same name can be mounted at the same time ex. USB Key with name 'NoName') use IDOS->DevNameFromLock() on the result.

_________________
AOS 4.1 : I dream it, Hyperion did it !
Now dreaming AOS 4.2...
Thank you to all devs involved for this great job !

 Status: Offline
Profile     Report this post  
Hypex 
Re: Program path question
Posted on 3-May-2013 17:07:38
#3 ]
Elite Member
Joined: 6-May-2007
Posts: 11351
From: Greensborough, Australia

@thinkchip

By convention we use "PROGDIR:' to find the program directory. So that path can be used as a root volume pointing to the program directory or be CD'ed to.

Last edited by Hypex on 04-May-2013 at 04:15 AM.

 Status: Offline
Profile     Report this post  
Severin 
Re: Program path question
Posted on 3-May-2013 17:08:38
#4 ]
Elite Member
Joined: 18-Aug-2003
Posts: 2740
From: Gloucestershire UK

@thinkchip

Or you can use PROGDIR: if you just need that info for file I/O within the pregrams own directory structure. Under OS4.1 you can also read AppDir:

_________________
OS4 Rocks
X1000 beta tester, Sam440 Flex (733)

Visit the Official OS4 Support Site for more help.

It may be that your sole purpose is to serve as a warning to others.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle