This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Cant make Shortcut Run Minimised (Win)
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 30, 2011
11:02 AM
Cant make Shortcut Run Minimised (Win)
Newbie - so please excuse me if my searching skills did not reveal an existing answer...
At the moment IA successfully creates a Windows Desktop Shortcut to a batch file that in turn launches a Java Desktop App. The stdout and stderr are useful in the DOS window so I don't want to run javaw.exe but I would like to minimise the DOS window.
Now MS-Windows shortcuts allow you to specify "Run Minimised" but the IA "Create Alias, Link, Shortcut" doesn't have that option.
Am I missing something? or if I'm right, has anyone found a way around it?
Cheers
Jim
At the moment IA successfully creates a Windows Desktop Shortcut to a batch file that in turn launches a Java Desktop App. The stdout and stderr are useful in the DOS window so I don't want to run javaw.exe but I would like to minimise the DOS window.
Now MS-Windows shortcuts allow you to specify "Run Minimised" but the IA "Create Alias, Link, Shortcut" doesn't have that option.
Am I missing something? or if I'm right, has anyone found a way around it?
Cheers
Jim
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 31, 2011
07:07 AM
As a work around (because I have custom code running anyway) I have opted to
[LIST=1]
detect Windows
create a vb script file
create the contents (according to the users install choices - e.g. location) like this..
And then execute it
using the cscript exe that is standard on XP, Vista and Windows 7.
Simple. Well simpler than calling the Windows API from Java.
Anyone know a workaround for Linux?
I'm presuming MacOSX doesn't show you the console anyway - can't test at the moment.
[LIST=1]
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oMyShortcut = WshShell.CreateShortcut(strDesktop & "\Sentences 4.0.39.PE.lnk")
oMyShortcut.WindowStyle = 7
oMyShortcut.IconLocation = "C:\Program Files\Lazy\SentencesPersonal40\sentences.ico"
oMyShortcut.Description = "Start Sentences Personal Edition"
OMyShortcut.TargetPath = "C:\Program Files\Lazy\SentencesPersonal40\sentences.bat"
OMyShortcut.WorkingDirectory = "C:\Program Files\Lazy\SentencesPersonal40\sentences.bat"
oMyShortCut.Save
And then execute it
Process p = Runtime.getRuntime().exec("cscript //T:1 short.vbs", null, dir);
using the cscript exe that is standard on XP, Vista and Windows 7.
Simple. Well simpler than calling the Windows API from Java.
Anyone know a workaround for Linux?
I'm presuming MacOSX doesn't show you the console anyway - can't test at the moment.
![](/skins/images/7DF1852B2C95702E61A73F170B191DAC/responsive_peak/images/icon_anonymous_message.png)