Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ VBscript ➜ Compiling. WSH, possible?

Compiling. WSH, possible?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by R0y   (4 posts)  Bio
Date Thu 04 May 2006 06:41 AM (UTC)
Message
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.
Top

Posted by Beale   (35 posts)  Bio
Date Reply #1 on Thu 04 May 2006 05:01 PM (UTC)
Message
Does the user you're running this as have Administrative or Power User access? If not, you may not have full access to WSH.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 04 May 2006 09:57 PM (UTC)
Message
Your call is wrong. It should be:


Set WshShell = CreateObject("WScript.Shell")



CreateObject is not a member of Wscript.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by R0y   (4 posts)  Bio
Date Reply #3 on Fri 05 May 2006 06:37 AM (UTC)
Message
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)
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 05 May 2006 07:07 AM (UTC)
Message
What user is that? Is this anything to do with MUSHclient, which is where this question is posted?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by R0y   (4 posts)  Bio
Date Reply #5 on Fri 05 May 2006 08:05 AM (UTC)
Message
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?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #6 on Mon 08 May 2006 10:45 PM (UTC)
Message
Depending on configuration, the WSH may be disabled. It is hard to be more specific than that.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by R0y   (4 posts)  Bio
Date Reply #7 on Tue 09 May 2006 12:48 PM (UTC)
Message
Ok , yeah thx- I am sorry to post in the wrong section- I have got it worked out now....
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


22,899 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.