post installation task to import .reg file
i would like to have a post installation task that imports a .reg file i made.
i attached the file to my post-install task.
but i do not know the command to run it silently.
any help would be great! thanks!
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
SMal.tmcc
9 years ago
Posted by:
jagadeish
9 years ago
Create a VBScript, place it in the same folder where .reg file is there and just execute the .vbs
Option Explicit
Dim objShell
Dim objFSO
Dim sCurPath
Dim sRegFile
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
sCurPath = objFSO.GetParentFolderName(WScript.ScriptFullName)
sRegFile = sCurPath & "\<MyRegFile>.reg"
objShell.Run "Cmd.exe /C REG.EXE IMPORT " & Chr(34) & sRegFile & Chr(34),0,True
Set objShell = Nothing
Set objFSO = Nothing
Comments:
-
or directly you can import your .reg file using following command
cmd /c reg import "<Path>\<MyRegFile.reg>" - jagadeish 9 years ago
Posted by:
anonymous_9363
9 years ago