cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-19196%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESolicitud%20de%20clic%20una%20vez%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-19196%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%C2%BFAlguien%20tiene%20la%20sintaxis%20necesaria%20para%20ejecutar%20una%20aplicaci%C3%B3n%20de%20hacer%20clic%20una%20vez%3F%20He%20intentado%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%230000dd%3B%20font-size%3A%2010pt%3B%20font-family%3A%20Consolas%3B%22%3EEjecute%20el%20programa%3C%2FSPAN%3E%3CSTRONG%20style%3D%22%3A%20%3B%20font-size%3A%2010pt%3B%20font-family%3A%20Consolas%3B%22%3E(Es%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20font-family%3A%20Consolas%3B%22%3Eejecutable%20%3CSTRONG%3E(%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23800080%3B%20font-size%3A%2010pt%3B%20font-family%3A%20Consolas%3B%22%3E%22aplicaci%C3%B3n%20de%20hacer%20clic%20una%20vez%22%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E))%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000080%3B%20font-size%3A%2010pt%3B%20font-family%3A%20Consolas%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20font-family%3A%20Consolas%3B%22%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20font-family%3A%20Consolas%3B%22%3ELo%20cual%20pens%C3%A9%20que%20no%20funcionar%C3%ADa.%20%C2%BFHay%20m%C3%A1s%20opciones%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216848%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Aplicaci%C3%B3n%20ClickOnce%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216848%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EUsando%20el%20m%C3%A9todo%20rundll32%2C%20el%20par%C3%A1metro%20se%20puede%20pasar%20al%20programa%20clickonce%20como%20se%20muestra%20a%20continuaci%C3%B3n%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ERunProgram(%0A%09executable(%20%22rundll32.exe%22%20)%2C%0A%09options(%20%7B%22dfshim.dll%2CShOpenVerbShortcut%22%2C%22PathToShortcut.appref-ms%7Cparameter%22%7D%20)%2C%20%0A%09readfunction(%20%22text%22%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216553%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Aplicaci%C3%B3n%20ClickOnce%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216553%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EEl%20m%C3%A9todo%20rundll32%20funciona%20por%20s%C3%AD%20solo%2C%20pero%20no%20puedo%20encontrar%20una%20manera%20de%20pasar%20el%20par%C3%A1metro%20al%20.appref-ms.%20Finalmente%20resolv%C3%AD%20el%20problema%20usando%20lo%20siguiente%3A%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ERunProgram(%0A%09executable(%20%22cmd.exe%22%20)%2C%0A%09options(%0A%09%09%7B%22%2Fc%22%2C%0A%09%09%22%5C!%22PathToShortcut.appref-ms%5C!%22%22%2C%0A%09%09%22parameter%22%7D%0A%09)%2C%0A%09readfunction(%20%22text%22%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAgregu%C3%A9%20comillas%20dobles%20a%20mi%20PathToShortcut.appref-ms%20porque%20tiene%20espacios.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-19198%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Aplicaci%C3%B3n%20ClickOnce%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-19198%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ELo%20descubr%C3%AD%20despu%C3%A9s%20de%20hurgar%20bastante.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Eweb(%22%20%3CSPAN%20style%3D%22color%3A%20%23800080%3B%20font-family%3A%20Consolas%3B%22%3Ehaga%20clic%20una%20vez%20en%20la%20aplicaci%C3%B3n.appref-ms%22)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22mce_paste_marker%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-19197%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Aplicaci%C3%B3n%20ClickOnce%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-19197%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ELo%20siguiente%20podr%C3%ADa%20ser%20%C3%BAtil%2C%20fue%20tomado%20de%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.brad-smith.info%2Fblog%2Farchives%2F535%22%20title%3D%22http%3A%2F%2Fwww.brad-smith.info%2Fblog%2Farchives%2F535%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttp%3A%2F%2Fwww.brad-smith.info%2Fblog%2Farchives%2F535%3C%2FA%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CH2%20id%3D%22toc-hId--1333076473%22%20id%3D%22toc-hId-1790587000%22%3EIniciar%20aplicaciones%20ClickOnce%3C%2FH2%3E%3CP%3EA%20diferencia%20de%20los%20ejecutables%20normales%2C%20las%20aplicaciones%20implementadas%20mediante%20ClickOnce%20se%20inician%20mediante%20un%20programa%20previo%20(que%20normalmente%20es%20manejado%20por%20el%20shell).%20Esto%20incluye%20aplicaciones%20escritas%20en%20Windows%20Forms%2C%20WPF%20o%20Silverlight.%20Los%20accesos%20directos%20a%20las%20aplicaciones%20ClickOnce%20tienen%20la%20extensi%C3%B3n%20%3CSPAN%20class%3D%22fixed-width%22%3E.appref-ms%3C%2FSPAN%3E%20(en%20lugar%20de%20%3CSPAN%20class%3D%22fixed-width%22%3E.lnk%3C%2FSPAN%3E%20para%20los%20accesos%20directos%20normales)%20y%20el%20comando%20de%20inicio%20no%20reconoce%20estos%20archivos%20(como%20en%20el%20ejemplo%20anterior).%3C%2FP%3E%3CP%3EAfortunadamente%2C%20se%20pueden%20ejecutar%20utilizando%20la%20siguiente%20sintaxis%3A%3C%2FP%3E%3CP%20class%3D%22syntaxhighlighter%22%3E%3C%2FP%3E%3CDIV%20class%3D%22bar%22%3E%3CP%20class%3D%22lines%22%3E%3C%2FP%3E%3CDIV%20class%3D%22alt1%20line%22%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%20class%3D%22number%22%3E%3CCODE%3E1%3C%2FCODE%3E%3C%2FTD%3E%3CTD%20class%3D%22content%22%3E%3CCODE%20class%3D%22plain%22%3Erundll32.exe%20dfshim.dll%2CShOpenVerbShortcut%20%5Bpath%20to%20appref-ms%20file%5D%3C%2FCODE%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3EDonde%20%3CSPAN%20class%3D%22fixed-width%22%3E%5Bruta%20al%20archivo%20appref-ms%5D%3C%2FSPAN%3E%20es%20la%20ruta%20completa%20al%20archivo%20de%20acceso%20directo%20de%20ClickOnce.%20La%20ruta%20puede%20incluir%20variables%20de%20entorno%20como%20%3CSPAN%20class%3D%22fixed-width%22%3E%25USERPROFILE%25%3C%2FSPAN%3E%20si%2C%20por%20ejemplo%2C%20desea%20se%C3%B1alar%20un%20acceso%20directo%20en%20el%20escritorio%20del%20usuario.%3C%2FP%3E%3CP%3E%C2%BFC%C3%B3mo%20funciona%20esto%3F%3C%2FP%3E%3CUL%3E%3CLI%3EEl%20comando%20%3CSPAN%20class%3D%22fixed-width%22%3Erundll32%3C%2FSPAN%3E%20ejecuta%20una%20funci%C3%B3n%20en%20una%20DLL%20Win32%20como%20si%20fuera%20un%20archivo%20ejecutable.%20Es%20posible%20que%20desee%20utilizar%20esto%20cuando%20tenga%20una%20funci%C3%B3n%20que%20se%20llama%20predominantemente%20desde%20el%20c%C3%B3digo%20(pero%20que%20a%C3%BAn%20funciona%20de%20forma%20independiente)%2C%20si%20desea%20evitar%20la%20creaci%C3%B3n%20de%20muchos%20ejecutables%20cuando%20una%20sola%20DLL%20ser%C3%A1%20suficiente%2C%20o%20para%20ofuscar%20deliberadamente%20un%20comando%20que%20los%20usuarios%20no%20est%C3%A1n%20destinados.%20para%20comenzar.%3C%2FLI%3E%3CLI%3E%3CSPAN%20class%3D%22fixed-width%22%3Edfshim.dll%3C%2FSPAN%3E%20es%20responsable%20de%20gran%20parte%20de%20la%20funcionalidad%20de%20ClickOnce%3B%20contiene%20funciones%20para%20instalar%2C%20eliminar%2C%20iniciar%20y%20actualizar%20aplicaciones%20y%20se%20distribuye%20como%20parte%20de%20.NET%20Framework.%3C%2FLI%3E%3CLI%3EEl%20nombre%20de%20la%20funci%C3%B3n%20que%20queremos%20es%20%3CSPAN%20class%3D%22fixed-width%22%3EShOpenVerbShortcut%3C%2FSPAN%3E%20%2C%20que%20es%20la%20misma%20funci%C3%B3n%20que%20utiliza%20el%20shell%20de%20Windows%20para%20ejecutar%20archivos%20de%20acceso%20directo%20.appref-ms.%20Simplemente%20pasas%20una%20ruta%20a%20la%20funci%C3%B3n%20y%20ella%20se%20encarga%20del%20resto.%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
kyle_lamson
Level II

Clickonce Application

Does anyone have the syntax needed to run a clickonce application. I've tried

RunProgram(executable("clickonce application"));

Which I figured wouldn't work. Are there any other options?

4 REPLIES 4
txnelson
Super User

Re: Clickonce Application

The following might be of use, it was taken from:

http://www.brad-smith.info/blog/archives/535

Starting ClickOnce applications

Unlike normal executables, applications deployed using ClickOnce are started using a bootstrapper (which is normally handled by the shell). This includes applications written in Windows Forms, WPF or Silverlight. Shortcuts to ClickOnce apps have the extension .appref-ms (rather than .lnk for regular shortcuts), and these files are not recognised by the start command (as in the previous example).

Thankfully, they can be run using the following syntax:

1rundll32.exe dfshim.dll,ShOpenVerbShortcut [path to appref-ms file]

Where [path to appref-ms file] is the full path to the ClickOnce shortcut file. The path may include environment variables such as %USERPROFILE% if, for example, you want to point to a shortcut on the user’s desktop.

How does this work?

  • The rundll32 command executes a function in a Win32 DLL as if it were an executable file. You might want to use this when you have a function which is predominantly called from code (but still operates independently), if you want to avoid creating many executables when a single DLL will suffice, or to deliberately obfuscate a command that users are not intended to start.
  • dfshim.dll is responsible for much of the functionality in ClickOnce; it contains functions to install, remove, start and update applications, and is distributed as part of the .NET Framework.
  • The name of the function we want is ShOpenVerbShortcut, which is the same function that the windows shell uses to run .appref-ms shortcut files. You simply pass a path to the function and it takes care of the rest.
Jim
pzang
Level III

Re: Clickonce Application

The rundll32 method works by itself but I cannot find a way to pass parameter to the .appref-ms.  I eventually solved the problem by using the following:

 

 

RunProgram(
	executable( "cmd.exe" ),
	options(
		{"/c",
		"\!"PathToShortcut.appref-ms\!"",
		"parameter"}
	),
	readfunction( "text" )
);

I added the double quotes to my PathToShortcut.appref-ms because it has spaces.

 

pzang
Level III

Re: Clickonce Application

Using the rundll32 method, the parameter can be passed to the clickonce program like below:

RunProgram(
	executable( "rundll32.exe" ),
	options( {"dfshim.dll,ShOpenVerbShortcut","PathToShortcut.appref-ms|parameter"} ), 
	readfunction( "text" )
);

 

kyle_lamson
Level II

Re: Clickonce Application

I figured it out after enough poking around.

web("clickonce application.appref-ms");

Recommended Articles