opening an exe with arguments

lurkmoar

Member
Mar 8, 2008
58
0
0
I'll give you the cliffs first:

Cliffs:
-Want to open .exe w/ arguments (parameters, not sure which is correct term here, whatever)
-Yes I understand I could just create a shortcut (.lnk) and append the args/params to the target
-How do i get the arguments directly into the exe file or make them permanent? without a shortcut


Full story: (read this, maybe I am approaching this wrong)

Have a copy of office2003 installed locally and have office2007 installed remotely(citrix).
To open word2007 for example, I would use pnagent.exe to logon with the parameters /CitrixShortcut: (1) /QLaunch "XenApp50:Word 2007" to open up word directly.

I want the default .doc program to be word2007, remotely, rather than word2003. Ie I right clicked example.doc->open with->????
open with word2003.exe not what i want
open with pnagent.exe = not what i want

but i cant open with 'shortcutToword2007.lnk' because it is not a valid program

thanks for taking a look
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
-How do i get the arguments directly into the exe file or make them permanent? without a shortcut

You don't.

I want the default .doc program to be word2007, remotely, rather than word2003. Ie I right clicked example.doc->open with->????

You could probably change the association manually in the registry, but it would likely take some trial and error to get right.
 

lurkmoar

Member
Mar 8, 2008
58
0
0
right, I figured "you dont" ... atleast without making a new exe (not gonna happen)

but i think you were on to something with the registry.

I got onto that path but it seemed like itd be too much trial and error.

but making the arguments default requires opening explorer -> tools -> folder options -> file types -> kinda explanatory from there.

thanks for the help
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I've always had issues with the file types editor for some reason, it's just crap. Locating and editing the associations in the registry isn't really that hard, sometimes it's easier. But you have to be comfortable in there and know what you're doing in case you do screw something major up.
 

Merad

Platinum Member
May 31, 2010
2,586
19
81
Does pnagent.exe have command line option to supply parameters to the program that it's opening? If not, then what you're wanting isn't directly possible anyway.

If it does have an option like that, then it'll be fairly trivial to write a little launcher program.

Edit: Actually, I don't think you'd need a program. I'm pretty sure you can use batch files in the file associations editor.
 
Last edited:

lurkmoar

Member
Mar 8, 2008
58
0
0
@ debian: right, it does seem to be crap, or atleast annoying
@ merad: yeah, I believe it does

They way I understand it is if you right click on an icon (we'll take .doc as an example) you are given options to save, open, etc, with the default being set to 'open'
Thus, when you double left click the icon, it does the default action and runs the command for open, which happens to be a shortcut to ...word.exe

I added another 'option' called word2007, and set it as the default. The first key below was already in the registry and after the @= was "Open"
I changed it to "Word2007" and added the next two keys myself

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.12\shell]
@="Word2007"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.12\shell\Word2007]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.12\shell\Word2007\command]
@="\"C:\\Program Files\\Citrix\\ICA Client\\pnagent.exe\" /CitrixShortcut: (1) /QLaunch \"XenApp50:Word 2007\" %1"
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |