[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Compiling. WSH, possible?

Compiling. WSH, possible?

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


Posted by R0y   (4 posts)  [Biography] 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.
[Go to top] top

Posted by Beale   (35 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (22,980 posts)  [Biography] 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
[Go to top] top

Posted by R0y   (4 posts)  [Biography] 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)
[Go to top] top

Posted by Nick Gammon   Australia  (22,980 posts)  [Biography] 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
[Go to top] top

Posted by R0y   (4 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (22,980 posts)  [Biography] 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
[Go to top] top

Posted by R0y   (4 posts)  [Biography] 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....
[Go to top] 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.


19,492 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]