473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Open a program based on users/ install?

I am trying to have access call a program that is installed in the users directory. It is required that every user installs the program seperately (license).

This is what it looks like now.

Expand|Select|Wrap|Line Numbers
  1. Dim Apath As String
  2. Dim retVal1
  3.      Apath = "  " & strA
  4.  
  5.       retVal1 = Shell ("C:\Users\joe.blow\AppData\Local\Company\Software\the.exe", 1)
  6.       Sleep 400
  7.  
But how would I make it so that instead of it looking for joe blow's exe every time it looked for the current user's exe.

I've been to http://mvps.org/access/api/api0054.htm but those refferences don't make any sense to me.

Any help would be appreciated.
Oct 8 '10 #1
3 1144
MMcCarthy
14,534 Expert Mod 8TB
I've found that the only way around this problem traditionally is to install any files I want to be able to access in the All Users directory on the hard drive as opposed to any individual profile.

In other words access would be...

Expand|Select|Wrap|Line Numbers
  1. retVal1 = Shell ("C:\Users\All Users\AppData\Local\Company\Software\the.exe", 1)
Can't remember exactly what this looks like on Vista/W7 but you get the idea.
Oct 8 '10 #2
NeoPa
32,556 Expert Mod 16PB
Try :
Expand|Select|Wrap|Line Numbers
  1. retVal1 = Shell(Environ("USERPROFILE") & "\AppData\Local\Company\Software\The.exe")
Oct 9 '10 #3
NeoPa
32,556 Expert Mod 16PB
Of course, if the licensing allowed you to use the All Users' profile instead, you would be better off (using) :
Expand|Select|Wrap|Line Numbers
  1. retVal1 = Shell(Environ("ALLUSERSPROFILE") & "\AppData\Local\Company\Software\The.exe")
Oct 9 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michael Murschell | last post by:
Is it possible to open a program, like Microsoft Word, from within an ASP page? How? The program I am wanting to open is actually a CRM program that I can send an event ID and it would open that...
2
by: Silent | last post by:
Hello everybody..i'm knew here and looking for a bit of help..heres my problem: I am in the process of building a program to Install some programs silently from a PC. this program is basically a...
0
by: nevlek | last post by:
My boss one day ask if I can create a web site in intranet to let user install printer as well as set it as default themselves without IT's help. I have done some research and brain storming with...
0
by: Yellowfin Reporting | last post by:
Announcing Yellowfin Version 2.5 upgrade release. (www.yellowfin.com.au) Existing SQLserver based users can take advantage of this upgrade as soon as convenient. Downloads are available through...
0
by: Yellowfin pty ltd | last post by:
Announcing Yellowfin Version 2.5 upgrade release. (www.yellowfin.com.au) Existing DB2 based users can take advantage of this upgrade as soon as convenient. Downloads are available through the...
1
by: Steve | last post by:
I have a web based clickonce install. Works fine on some computers. On others, after clicking the install button on the web page the browser displays the XML code from the appname.application page...
0
by: Steve | last post by:
I've created a new VB 2005 project that I've been doing preliminary test installs for. In the development project, I've set the applications icon to an ico file. In the installation project I've...
3
by: curious2007 | last post by:
#include "chartdir.h" int main(int argc, char *argv) { // The data for the bar chart double data = {85, 156, 179.5, 211, 123}; // The labels for the bar chart const char...
1
by: cookdw60 | last post by:
I am looking for a way to have an access form update for multiple users. I have a form where certain fields will be updated on individual computers, and there may be 3 or 4 users that have the...
4
cobra35y
by: cobra35y | last post by:
Good Afternoon, I am new to the world of programming. after reviewing this site for info pertaining to my situation, i have declared a loss and posting for help. maybe i am just overlooking the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.