Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8487457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:14:47+00:00 2026-06-10T21:14:47+00:00

i create desktop shortcuts with vbscript. With the WindowsStyle property i can determine if

  • 0

i create desktop shortcuts with vbscript.

With the WindowsStyle property i can determine if shell starts minimized, maximized or last set size. But the shell’s i created have a maximum width of 80 characters.

Is there a way to set this to a bigger value? Setting font size and type would be interessing too.

set oMyShortcut = WshShell.CreateShortcut(strDesktop & "\Shortcut 

Script.lnk")oMyShortcut.WindowStyle = 4
oMyShortcut.TargetPath = "%windir%\system32\cmd.exe"
oMyShortCut.Arguments= "/K """ & strProjectHome & "\" & strSetenvPath & """"
oMyShortCut.WorkingDirectory= strProjectHome
oMyShortcut.IconLocation = "%windir%\system32\cmd.exe"
oMyShortcut.Description = "Shell for project " + strProjectName + " in directory " + strDirname +". This shortcut has been created automatically."
oMyShortCut.Save

regards
Andreas

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:14:49+00:00Added an answer on June 10, 2026 at 9:14 pm

    Sure, you can give the mode parameters like this, i commented out your parameters but you can add them also.

    Set WshShell = WScript.CreateObject("WScript.Shell")
    strDesktop = WshShell.SpecialFolders("Desktop")
    set oMyShortcut = WshShell.CreateShortcut(strDesktop & "\ShortcutScript.lnk")
    oMyShortcut.WindowStyle = 4
    oMyShortcut.TargetPath = "%windir%\system32\cmd.exe"
    'oMyShortCut.Arguments= "/K """ & strProjectHome & "\" & strSetenvPath & """"
    oMyShortCut.Arguments= "/K mode con:cols=150 lines=40"
    oMyShortCut.WorkingDirectory= strProjectHome
    oMyShortcut.IconLocation = "%windir%\system32\cmd.exe"
    oMyShortcut.Description = "Shell for project " + strProjectName + " in directory " + strDirname +". This shortcut has been created automatically."
    oMyShortCut.Save
    

    This gives a nice wide console screen when you double click the shortcut

    The only way i found to change the font is by manually changing it once on a shortcut and then use that as a template, copy it and then change the other parameters. Changing a shortcus is the same way as opening it, so

    Set WshShell = WScript.CreateObject("WScript.Shell")
    strDesktop = WshShell.SpecialFolders("Desktop")
    set oMyShortcut = WshShell.CreateShortcut(strDesktop & "\ShortcutScript.lnk")
    oMyShortCut.Arguments= "/K mode con:cols=80 lines=40"
    oMyShortCut.Save
    

    sets our shortcutfile from above in 80 cols instead of the original 120 cols.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to create a desktop like homepage where using can move around
I need to create desktop shortcuts to my app for all administratos in the
I would like to create a shortcut on the desktop using VBScript code. I
Is the option to create a desktop shortcut during installation only available if the
How can I remove a desktop shortcut by Innosetup? It's created by previous version
I create new desktop with CreateDesktop and want to get it's DC & RC.
im trying to create offline desktop application. everything is working fine. The only problem
How do you create a desktop application using C# that would look like Visual
I need to create a desktop application that will run third party code, and
I am trying to create virtual desktop. I complete successfully.But i am not able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.