shortcut

Opening a program with PowerShell from a shortcut

混江龙づ霸主 提交于 2020-01-02 08:33:26
问题 I have a problem with creating a shortcut that opens a certain program in Powershell. It is part of a small game server. Therefore the server folder needs to be able to be copied, to create another server. The program needs to be run in administrator mode. It needs to work for both cmd an powershell (I don't mind if they are 2 different shortcuts due to syntax). What I have so far: CMD: %SystemRoot%\System32\cmd.exe /c D: & cd "D:\Path\to\server\folder\" & Server.exe PowerShell: %SystemRoot%

Opening a program with PowerShell from a shortcut

纵饮孤独 提交于 2020-01-02 08:31:09
问题 I have a problem with creating a shortcut that opens a certain program in Powershell. It is part of a small game server. Therefore the server folder needs to be able to be copied, to create another server. The program needs to be run in administrator mode. It needs to work for both cmd an powershell (I don't mind if they are 2 different shortcuts due to syntax). What I have so far: CMD: %SystemRoot%\System32\cmd.exe /c D: & cd "D:\Path\to\server\folder\" & Server.exe PowerShell: %SystemRoot%

How to convert from lower to upper case in Sublime 3

坚强是说给别人听的谎言 提交于 2020-01-02 00:42:28
问题 Is there a shortcut or function for upper/lower-casing the selected text in Sublime 3? 回答1: if you need convert any text, select and press: ctrl + KU 回答2: If you go to the Edit menu and select Convert Case you'll find several options, with the appropriate shortcuts listed next to them. Additionally, the Case Conversion plugin, available through Package Control, adds a number of additional options to this menu for converting variables, such as snake_case , camelCase , PascalCase , dot.case ,

How to edit shortcut properties where shortcut name has registered text ®

穿精又带淫゛_ 提交于 2020-01-01 17:15:07
问题 I am trying to edit the properties of the shortcut using batch script. But the short cut name includes a character ® hence when i run the changeproperties.bat file it fails to read the file name correctly. I am able to do the same task via poweshell. My powershell script has belwo line and it works $shortCut = ("$desktop\testapp®.lnk") $shell = New-Object -COM WScript.Shell $shortcut = $shell.CreateShortcut($shortCut) ## Open the lnk $shortcut.TargetPath = "C:\Users\Public\newtarget.bat"

Taskbar icon for all users

帅比萌擦擦* 提交于 2020-01-01 12:30:08
问题 is it possible to create taskbar icons (shortcuts, shell links, whatever you want them to be named) in the installer in Windows 7? I know this is not possible with the quick launch toolbar in previous windows version, but maybe something has changed in windows 7? 回答1: I'm assuming you want to pin an icon to the taskbar. No , that is not programmatically possible, and with good reason. It is your user's job to decide if your program is cool enough that they want it to be pinned to the taskbar.

How to create start menu shortcut

泄露秘密 提交于 2019-12-31 21:09:39
问题 I am building a custom installer. How can I create a shortcut to an executable in the start menu? This is what I've come up with so far: string pathToExe = @"C:\Program Files (x86)\TestApp\TestApp.exe"; string commonStartMenuPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu); string appStartMenuPath = Path.Combine(commonStartMenuPath, "Programs", "TestApp"); // TODO: create shortcut in appStartMenuPath I'm targeting Windows 7. 回答1: Using the Windows Script Host (make

Netbeans PHP - add/remove curly braces plugin/shortcut

五迷三道 提交于 2019-12-31 04:25:07
问题 I love short if statements without braces (PHP) like if ($x === $y) echo $z; If I want to add a few lines (maybe just temporary for debugging) I have to manually add the braces. Is there a plugin for netbeans that does that via shortcut, something like "toggle (add/remove) previous statement braces"? 回答1: The best solution I got for now are two macros Add Curly-Braces: caret-end-line caret-begin-line "{" insert-break Remove Curly-Braces: caret-up caret-end-line remove-word-next selection

how to add icon to application's shortcut in desktop

拜拜、爱过 提交于 2019-12-31 02:41:05
问题 I want when user runs my c# application , the application will create a desktop shortcut to run application. I use this code : private void appShortcutToDesktop(string linkName) { string deskDir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); using (StreamWriter writer = new StreamWriter(deskDir + "\\" + linkName + ".url")) { string app = System.Reflection.Assembly.GetExecutingAssembly().Location; writer.WriteLine("[InternetShortcut]"); writer.WriteLine("URL=file:///"

Inno Setup Start menu uninstall shortcut is not shown on Windows 10

让人想犯罪 __ 提交于 2019-12-30 09:51:35
问题 I've got an issue that seems to be specific to Windows 10 with the Start menu uninstall shortcut I create in my setup. The shortcut is simply not shown. However, others shortcuts I create are shown as well... Here is the value for DefaultGroupName : DefaultGroupName={#MyAppPublisher}\MyCompany\MySoftwareName Here are my entries for shortcuts in [Icons] section: [Icons] Name: "{group}\{#MyAppName} {#MyAppVersion}"; Filename: "{app}\MyExeName.exe"; WorkingDir: "{app}" Name: "{commondesktop}\{

Change a shortcut's target from command prompt

六眼飞鱼酱① 提交于 2019-12-30 02:56:10
问题 I'm normally a Linux guy, but I need to write a batch script on Windows to change the target of some shortcuts. Is there a command to do that? 回答1: I doubt there is a way to do it with a batch script. It's doable in VBScript, though. Set sh = CreateObject("WScript.Shell") Set shortcut = sh.CreateShortcut("C:\Wherever\Shortcut.lnk") shortcut.TargetPath = "C:\Wherever\Whatever.txt" shortcut.Save Save the script in a file ending in vbs and run it from the command line using cscript whatever.vbs