snooz Posted September 13, 2005 Posted September 13, 2005 I am trying to create a script that will read a registry key;HKLM,"SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot","Path"Then take the value of "Path" and install files to that location. I have researched using INF but cannot get it to work. So I really need help finding a way to accomplish this whether it be VB, WSH, CMD etc I am not picky
IcemanND Posted September 13, 2005 Posted September 13, 2005 How about this, VBscriptSet WshShell = WScript.CreateObject("WScript.Shell")strInstallPath="HKLM\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot\Path"strFound=WshShell.RegRead(strInstallPath)msgbox strFound
snooz Posted September 13, 2005 Author Posted September 13, 2005 How about this, VBscriptSet WshShell = WScript.CreateObject("WScript.Shell")strInstallPath="HKLM\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot\Path"strFound=WshShell.RegRead(strInstallPath)msgbox strFound<{POST_SNAPBACK}>Thanks Iceman that was enough to get me started Here is the finished code is someone else needs to do something similar;Set fso = CreateObject("Scripting.FileSystemObject")Set WshShell = WScript.CreateObject("WScript.Shell")strInstallPath="HKLM\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot\Path"strFound=WshShell.RegRead(strInstallPath)fso.copyfile "EPSIMP32.FLT", strFound,TRUEfso.copyfile "*.LOCAL", strFound,TRUE
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now