/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


post installation task to import .reg file

08/20/2015 4393 views
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

Comments



Community Chosen Answer

2
for a k2000 reg merge

upload the reg file to the app task and call

reg import file.reg
Answered 08/21/2015 by: SMal.tmcc
Red Belt

All Answers

1
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
Answered 08/21/2015 by: jagadeish
Red Belt

  • or directly you can import your .reg file using following command

    cmd /c reg import "<Path>\<MyRegFile.reg>"
0
Complicated! What's wrong with 'regedit /S [.reg]'? :-)

BTW, if your .REG is directed at the currently logged-in user, you'll need the task to run in that context.
Answered 08/21/2015 by: VBScab
Red Belt

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ