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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application setup to run on CD

Status
Not open for further replies.

itchyII

MIS
Apr 10, 2001
167
Hi All,
Maybe someone can help me. I have this snazzy Access application that I have created for work It resides on our departmental server and is a front end/back end app complete with multiple levels of security (including custom written modules from within the application that verify the name and location of the mdw as well as other security measures). The problem is, I am going on an interview with another company and would like to demo them this application. However, I would like to be able to run the 'read only' demo entirely off of a CD. The problem is, I have been unable to create relative paths in the shortcut to the app. I could disable the security entirely but that is a big feature of the app. My shortcut to the file looks like this:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "\\ServerName\dept_name\Public\DB\DB_2000.mde" /wrkgrp "\\ServerName\dept_name\Public\DB\DBfiles\DB.mdw"

I also have this path embedded in my code:

If SysCmd(acSysCmdGetWorkgroupFile) <> "\\ServerName\dept_name\Public\DB\DBfiles\DB.mdw" Then
MsgBox "You are not an authorized user. Shutdown now in progress"

Any ideas on how I can make all these paths to be relative?

Itchy
 
Uh, how about you just comment out the line requiring the specific workgroup location, at least for the 'demo' copy? That solves that.

Also, change the shortcut target location?

Make sure that you don't try and run it off of the CD? Who knows what problems you'll run into from there, and you don't want problems with this demo.

Also: how do you know that this client is running the same version of Access that you are? If you have compiled the file to an MDE, only THAT version of Access will open it.



A final note: you may not have the legal right to demo your current application. I'm not a lawyer, and this is not legal advice, etc. But we have discussed this subject on this forum, and you (may)/(should) need to ask your employer if demo'ing the product is ok. I understand the numerous reasons you wouldn't want to do that, but ... so you know.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Thanks for the reply foolio12. I could disable the security for the demo, but I would prefer not to. It is the part of the application that I worked the most on and would really like to show it off! So, to your knowledge, there is no way to use relative paths? I know that the company I will be interviewing with are using the same version of Access, but I'm not sure that they would really want me to install it on their computer for the demo. ( I know that I would be a little weary of letting anyone I interview install an application on my computer!). As for the 'legal' implications of this demo, I hear you. The application itself does not contain anything proprietary, and I made sure that I have demo data in the tables. Telling my employer about this is not an option! Thanks for your input!
Itchy
 
You can use relative paths by extracting the 'base' path from the path&filename given to you in various places, but this doesn't work with shortcut files! So redo the shortcut.


If you want to use 'relative' paths inside your application, you can use CurrentProject.Path or Application.CurrentPath or somesuch to grab the 'base' path (I'm not in office right now, so I can't check).

Anyway, I still think it's not feasible to run the database off of the CD. Plus, did you notice what I said about Access versions? It's going to be a mess of a demo if you don't get all this down, for sure.


Pete

PS--make sure to compact the file before transporting it off-office, which finally removes the deleted data. This is a good tip for any database you're working on, no matter how 'non-sensitive' the data is.
 
Thanks for the advice foolio12. They are running the same version of Access. I was able to confirm this. I figured out how to use the 'relative' path in the code. It's just the shortcut that I am not sure of. Using the shortcut is the only way that I can force the use of this specific mdw for my app (without changing the default mdw for Access). I guess I just might have to remove the security and try to explain it instead.
Thanks!

Itchy
 
Hi itchyII,

Perhaps by now you have done your interview...if so just wondering how it went. If not, wondering if you found a way to run an Access file from a CD. I have not been able to do this because when the database is burned to CD it is a read-only file and Access can't run in a read-only environment, at least from my past experience.

If there is a way to run straight from a CD I would be interesting in knowing how...thanks!

--BoulderRidge



 
Hi BoulderRidge, no I never figured it out. I know that it won't run off of the CD because it is read only but what I wanted to be able to do was copy the files to a desktop or something for the demo and not have to fidge with the shortcut or the code to get it to work. I just wanted to set everything to relative paths so no matter where I move it, it works. Inside the app, its not a problem, it was the shortcut that was the problem.

Itchy
 
Boulderridge, I have a similar question I have a secured DB that we use within our office, however I would like to allow a client access to this DB through a portal. I do not know how to ensure that the correct mdw file, associated with the DB, is used by the client when he downloads the DB. You mention the use of relative paths by extracting the 'base' path from the path&filename given to you in various places. How would one go about doing this, and would it be appropriate for this situation?


Thank you for your input
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top