Link to home
Start Free TrialLog in
Avatar of John Darby
John DarbyFlag for United States of America

asked on

CMD to VBS

Greetings,

is there an easy way to port the below CMD commands into a simple VBS script?

Thank you,
JohnD

reg add HKLM\SOFTWARE\Microsoft\ClickToRun\OverRide /v DontVerify /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Microsoft\StrongName\Verification\*,71e9bce111e9429c /f
reg add HKLM\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,71e9bce111e9429c /f
reg add HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration\ /v UpdateURL /d http://officecdn.microsoft.com/pr/b61285dd-d9f7-41f2-9757-8f61cba4e9c8/ /f
net stop ClickToRunSvc
net start ClickToRunSvc
start /d "C:\Program Files\Common Files\microsoft shared\ClickToRun" officec2rclient.exe /update user
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

VBS is, by it's nature, more complicated than batch in general.  You could do a series of
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd.exe /C insert your commands here"
Set oShell = Nothing

But I would ask WHY turn it into VBS?
And you can use other vb specific methods to edit the registry / start and stop services... but they would turn the single lines of code you have into several lines of code - not "simple"
Avatar of John Darby

ASKER

Thanks Lee, I need to add a digital signature is the reason
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Wow; I am definitely the student, here. Thank you for your splendid instruction. oBdA, you are my favorite rocket scientist...truly, thank you for your help and guidance!
JohnD, the Wandering PM
Avatar of oBdA
oBdA

Oh, just noticed that I left my test "ACME" in the registry paths above, but I guess you found it; sorry for that.
No Worries, I found it :)