I have a simple batch file which adds registry with reg add command.
reg add "HKLM\SOFTWARE\test\test" /f /v "MainDir" /t REG_SZ /d "test"
When I run the bach from a network drive everithing looks fine but no registry was added. When I copy the batch to to my desktop and run it it works perfectly.
I tried to use PUSHD but wont help, only thing what works is creating a shortcut and in the shortcut add %TEMP% to start in
I solved it. It was so unexpected. The problem was the Commander which I alway use in windows. Everytime I run the batch from commander it don't work, when I run it from explorer or something else it was ok. Soooo weird. The commander have admin right so I don't know why it dont work. Thanks all for help. :)