desktop-shortcut

How to pass WindowState from desktop shortcut into WPF app?

北战南征 提交于 2020-01-03 17:12:13
问题 How can I control the initial WindowState (Normal, Minimized, Maximized) of a WPF main window from a desktop shortcut? The "Run:" combobox of the shortcut's properties dialog let's me choose between "Normal window", "Minimized" and "Maximized". But this option seems to be completely ignored by WPF apps. With WinForms this was automatically supported with no additional code. Is there a way to access this option from the launched WPF process? I know I can specify the ProcessStartInfo

.bashrc not read when shell script is invoked from desktop shortcut

▼魔方 西西 提交于 2019-12-29 05:28:21
问题 I have a simple problem understanding a behavior in linux. In short, on linux if i invoke my sh script from a 'Desktop Shortcut' then the script cannot see the latest environment variables (set in bashrc). So i was wondering that in what scope is this shell script located ? To create a testcase and reproduce: Create a simple shell script 'testme.sh' : !/bin/sh echo "Hi This is a test script checking the env var"; echo "TESTVAR = $TESTVAR"; read in echo "Done"; create a desktop shortcut for

Python-Application .desktop-shortcut causing malfunction

谁说我不能喝 提交于 2019-12-25 14:50:00
问题 I wanted to create a desktop launcher for my Python application. The application executes various ssh operations over pexpect with publickey-authentication. The problem is however, when I start my app with the .desktop launcher it doesn't work properly. The ssh connections ask for a password and don't use the publickeys. But it works fine via commandline execution. The .desktop File looks like this: [Desktop Entry] Version=1.0 Name=SSH-Manager Comment=XYZ Exec=python /home/userx/SSH-Manager

Python-Application .desktop-shortcut causing malfunction

半腔热情 提交于 2019-12-25 14:49:08
问题 I wanted to create a desktop launcher for my Python application. The application executes various ssh operations over pexpect with publickey-authentication. The problem is however, when I start my app with the .desktop launcher it doesn't work properly. The ssh connections ask for a password and don't use the publickeys. But it works fine via commandline execution. The .desktop File looks like this: [Desktop Entry] Version=1.0 Name=SSH-Manager Comment=XYZ Exec=python /home/userx/SSH-Manager

Different behaviour of DOS Environment setting, in if statement, in DOS prompt as compared to Windows Shortcut

时光毁灭记忆、已成空白 提交于 2019-12-25 01:38:55
问题 This seems so simple, but has turned out to be such a pain. On Windows 7, I can paste the below into a command prompt and have it set ProgramFiles(x32) to either %programfiles% or %programfiles(x86)% then echo what it was set to: %comspec% /c if exist "%programfiles%" (set "ProgramFiles(x32)=%programfiles%") else (set "%ProgramFiles(x32)=%programfiles(x86)%") && set Program && echo %programfiles(x32)% && pause However when putting this same command into a shortcut, I get this: What is going

Copy XREExeF and paste as file shortcut

前提是你 提交于 2019-12-24 12:33:33
问题 In my addon I was launching Firefox profiles by doing this: var exe = FileUtils.getFile('XREExeF', []); //this gives path to executable var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess); process.init(exe); var args = ['-P', profName, '-no-remote']; //-new-instance if (url) { args.push('about:home'); args.push(url); } process.run(false, args, args.length); So this adds command line arguments and launches it. However this leads to some problems. Users want to pin the

Which app has the focus when a global shortcut is triggered

試著忘記壹切 提交于 2019-12-24 04:28:10
问题 I use a global shortcut to popup a dialog. But I would like to fill the dialog depending on the application having the focus at the moment the shortcut is triggered. But I can not find a way to do it. I read the extension code here but it's hard to know how to modify the code, and how to recompile electron. If someone have a pointer, that will be greatly appreciated :) 回答1: I couldn't find a way to know which app had the focus before, but I was able to hide my app and return the focus to the

Create a Windows Shortcut (.lnk) in Go

最后都变了- 提交于 2019-12-23 00:52:25
问题 I would like to create a Windows Shortcut (.lnk) to the desktop and the startmenu in Golang. I actually got the Desktop & Startmenu folders via the gowin module and I would like to create a shortcut to thoses locations. I searched but I did not find any golang project for it. Should I create it ? Is there an other pretty method ? 回答1: Using https://github.com/go-ole/go-ole: ole.CoInitializeEx(0, ole.COINIT_APARTMENTTHREADED|ole.COINIT_SPEED_OVER_MEMORY) oleShellObject, err := oleutil

Change target of shortcut created in Powershell

家住魔仙堡 提交于 2019-12-20 05:49:19
问题 I've got a script that installs a certain BP Program called iLink (Crosslink). The Script works fine and installs Java 6.21 and both Crosslink Components and also installs through DISM .Net 3.5 perfectly. However, the only drawback is that the web version only works on a admin run internet explorer process. I've got it to create a shortcut on the users desktop but I want the script to change the target of it from: "C:\Program Files\Internet Explorer\iexplore.exe" to runas.exe /user:capeplc\a

How to create a batch file to create a shortcut to a webpage

帅比萌擦擦* 提交于 2019-12-19 04:08:37
问题 I want to create a batch file which creates a shortcut on the desktop or in the start menu. The shortcut needs to open a webpage which is a local windows server ip address(like 'http:\192.168. .* :81\'). I also want to provide a custom image icon to the shortcut. 回答1: I know this is an old thread but it was the first StackOverFlow page to popup in Google, so I thought I'd make a reply. The following is a batch script that I use to manage URL shortcuts: (please note that this script assumes