Old 7th January 2009, 19:08   #1
duffboy_ca
Junior Member
 
Join Date: Jan 2009
Posts: 3
MS Access command line switch in the CreateShortcut

Hello,

I am fairly new to NSIS, as I have only done simple install programs. I have searched for many hours now (on the Wiki, the web, and this forum) and have not been able to find an answer.

When I have my line of code:
CreateShortCut "$DESKTOP\IOA 2K7.lnk" '"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "$INSTDIR\IOACODE.mdb" /Wrkgrp "V:\IOASEC.mdw"'
the slash '/' character for the workgroup command line switch is changed to a backslash '\'.

I have tried a many combinations ('/\', '//','\/', etc.) and it seems that I cannot find a way to get the proper slash to appear in the string.

Any help with this issue would be greatly appreciated. Thank you.

Duffy
duffboy_ca is offline   Reply With Quote
Old 7th January 2009, 19:24   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
the parameters should not be a part of the exepath, it has its own argument: CreateShortCut link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 7th January 2009, 21:10   #3
duffboy_ca
Junior Member
 
Join Date: Jan 2009
Posts: 3
Anders,

Thank you for the quick reply.

Are you saying that I should put the workgroup switch and appropriate mdb file link that I want Access to open in another spot in the CreateShortCut syntax?

I am very confused, sorry. If someone were able to talk me through how to open an Access mdb with MS Access using the workgroup command line switch that would be helpful.

The command line which would normally be in a shortcut setup to do this is:
"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "C:\Program Files\IOA\IOACODE.mdb" /Wrkgrp "V:\IOASEC.mdw"
where the IOACODE.mdb file is being opened by MS Access with the IOASEC.mdw being the workgroup permissions file.

Thanks again for any help.

Duffy
duffboy_ca is offline   Reply With Quote
Old 7th January 2009, 21:27   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
um, yes, did I not already say that?

the format should be:
CreateShortcut "c:\some\path\hello.lnk" '"$instdir\myapp.exe"' '/param1 "c:\some\path" /param3'

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 7th January 2009, 21:30   #5
duffboy_ca
Junior Member
 
Join Date: Jan 2009
Posts: 3
Great. Thanks a lot. I was getting confused on where string broke. I got it sorted, thank you very much.
duffboy_ca is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump