Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- func MsiGetComponentPath(szProduct *uint16, szComponent *uint16, lpPathBuf *uint16, pcchBuf *int) (ret int, err error)
- func MsiGetShortcutTarget(szShortcutTarget *uint16, szProductCode *uint16, szFeatureId *uint16, ...) (ret int, err error)
- func ShellExecute(action string, path string, param string, directory string) error
- type System
- func (s *System) AppIcon(path string) (image.Image, error)
- func (s *System) Close()
- func (s *System) EmbeddedAppIcon(path string) (string, error)
- func (s *System) OpenFolder(path string) error
- func (s *System) ResolveLink(path string) string
- func (s *System) ResolveMSILink(path string) string
- func (s *System) RunProgram(path string, args string, dir string, user string) error
Constants ¶
View Source
const ( SW_HIDE = 0 SW_MAXIMIZE = 3 SW_MINIMIZE = 6 SW_RESTORE = 9 SW_SHOW = 5 SW_SHOWDEFAULT = 1 SW_SHOWMAXIMIZED = 3 SW_SHOWMINIMIZED = 2 SW_SHOWMINNOACTIVE = 7 SW_SHOWNA = 8 SW_SHOWNOACTIVATE = 4 SW_SHOWNORMAL = 1 )
View Source
const ( COINIT_APARTMENTTHREADED = 0x2 COINIT_MULTITHREADED = 0x0 COINIT_DISABLE_OLE1DDE = 0x4 COINIT_SPEED_OVER_MEMORY = 0x8 )
View Source
const ( EDIT = "edit" EXPLORE = "explore" OPEN = "open" PRINT = "print" PROPERTIES = "properties" RUNAS = "runas" )
Variables ¶
This section is empty.
Functions ¶
func MsiGetComponentPath ¶
func MsiGetShortcutTarget ¶
Types ¶
type System ¶
type System struct {
// contains filtered or unexported fields
}
func (*System) OpenFolder ¶
func (*System) ResolveLink ¶
func (*System) ResolveMSILink ¶
ResolveMSILink finds the target for what are called Advertisment Shortcuts. These are special shortcuts installed with windows installer MSI that don't follow the conventions of regular shortcuts. I had to do some funky things with CoInitialize because this code seems to only work with apartment threads, while the rest of the code in here fails with apartment threads.
Click to show internal directories.
Click to hide internal directories.