mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

%comspec% Error

Author Message
dnomde44

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 9/7/2010
  • Status: offline
%comspec% Error Tuesday, September 07, 2010 8:01 AM (permalink)
0
[Helpful answer received] / [List Solutions Only]
I am tryin to create a script to automatically add a user to the local machine for remote desktop. I keep receiving an error expected end of statement at the R in remote desktop users line. I have tried for several days now and I am running out of reasons why it wont work. I am new to vbscript writing sorry to bother with what may be a trivial problem.
 
option explicit
dim objshell
set objshell = createobject("wscript.shell")
objshell.run "%comspec% /k net localgroup "remote desktop users" domain\user /add"
wscript.quit
 
 
#1
    rasimmer

    • Total Posts : 2360
    • Scores: 163
    • Reward points : 0
    • Joined: 3/19/2009
    • Location: Cedar Rapids, IA
    • Status: offline
    Re:%comspec% Error Tuesday, September 07, 2010 2:32 PM (permalink)
    0
    [This post was marked as helpful]
    objshell.run "%comspec% /k net localgroup " & Chr(34) & "remote desktop users" & Chr(34) & " domain\user /add"
    #2
      dnomde44

      • Total Posts : 2
      • Scores: 0
      • Reward points : 0
      • Joined: 9/7/2010
      • Status: offline
      Re:%comspec% Error Wednesday, September 08, 2010 2:37 AM (permalink)
      0
      Thank you so much!!!!!! I would have never figured that out. now I am going to look up those concatenation commands to learn what they mean lol
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.8
        mbt shoes www.wileywilson.com