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

Changing Mdw file from bat file

Status
Not open for further replies.

Flippertje

Technical User
Mar 12, 2004
118
NL
Hi all,

i'm trying to change the .mdw file from a .bat file which i'll convert to .exe
I've read lots of solutions but they don't seem to work for me.
Here's what i have now:

"c:\program files\microsoft office\office11\msaccess.exe" /wrkgrp d:\system2.mdw c:\test.mdb

All this in one line.
The .bat file like this opens the correct database but the mdw file is still the standard system.mdw

Anyone?

Many thanks!

grtz Flipper
 
Hello,

I think your format needs adjustment. I have a desktop shortcut with the following:
"C:\Program Files\Microsoft Office97\Office\MSACCESS.EXE" "C:\somepath\some.MDB" /wrkgrp "C:\myhiddenfolder\mynewmdw.mdw"

<Note: use the quotes and change string order>

Try this and see what happens.
Wayne
 
Trevil,

I tried your solution (as it is described in lots of other posts) but this also doesnt work. When i look in the database security i see that it still uses system.mdw and not the system2.mdw

Your solution:
c:\program files\microsoft office\office11\msaccess.exe" c:\test.mdb /wrkgrp d:\system2.mdw

What am i doing wrong?

grtz Flipper
 
Hello,
I just tried what I had suggested, and it does work for me (I am using Access-2000). After opening the database with my shortcut, I went to the code window and executed a 'SysCmd(acSysCmdGetWorkgroupFile)' and it returned my altered MDW file name.

As a test, I intentionally changed the name of the MDW in the shortcut to a non-existant file and then Access would not open the database because a 'required file was missing'.

What release are you using?

35+ years of 'progress' -- can't we all just go wire boards again?
 
It seems i used the wrong way to look which .mdw file it is using. I looked in the menubar under security; there is said "system.mdw"
But when i looked in the Direct codewindow it said system2.mdw

So it was working all along!

Many thanks for your help; this could have taken a long time for me :)

Flippertje
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top