Archive for the ‘vbscript’ Tag

LSF reports “CScript Error: Loading your settings failed. (Access is denied. )”

Wednesday, March 18th, 2015

This was an odd error. We are setting up a new image for our farm and one user reported this message when he submitted his jobs:

CScript Error: Loading your settings failed. (Access is denied. )

Everything looked in order but for some reason his vbscript job failed. Looking around the Net, I did find a kb article which mentioned enabling vbscript for CGI. It seemed odd bot be touching the users key but I gave it a try.

I created the following keys:

HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script Host
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script Host\Settings

The technote said to verify Everyone has access but I decided to leave it to the Users group.

I also decided to also add the following entries in the settings key:

BatchMode: REG_DWORD: 0
DisplayLogo: REG_DWORD: 0
Timeout: REG_DWORD: 0

There was no need for a reboot.

The user was able to submit jobs after that.

I did not heavily research the reason but I am assuming with Microsoft’s effort to go into Powershell (you should look at it if you haven’t); some things are left out of the Windows Scripting Host on new installs or this was a case of the user once being a local admin and that was removed.

-UPDATE-

Well now. This turned out to not be the case. We have working on automating the setups and this is what caused the problem. In the past, we would login as a specific user and finish the install. Debugging we would login as a user and the problem went away.

The villain?  No user profile on the system!

Once we logged in as the user and the profile was created; job submits worked!

A nuance that is easy to miss!

Advertisements

wscript.echo without a charriage return.

Saturday, August 25th, 2012

I was writing a small script to obtain and display server network information.   Part of a project to re-ip a network.

One thing I wanted to have was formatted output and found wscript.echo was adding a carriage return to the output. I looked around to see if there was a way to disable it.

wscript.echo does this by design. There is no way to disable it.

The way to get around this is to use : Wscript.StdOut.Write

For example:

Wscript.StdOut.Write (“Enter something: “)

Wscript.StdOut.Write “You entered : ” & Wscript.StdIn.ReadLine

You will have to add is a “vbCrLf” at the end to cause a CR.