Question

I need to add use %~dp0 to Registry suing REG_SZ in a register entry.

With the following code the app does not run at startup.

Could you point me out what am I doing wrong here?

   Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
    "Gate"="%~dp0 C:\\wamp\\www\\xxx\\trunk\\xxxClient\\xxxClientWPF\\xxxClientWPF\\bin\\Debug\\xxxClientWPF.exe"
Was it helpful?

Solution

Try removing the space.

"Gate"="%~dp0 C:\\wamp\\www\\xxx\\trunk\\xxxClient\\xxxClientWPF\\xxxClientWPF\\bin\\Debug\\xxxClientWPF.exe"

should read like this.

"Gate"="%~dp0C:\\wamp\\www\\xxx\\trunk\\xxxClient\\xxxClientWPF\\xxxClientWPF\\bin\\Debug\\xxxClientWPF.exe"

see if this works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top