By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,823 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

How can I set the Windows Shortcut 'Start in' Parameter from Access?

P: n/a
I have developed an Access application and am attempting to add a
button to one form that will run our Work Order system. The Work
Order system is normally started from an icon on the desktop.

The Shortcut has the following values
Target: C:\oracle6i\BIN\ifrun60.EXE C:\MP5i\bin\r5logon.fmx
Start in: C:\MP5i\bin
Shortcut Key: None
Run: Normal Window

I am using the Call Shell function to execute the external
application. I copied the "Target" string from the shortcut and used
it as the Command line in the Shell command.

Here is my code:

Dim stAppName As String
stAppName = "C:\oracle6i\BIN\ifrun60.EXE " &
"C:\MP5i\bin\r5logon.fmx"
Call Shell("stAppName", 1) ' Open Work Order System

When I click the button the Work Order system attempts to start, but
it is attempting to load/attach other files (other than r5logon) that
are located in the directory specified in the 'Start in' section of
the shortcut. Therein lies the problem. Is there a way for me to
specify that 'Start in' directory from my application before or during
the execution of the Shell command. Or is there an entirely different
way that I should be doing this?

Isn't the Start In parameter similar to the old 'Path' statements used
in DOS?

Thanks for any help you can give.

Barry
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
bc*****@cityofsacramento.org (Barry Cannon) wrote in message news:<50**************************@posting.google. com>...
I have developed an Access application and am attempting to add a
button to one form that will run our Work Order system. The Work
Order system is normally started from an icon on the desktop.

The Shortcut has the following values
Target: C:\oracle6i\BIN\ifrun60.EXE C:\MP5i\bin\r5logon.fmx
Start in: C:\MP5i\bin
Shortcut Key: None
Run: Normal Window

I am using the Call Shell function to execute the external
application. I copied the "Target" string from the shortcut and used
it as the Command line in the Shell command.

Here is my code:

Dim stAppName As String
stAppName = "C:\oracle6i\BIN\ifrun60.EXE " &
"C:\MP5i\bin\r5logon.fmx"
Call Shell("stAppName", 1) ' Open Work Order System

When I click the button the Work Order system attempts to start, but
it is attempting to load/attach other files (other than r5logon) that
are located in the directory specified in the 'Start in' section of
the shortcut. Therein lies the problem. Is there a way for me to
specify that 'Start in' directory from my application before or during
the execution of the Shell command. Or is there an entirely different
way that I should be doing this?

Isn't the Start In parameter similar to the old 'Path' statements used
in DOS?

Thanks for any help you can give.

Barry


Barry,

look in the documentation if ifrun60.exe has some commandline option
to choose the default startup-directory or environment-variables you
could set.

Otherwise try making a batchfile containing the lines
c:
cd C:\MP5i\bin
start C:\oracle6i\BIN\ifrun60.EXE C:\MP5i\bin\r5logon.fmx

and call it through:
call shell("mybat.bat",0)

I think that will work ...

Marc.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.