Compiling. WSH, possible?

Posted by R0y on Thu 04 May 2006 06:41 AM — 8 posts, 30,044 views.

#0
I am trying to compile this:

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.RegWrite "HKEY_USERS\.DEFAULT\Control Panel\Colors\Background", "0 0 0", "REG_SZ"

Is this possible, it usually comes with an error with the "set" on the first line, or compiling and not working.

Is this possible at all with WSH being used, if so can someone let me know changes that would need to be made.

Thanks,
Roy.
#1
Does the user you're running this as have Administrative or Power User access? If not, you may not have full access to WSH.
Australia Forum Administrator #2
Your call is wrong. It should be:


Set WshShell = CreateObject("WScript.Shell")



CreateObject is not a member of Wscript.
#3
My user can not run vbs scripts, but is obviouasly allowed to run exe or bat files. So I want to put this code into an exe/bat or compie it.

(Taking out the wscript call did not fix. Although vbs still worked)
Australia Forum Administrator #4
What user is that? Is this anything to do with MUSHclient, which is where this question is posted?
#5
This is my windows domain user.

no sorry- I've got the wrong section apparently saw VBS so......sorry, but if you can help still...plz?
Australia Forum Administrator #6
Depending on configuration, the WSH may be disabled. It is hard to be more specific than that.
#7
Ok , yeah thx- I am sorry to post in the wrong section- I have got it worked out now....