![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | some questions about 'username' and 'WSHshell.run' Hi,everyone!I'm new here. my company had to upgrade several softwares,so i made a little program by VBScript.when all the users used my program to upgrade their softwares,some problems happened. here are the problems: 1. if userDom="NTDM001" then (copy some files) elseif userDom > "PC4999" and userDom<"PC6000" then if userNam = "VBSADMIN" then (copy some other files) else WSHShell.Popup "Please log on with VBSADMIN.",0,"VBSITMGR",16 WScript.Quit end if end if there are several users,domain user and two local users,we want users to logon with domain user or local user(VBSADMIN),when they logon with another local user(VBSUSER),the popup will show(Please log on with VBSADMIN.).the problem is when some users logon with VBSUSER,the program recognized them as VBSADMIN.I don't know what's wrong,maybe the program is not profect. 2.objnotesJ=WSHShell.Run(CTemp&"notes8j.exe /w",, True) objExec = WSHShell.Run(CTemp&"Notes8j\setup.exe /w",, True) after unpack the compressed file(notes8j.exe),the program will run setup.exe,it happened to a few computers,the program didin't run setup.exe,and there wasn't error message either. Plese help me find the answers. *** Sent via Developersdex http://www.developersdex.com *** |
My System Specs![]() |
| | #2 (permalink) |
| | Re: some questions about 'username' and 'WSHshell.run' *** See below. "carol wang" <carolwinjapan@xxxxxx> wrote in message news:Om$Td32CKHA.3368@xxxxxx Quote: > > Hi,everyone!I'm new here. > my company had to upgrade several softwares,so i made a little > > program by VBScript.when all the users used my program to upgrade > > their softwares,some problems happened. here are the problems: > > 1. if userDom="NTDM001" then > (copy some files) > elseif userDom > "PC4999" and userDom<"PC6000" then > if userNam = "VBSADMIN" then > (copy some other files) > else > WSHShell.Popup "Please log on with > > VBSADMIN.",0,"VBSITMGR",16 > WScript.Quit > end if > end if > > there are several users,domain user and two local users,we want users > to logon with domain user or local user(VBSADMIN),when they logon > with another local user(VBSUSER),the popup will show(Please log on > with VBSADMIN.).the problem is when some users logon with VBSUSER,the > program recognized them as VBSADMIN.I don't know what's wrong,maybe > the program is not profect. *** comes from. Quote: > 2.objnotesJ=WSHShell.Run(CTemp&"notes8j.exe /w",, True) > objExec = WSHShell.Run(CTemp&"Notes8j\setup.exe /w",, True) > > after unpack the compressed file(notes8j.exe),the program will run > setup.exe,it happened to a few computers,the program didin't run > setup.exe,and there wasn't error message either. > Plese help me find the answers. *** You can probably work it out yourself by inserting this line *** in your code: *** wscript.echo "Command=" & CTemp & "Notes8j\setup.exe /w" *** Note also that the line "objExec = " is misleading. The "Run" *** method returns an integer, not an object. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| WshShell.Exec workaround | VB Script | |||
| Vista login "incorrect username or password" with correct username and password entry | Vista General | |||
| Using WshShell.Exec and retrieving output | VB Script | |||
| WshShell.RegRead | VB Script | |||
| Supplying a variable to wshshell.Run | VB Script | |||