Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Please Help!!
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
juan.lazaro.sanc...@gmail.com  
View profile  
 More options Oct 4 2012, 6:29 pm
Newsgroups: microsoft.public.scripting.vbscript
From: juan.lazaro.sanc...@gmail.com
Date: Thu, 4 Oct 2012 15:29:27 -0700 (PDT)
Local: Thurs, Oct 4 2012 6:29 pm
Subject: Please Help!!
Can a VBexpert please help?  My script won't run.  

Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("PROCESS")

cmdpath = "\System32\cmd.exe /c"
adminuser = "blahdomain\blahuser"
windir = WshSysEnv("WINDIR")
cmdpath = windir & cmdpath
CRLF = chr(10) & chr(13)

strAccountPassword = "blah"

WshShell.Run cmdpath
WScript.Sleep 150
WshShell.AppActivate cmdpath
WScript.Sleep 150
WshShell.SendKeys runas /user:adminuser "cscript.exe C:\scripts\script.vbs" & CRLF
WScript.Sleep 150
WshShell.SendKeys strAccountPassword & CRLF
WScript.Sleep 150
WshShell.SendKeys "pause" & CRLF


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.