If you have to run a logon script in a user session, a command prompt window might pop up before the script completes. You can prevent this console window from displaying, and run your logon script in the background, with the Hstart tool.

In a previous article, where I explained how to unpin the Store icon from the Taskbar with a logon script, I promised to explain in a later post how you can avoid the popup window with logon scripts. This is the post where I will keep this promise.

Popup windows usually only occur when you work with the Group Policy logon scripts in User Configuration > Policies > Administrative Templates > Logon. These logon scripts are useful if you want to manipulate objects on a user’s desktop.

Most users probably won’t mind such popups, especially if they are used to them. However, if you are working with those logon scripts for the first time, some users might worry and call the help desk. With the little tool Hstart, you can run logon scripts in the background and your users won’t notice that their desktop environment is manipulated.

Using Hstart is fairly simple:

hstart /NOCONSOLE batch.bat

The NOCONSOLE switch ensures that console applications will run without any windows.

If you want to use Hstart for your logon script, your command for the corresponding Group Policy setting might look like this:

\\Server\share\hstart.exe /NOCONSOLE \\Server\share\batch.bat

For this to work, you have to copy hstart.exe to the network share on your server.

Logon script without console window

Logon script without console window

Notice that a 32-bit and a 64-bit version of Hstart exist. It is essential that you use the correct version; otherwise, your users might not even be able to log on.

Failed to create process - Hstart

Failed to create process - Hstart

The name of the 64-bit version is hstart64.exe. Hstart can do a lot more than just run scripts without a console window.

Hstart features

Hstart features

In particular, you can use the tool to launch scripts with administrator privileges and without UAC prompts in end user sessions. However, only the commercial version, which costs $19.95, has this feature. For this to work, the tool can add itself to the Task Scheduler.

Hstart comes with a GUI that helps you create the command with the correct syntax.

Hstart GUI

Hstart GUI

The website of the tool only mentions Windows 7 and Windows Vista. For this test, I only tried the NOCONSOLE switch, and it worked fine on Windows 8.1. If you want to work with one of the other features on Windows 8 and Windows 8.1, you had better contact ntwind software before you shell out the $19.95. The NOCONSOLE switch also works in the unregistered version.

2 Comments
  1. Alexander 8 years ago

    There is a better solution:
    http://code.kliu.org/misc/hideexec/
    It’s small, simple and free.

  2. Alexander, thanks for the hint!

Leave a reply to Alexander Click here to cancel the reply

Please enclose code in pre tags

Your email address will not be published.

*

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account