Building EXE file 
Author Message
 Building EXE file

I need a EXE file built that simply runs the command below. It would be nice
if I could also add a custom icon into the EXE file.

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\program
file\myprogram\myprogram.mde" /WRKGRP "C:\program
files\myprogram\secure.mdw" /User "user" /Pwd "password"

Can an EXE file be built with VB that executes a command line like the
above?



Sun, 02 Nov 2003 07:14:35 GMT  
 Building EXE file
Any Microsoft program can do this using the Shell command....

Dermot Balson
Extend Excel's abilities with free web and encryption code....
http://www.webace.com.au/~balson/InsaneExcel/Default.html

Quote:
-----Original Message-----

I need a EXE file built that simply runs the command below. It would be nice
if I could also add a custom icon into the EXE file.

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\program
file\myprogram\myprogram.mde" /WRKGRP "C:\program
files\myprogram\secure.mdw" /User "user" /Pwd "password"

Can an EXE file be built with VB that executes a command line like the
above?

.



Sun, 02 Nov 2003 08:23:46 GMT  
 Building EXE file
To answer the direct question. Yes the line you have suggested can be
written in VB6 or any other languages. However consider you may need to
deploy libraries for VB6. A easier method would be to use a batch file which
you would save as "mybatch.bat" the ".bat" is the key to this file. The file
would simply contain the following;
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\program
file\myprogram\myprogram.mde" /WRKGRP "C:\program
files\myprogram\secure.mdw" /User "user" /Pwd "password"

Can't get much easier than that...

The below is optional but worth thinking about. I guess it depends how
proefessional you want your Access Application to Look.

Another alternative, which will look better to users, is to create a new
file association and give the file a different name ie. "mds" that way in
the file association you can tell it to use the system.mdw of your choice. I
tested this out and it does work.

To create the file association manually you need to;
- Open "My Computer".
- Click tools--> Folder Options.
- Select the "File Types" Tab.
- Click New.
- Type the file extension ie "mds".
- Click Okay.
- Next highlight the newly created file extension. and click the Advanced
button.
- If there are no actions click new.
- Type Open in the Action Box.
- Click browse locate msaccess.exe
- then modify the line to contain all the normal text. Where the file name
would normally appear just put in the quotes "%1"

One possible deployment method might be the following registry file. Well
this is the contents paste it into notepad save it as a ".reg" file then run
it. You might also change the file locations to suit. These are not standard
ones as i didn't install office in the standard locations.

A couple of specifics...
- I'm sure you don't need all these registry entries in here but it doesn't
hurt to have them.
- The keys came from a system where the following is set.
- Path to the system.mdw file I wanted it to use was "C:\Temp\System.mdw"
- Microsoft Office in this case 2000 but 97 and 95 will work exactly the
same was;
   C:\Program files\Microsoft Office 2000\Office\MSACCESS.EXE
- The registry below only includes the /wrkgrp switch the /user and /pwd
should be added in as needed.

________File Start_______________
REGEDIT4


"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008


[HKEY_CLASSES_ROOT\mds_auto_file\shell\Open]


C:\\temp\\system.mdw \"%1\""



"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mds_auto_file\shell\Open]


C:\\temp\\system.mdw \"%1\""

[HKEY_USERS\S-1-5-21-436374069-484763869-1202660629-1000\Software\Microsoft\
Windows\CurrentVersion\Explorer\FileExts\.mds]

[HKEY_USERS\S-1-5-21-436374069-484763869-1202660629-1000\Software\Microsoft\
Windows\CurrentVersion\Explorer\FileExts\.mds\OpenWithList]
"a"="MSACCESS.EXE"
"MRUList"="a"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileEx
ts\.mds]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileEx
ts\.mds\OpenWithList]
"a"="MSACCESS.EXE"
"MRUList"="a"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Recent
Docs\.mds]
"a"=hex:64,00,62,00,31,00,2e,00,6d,00,64,00,73,00,00,00,1b,00,32,00,00,00,00
,\
  00,00,00,00,00,00,00,64,62,31,2e,6d,64,73,2e,6c,6e,6b,00,00,00,00
"MRUList"="a"


___________File End____________________


Quote:
> I need a EXE file built that simply runs the command below. It would be
nice
> if I could also add a custom icon into the EXE file.

> "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\program
> file\myprogram\myprogram.mde" /WRKGRP "C:\program
> files\myprogram\secure.mdw" /User "user" /Pwd "password"

> Can an EXE file be built with VB that executes a command line like the
> above?



Sun, 02 Nov 2003 22:43:52 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VB6 simply exit while build .exe file.

2. Building a CD Autorun.exe file lauching html file

3. Problems building install file - AutPrx32.dll, AutMgr32.dll, RACMGR32.dll, CLIREG32.exe NOT FOUND

4. EXE file from Custom Built Application

5. Load A new Version of an Exe File From the same Exe file

6. Load A new Version of an Exe File From the same Exe file

7. building my own exe for VBA wizards and macros

8. Build an application while Exe is open

9. Building a VB exe with NO external dependancies?

10. VB5: Build *.EXE from command line with vb5 /make x.vbp

11. building an EXE

12. Is it possible to build a standalone exe?

 

 
Powered by phpBB® Forum Software