|
What are you trying to install? Perhaps if you post the contents of your inf file that might be a starting point. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
ok, trying to install kQemu driver through .inf file
Code:--
; Copyright (C) 2005 Filip Navara, Damien Mascord
[Version]
Signature = "$Windows NT$"
Class = System
ClassGuid = {4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider = %Author%
DriverVer = 04/28/2005,1.0
[DestinationDirs]
DefaultDestDir = 12
KQemu.DriverFiles = 12
KQemu.InfFiles = 10,inf
[SourceDisksNames]
1 = %InstDisk%
[SourceDisksFiles]
kqemu.sys = 1
[Manufacturer]
%Author% = KQemu.Manufacturer
[KQemu.Manufacturer]
%Description% = DefaultInstall,kqemu
[DefaultInstall.NT]
CopyFiles = KQemu.DriverFiles, KQemu.InfFiles
AddReg = KQemu.UninstallRegistry
[DefaultInstall.NT.Services]
AddService = kqemu,,KQemuService_Inst
[Uninstall.NT]
DelFiles = KQemu.DriverFiles, KQemu.InfFiles
DelReg = KQemu.UninstallRegistry
[Uninstall.NT.Services]
DelService = kqemu,0x00000200
[KQemu.DriverFiles]
kqemu.sys
[KQemu.InfFiles]
kqemu.inf
[KQemu.UninstallRegistry]
HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KQEMU,"DisplayName",,%Description%
HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KQEMU,"UninstallString",0x20000,"RunDll32 setupapi.dll,InstallHinfSection Uninstall 132 %SystemRoot%\inf\kqemu.inf"
[KQemuService_Inst]
DisplayName = %Description%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\kqemu.sys
[Strings]
Author = "Fabrice Bellard"
Description = "KQEMU virtualisation module for QEMU"
InstDisk = "KQEMU Install Disk"
SERVICE_KERNEL_DRIVER = 1
SERVICE_DEMAND_START = 3
SERVICE_ERROR_NORMAL = 1
|
|
|
|
|
I see that this file contains the name of the author and the company that manufactured this product. Obviously they are the people to contact to ask what this message means. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
If I could do that then no need of your help
|
|
|
|
|
As I said in answer to your earlier post, the message "Installation failed" gives no clue as to what might be wrong, so there is no way we could begin to guess what the error is. If you cannot get help from the people who wrote this package then I fear you are stuck. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
john5632 wrote: If I could do that then no need of your help
Oh Yeah? You must be happy for all the help you are getting here. You talk as if you are paying to get help from people here.
|
|
|
|
|
What's keeping you from contacting fabrice@bellard.org?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Perhaps you can start your console window as an administrator - it may help.
Browse to your \Windows\system32 folder, then right-click on cmd.exe and choose "Run As Administrator".
Hope it helps.Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
|
Hi,
When you install a device driver and the installation fails you can check the SetupAPI Log File[^] located at %windir%\inf\setupapi.dev.log on Windows Vista and above.
My guess is that you are attempting to install a 32 bit device driver on a 64 bit Vista OS.
Best Wishes,
-David Delaune
|
|
|
|
|
In a program I develop I need to find out if I can have write rights to a given file. Earlier I have used
dwAttributes = ::GetFileAttributes(sFileName);
if( dwAttributes != INVALID_FILE_ATTRIBUTES )
{
if( dwAttributes & FILE_ATTRIBUTE_READONLY )
{
bReadOnly = true;
}
}
|
|
|
|
|
Your program should require elevation to gain access to such folder, see, for instance [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Did you answer to the right message? Your reply seem to have nothing to do with what I asked about.
|
|
|
|
|
The issue is with User Access Control. If you wish to write to files in certain directories you need elevated access rights before you are allowed to do so. Did you read the link that Carlo gave you? txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Did you read the original question? I do not want to write files. I want to know if I can write files. i.e. I have a file name and want to be able to answer the question "Can I write to this file?".
I'm looking into using GetNamedSecurityInfo() and then GetEffectiveRightsFromAcl()
|
|
|
|
|
You're correct, I misunderstood your original question. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
No problem.
I have found and used this code
bool sysAccessWrite(const LPWSTR path)
{
DWORD result;
SECURITY_INFORMATION secInfo = DACL_SECURITY_INFORMATION;
PSECURITY_DESCRIPTOR secDesc;
PACL dacl;
TRUSTEE trustee;
ACCESS_MASK rights;
result = GetNamedSecurityInfo( path, SE_FILE_OBJECT, secInfo,
NULL, NULL, &dacl, NULL, &secDesc );
if( result != ERROR_SUCCESS )
{
return false;
}
trustee.pMultipleTrustee = NULL;
trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
trustee.TrusteeForm = TRUSTEE_IS_NAME;
trustee.TrusteeType = TRUSTEE_IS_USER;
trustee.ptstrName = _T("CURRENT_USER");
result = GetEffectiveRightsFromAcl(dacl, &trustee, &rights);
if( result != ERROR_SUCCESS )
{
return false;
}
(void) LocalFree(secDesc);
return (rights & GENERIC_WRITE) ? true : false;
}
The problem is that it should work, but it don't. At least not when I try it under Windows 7. It gives 1F01FF (Full control) even if the program isn't capable of actually writing to the file.
|
|
|
|
|
staffan_v wrote: I do not want to write files. I want to know if I can write files. i.e. I have a file name and want to be able to answer the question "Can I write to this file?".
Can you not open the file using CreateFile(GENERIC_WRITE, ...) ? If that fails, then you know that writing to the file is not possible."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Good idea. I would not know exactly why it failed, but it would work for now. Thanks for the tip.
|
|
|
|
|
staffan_v wrote: I would not know exactly why it failed...
Just check the return value from GetLastError() ."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
The return value when it fails is just a INVALID_HANDLE_VALUE and if I use GetLastError() I don't get a lot of more info. Just a ERROR_ACCESS_DENIED and that can mean several things. However it may be enough for what I'm trying to do. If the file is not tagged as read only and I still can't open it for writing it probably some issue with rights.
|
|
|
|
|
staffan_v wrote: Did you answer to the right message?
I supposed.
staffan_v wrote: Your reply seem to have nothing to do with what I asked about.
So your problem has nothing to do with UAC?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Not as such. I want to know if I can write to a file. I'm not interested in actually writing to the file so elevation is not what I'm looking for. I have found Check User’s Permissions On A File or Folder[^] that seem to do about what I want to do.
|
|
|
|
|
You could use _taccess()[^] to determine if you have write access to a file.
Take a look at my reply in this page[^].
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Not quite. It says "This function only checks whether the file and directory are read-only or not, it does not check the filesystem security settings.", but it suggests CAccessToken so I'll look into that.
|
|
|
|