However Im trying to Disable Windows UAC with this line of batch code !
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v DisableUAC /t REG_DWORD /d 0 /f
And works perfectly, since to take effect machine must reboot, and it's not good choice since bypassing UAC would make all work easier, and I add another reg key to RunOnce, when machine starts up, launch that .bat file which installs silently applications !
set BATDIR=%~dp0 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /f /v One_Click_Installer /t REG_SZ /d "%BATDIR%win7.bat" shutdown -r -f -t 5 -c "Machine will reboot within 5 sec's !"
And it reboots, on startup launches win7.bat, which is batch file containing code to start installing applications, but I don't know whats the difference launchin this bat file on startup, it doesnt work, it's like just showing for example 'application x installed finished' but actually it's going fast to all applications but it doesnt work, when I double click to the same batch file, works perfeclty !
If you want I can post that .bat file code, win7.bat .
So I just want to know, whats the difference, when same batch file launched directly works, when it starts up with RunOnce registry fails ?
If anyone has any trick that can run batch file, that executes exe's silently bypassing UAC, would be good to tell me !