Page 1 of 1

Registry Write

PostPosted: Thu Dec 15, 2016 10:16 am
by Dudus
Hi all!

I want to import a registry key from my Pub directory, but when i use CMD Dos command with
regedit /s C:\MYPUBDIR\myfile.reg than it's work properly but when I replace the C:\MYPUBDIR to predefined [PubDir] variable it won't work.

Why? The path is the same, but somthing is wrong.
Can you check why?
Thanks Folks
D

Re: Registry Write

PostPosted: Thu Dec 15, 2016 4:27 pm
by Rasl
[PubDir] is C:\MYPUBDIR\

then
regedit /s [PubDir]myfile.reg

Re: Registry Write

PostPosted: Fri Dec 16, 2016 2:13 am
by Dudus
Thank but this is not working even the path is tha same:
regedit /s [PubDir]myfile.reg

somehow it does not detect the path what is inside the variable [PubDir]

This is my issue :(
D

Re: Registry Write

PostPosted: Fri Dec 16, 2016 9:35 am
by virger
Este comando "regedit /s [PubDir]myfile.reg" NUNCA lo va ha entender CMD, porque la variable "[PubDir]" NO EXISTE, si desea correrlo en CMD haga un BatFile algo asi como esto:
Code: Select all
filewrite "[PubDir]WrReg.Bat" "All" "regedit /s [PubDir]myfile.reg"
Run "WrReg.Bat" "" "RunOnce+Wait+LoadComplete+Minimized+Hidden" "" ""

Re: Registry Write

PostPosted: Sat Dec 17, 2016 3:16 pm
by Dudus
virger wrote:Este comando "regedit /s [PubDir]myfile.reg" NUNCA lo va ha entender CMD, porque la variable "[PubDir]" NO EXISTE, si desea correrlo en CMD haga un BatFile algo asi como esto:
Code: Select all
filewrite "[PubDir]WrReg.Bat" "All" "regedit /s [PubDir]myfile.reg"
Run "WrReg.Bat" "" "RunOnce+Wait+LoadComplete+Minimized+Hidden" "" ""


Thank you! Excellent!
D