From 27e0e8a75939a619e9cb2b8cfde38e77cc595e7a Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 1 Apr 2004 22:48:37 +0000 Subject: Error message improved, wording. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12099 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libdha/dhahelperwin/dhasetup.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'libdha') diff --git a/libdha/dhahelperwin/dhasetup.c b/libdha/dhahelperwin/dhasetup.c index 652942cee9..38c10b3c35 100644 --- a/libdha/dhahelperwin/dhasetup.c +++ b/libdha/dhahelperwin/dhasetup.c @@ -1,6 +1,6 @@ -/*dhahelper setup program (c) 2004 Sascha Sommer*/ -/*compile with gcc -o dhasetup.exe dhasetup.c */ -/*LICENSE: GPL */ +/* dhahelper setup program (c) 2004 Sascha Sommer */ +/* compile with gcc -o dhasetup.exe dhasetup.c */ +/* LICENSE: GPL */ #include #include @@ -10,19 +10,20 @@ int main(int argc,char* argv[]){ SC_HANDLE hService; char path[MAX_PATH]; printf("dhasetup (c) 2004 Sascha Sommer\n"); + GetWindowsDirectory(path,MAX_PATH); + strcpy(path+strlen(path),"\\system32\\drivers\\dhahelper.sys"); if(argc==1){ - printf("usage:\n"); - printf("dhasetup install - copys dhahelper.sys from the current dir to windows/system32/drivers and configures it to start at system start\n"); - printf("dhasetup remove - removes the dhahelper util\n"); + printf("Usage:\n"); + printf("dhasetup install - Copies dhahelper.sys from the current directory to\n%s and configures it to start at boot.\n", path); + printf("dhasetup remove - Removes the dhahelper utility.\n"); return 0; } hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - GetWindowsDirectory(path,MAX_PATH); - strcpy(path+strlen(path),"\\system32\\drivers\\dhahelper.sys"); if(!strcmp(argv[1],"install")){ - printf("installing dhahelper\n"); + printf("Installing dhahelper...\n"); if(!CopyFile("dhahelper.sys",path,FALSE)) - printf("can't find dhahelper.sys\n"); + printf("Copying dhahelper.sys failed.\nEither dhahelper.sys is not in the current directory or you lack sufficient\nprivileges to write to %s.", path); + return 1; // Install the driver hService = CreateService(hSCManager, "DHAHELPER", @@ -40,7 +41,7 @@ int main(int argc,char* argv[]){ } else if(!strcmp(argv[1],"remove")){ SERVICE_STATUS ServiceStatus; - printf("removing dhahelper\n"); + printf("Removing dhahelper...\n"); hService = OpenService(hSCManager, "DHAHELPER", SERVICE_ALL_ACCESS); ControlService(hService, SERVICE_CONTROL_STOP, &ServiceStatus); DeleteService(hService); @@ -51,6 +52,6 @@ int main(int argc,char* argv[]){ } CloseServiceHandle(hService); CloseServiceHandle(hSCManager); - printf("please reboot to let the changes take effect\n"); + printf("Please reboot to let the changes take effect.\n"); return 0; } -- cgit v1.2.3