summaryrefslogtreecommitdiffstats
path: root/libdha
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-01 22:48:37 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-01 22:48:37 +0000
commit27e0e8a75939a619e9cb2b8cfde38e77cc595e7a (patch)
tree286e3dee9baf9ebb14fa4cdc8f7eee9101009a4a /libdha
parent0a60a8fd258343d3a76038aa7eb583bc67259526 (diff)
downloadmpv-27e0e8a75939a619e9cb2b8cfde38e77cc595e7a.tar.bz2
mpv-27e0e8a75939a619e9cb2b8cfde38e77cc595e7a.tar.xz
Error message improved, wording.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12099 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libdha')
-rw-r--r--libdha/dhahelperwin/dhasetup.c25
1 files changed, 13 insertions, 12 deletions
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 <windows.h>
#include <stdio.h>
@@ -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;
}