Hi, I'm trying to make a program (in C) that performs certain tweaks within windows. Here's an extract that sets the interval time between windows update reboot nags
the output I get is:Code:char command[256];
int interval = 1440;
system("reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU /v RebootRelaunchTimeoutEnabled /t REG_DWORD /d 00000001 /f");
sprintf(command, "reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU /v RebootRelaunchTimeout /t REG_DWORD /d %08x /f", interval);
system(command);
The operation completed successfully
Error: Invalid command-line parameters
I can't work out why the second command is invalid.
Also... I'd rather not have the output printed on the screen, would this be the right way to do it? :
system("@echo off\n...second command...");
Thanks for any advice