Thanks for the quick reply sirbounty, Ill test that and let you know.
Main Topics
Browse All TopicsHello Experts,
I have written a VBS script to re-install an active X component needed by our in-house software to run correctly. As you can see below, I am using a username that has admin privileges in our 2003 OU. Our problem is that only sometimes, when the (very limited) user logs in, the script looks like it is interfering with either another logon script that is being run, or with the synchronization of the workstation / username with the DC. Any help would be appreciated guys, Thanks.
Here is the script
___________
Option explicit
dim oShell
set oShell= Wscript.CreateObject("WScr
oShell.Run "runas /user:DOMAIN\USERNAME ""regsvr32 c:\windows\downlo~1\phone.
WScript.Sleep 200
oShell.Sendkeys "PASSWORD~"
oShell.Run "runas /user:DOMAIN\USERNAME ""copy \\10.168.0.62\activex\phon
WScript.Sleep 200
oShell.Sendkeys "PASSWORD~"
oShell.Run "runas /user:DOMAIN\USERNAME ""regsvr32 c:\windows\downlo~1\phone.
WScript.Sleep 200
oShell.Sendkeys "PASSWORD~"
Wscript.Quit
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: sirbountyPosted on 2007-01-04 at 05:22:28ID: 18242720
Not sure if this is your problem, but it couldn't hurt to try...
svr32.exe %systemroot%\downlo~1\phon e.ocx /u /s" & chr(34)
e.ocx %systemroot%\downlo~1\ /y" & chr(34)
svr32 %systemroot%downlo~1\phone .ocx /s" & chr(34)
1) - removed the double quotes and replaced with chr(34) quote char
2) added system variable pointer to windows installation folder - not sure if that's an issue - but it's safest to use the environment
3) You should probably also 'spell' out the doanloaded installations or downloaded program files...the 8.3 shortcut name is not always accurate and you could be pointing to one you're not intending to... Use the same method with the chr(34) to enclose the complete path string
oShell.Run "runas /user:DOMAIN\USERNAME " & chr(34) & "%systemroot%\system32\reg
WScript.Sleep 200
oShell.Sendkeys "PASSWORD~"
1) copy is an internal command - so test that it doesn't need the command interpreter to run...
2) same applies here for downlo~1
oShell.Run "runas /user:DOMAIN\USERNAME " & chr(34) & "cmd /c copy \\10.168.0.62\activex\phon
WScript.Sleep 200
oShell.Sendkeys "PASSWORD~"
1) again - environment change
2) downlo~1 should be corrected
oShell.Run "runas /user:DOMAIN\USERNAME " & chr(34) & "%systemroot%\system32\reg
WScript.Sleep 200
oShell.Sendkeys "PASSWORD~"