|
Hi all,
I created a service under account it is in network domain. when i start this service it return error:1069-- the service was started from an account which does not have logon as a service provilage.
Then I use the sample code provided by Microsoft to grant this provilage to this account this seems ok because all return value are ok. but start service still doesnot work. same problem.
I open the policy on local computer and i logon as this account.
return LsaAddAccountRights(
PolicyHandle, // open policy handle
AccountSid, // target SID
&PrivilegeString, // privileges
1 // privilege count
);
|
|
|
|
|
|
Hi!
I have written an NT Service to monitor an application execution.
The NT Service detect properly when the application crashes (deadlock).
In order to reboot the system I am using the API function ExitWindowsEx to reboot the system, but it doesn’t work very well. As a matter of fact, when I call this API function the system shows a blue screen and stay in this situation timelessly.
The code that I am using (the shut down example from MSDN) is show below (I guess I have got the right privilege).
Does anybody know how can I make the system reboot properly?
Thank you very much for your attention.
Sergio
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
// Get a token for this process.
if (!OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
error("OpenProcessToken");
// Get the LUID for the shutdown privilege.
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
&tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1; // one privilege to set
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
// Get the shutdown privilege for this process.
AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
(PTOKEN_PRIVILEGES)NULL, 0);
// Cannot test the return value of AdjustTokenPrivileges.
if (GetLastError() != ERROR_SUCCESS)
error("AdjustTokenPrivileges");
// Shut down the system and force all applications to close.
if (!ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, 0))
error("ExitWindowsEx");
|
|
|
|
|
I want to create a program that has it's own IP address that it gets via a standard DHCP server. My question is how would I go about creating a program that retrieve and actively used a seperate IP address than the machine it is running on?
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
If my memory doesn't completely fail me, DHCP IP's are handed out on a per-MAC basis. That is, if you already have been given an IP for the NIC at hand you can't be given another one while the previous lease is active.
If you on the other hand have a static IP (and there is no DHCP-client running on that machine for that NIC) you could possibly create your own DHCP client to request an IP from the DHCP server.
Perhaps it is better to use ports after all...
|
|
|
|
|
My thinking was that it would be a great firwall tactic route all unused ports to a dummy IP that just drops them. Oh well thanks for help though
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
Matt Newman wrote:
My thinking was that it would be a great firwall tactic route all unused ports to a dummy IP that just drops them.
???
Doesn't all firewalls have the option to just drop any traffic on a specific port?
You might find it more trouble and more costly than it's wort trying to do this using Windows (any version, not just XP). Windows (some might say even Microsoft itself) is really not suited for these tasks. Try getting you hands on an old 486 or something with two NIC's and then install some *BSD or GNU/Linux.
|
|
|
|
|
I already have a good firewall but I was just looking for a little pet project to play around with.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
I recently visited the site codeproject & went through the tutorial
on install shield. I have recently made an installation which installs
my application in VC++ & at the same time installs the InterBase Server
& console. To achieve this installation i make entries in registry & for
auto starting the interbase server i have made entry in
HKEY_LOCAL_MACHINE\Software\Microsoft\CurrentVersion\Run
as InterBaseGuardian REG_STR <root dir="">IBServer.exe -a.
The installation is done in install shield for Microsoft VC++6.
I m facing a whimiscal problem whenever i install my appliaction in a compaq
machine that already contains Interbase server as well as VC++6 installed
in it. I tested my installation in an assembled machine which already has
both the things installed, but there it doesn't show that error.
As soon as the appliation is run it first shows message box "cann't create
socket" and then it shows "XTG unable to establish connection to the host
unknown win 32 error 10106".
Is this error due to the istallation script or its related with the
application or interbase server.
Please help me out i ll be really grateful.
thanking you!
regards
a struggling software engineer
ashutosh pandey
|
|
|
|
|
i have a solaris script here and i need it to run in aix (ran it it currently doesnt) any suggestions........im relaitvely new to unix so any help would be appreciated
Live every moment like its your last. You never know what tomorrow may bring. To look back and say "I have no Regrets" is a live that has been LIVED.
|
|
|
|
|
A shell sript (which shell?), Perl script, AWK script or some other kind of script? What's on the first line (does the specified interpreter exist)? Have you made the script executable (with chmod +x )? Is it in the path? Do all external programs called from the script exist? What error messages do you get?
|
|
|
|
|
all i have been told about this thingis that the switches need to be converted..
first line is #!/bin/sh
followed by alot of echo commands
the script currently runs off sun boxs
havent evern touched it with base commands yet as i know v little bout this topic...
Live every moment like its your last. You never know what tomorrow may bring. To look back and say "I have no Regrets" is a live that has been LIVED.
|
|
|
|
|
btw this is a hardening script i have been given
Live every moment like its your last. You never know what tomorrow may bring. To look back and say "I have no Regrets" is a live that has been LIVED.
|
|
|
|
|
It's a regular Bourne shell script, and at least the echo commands should work and output whatever is given as their parameters. See here for a tutorial on shell scripts, and here for Sun's "sh" reference. All IBM's AIX manuals are also available on-line.
|
|
|
|
|
thank thats helped heaps actually understand the script now
Live every moment like its your last. You never know what tomorrow may bring. To look back and say "I have no Regrets" is a life that has never been LIVED.
|
|
|
|
|
Hello all-
Processes on a windows box have a 4GB memory space, but of this only 2GB is addressible for user data and instructions. The rest is System memory. Windows 2000 Advanced Server can be configured to use upto 3GB for user memory.
The applications that we are porting for our project use a very large amount of memory. Sometimes in the range of 4 GB.
someone might have more information about this limit and any workarounds that might exist for getting access to more of the total memory. Please let us know.
Thanks in advance,
Sarma
|
|
|
|
|
if you have not already been there, please check this page on the MS site..which talks about "Application Memory Tuning" which enables your app to access more than 2GB of memory...
http://www.microsoft.com/windows2000/en/advanced/help/vlm_7.htm
thanks
retZ
|
|
|
|
|
On x86 at least, it's impossible. On 64-bit CPUs (IA64, DEC Alpha) you can use the VLM APIs to access more than 4GB if you have enough physical RAM. Or switch to a Win64 OS. Nothing simple, unfortunately.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Does anyone know of a good method to check to see if someone has rights to a particular application via Active Directory? I actually have to do a conversion (NT Authentication) at work in VB6 (I know ) and I am looking for a good method to do this. I have seen very little on ADSI, however I think this maybe the way to go but I would just like a little input from anyone who has been involved with something like this. Thanks in advance.
Nick Parker
|
|
|
|
|
I am thinking of buying XP Pro and other than IIS & SMP what is better about XP Pro than XP Home.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
|
Thanks for the link, but I was looking more for user experience.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
Matt Newman wrote:
user experience
I can't see the user experience being any different.
I think the only real visual diff. will be the login screen / fast user switching.
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
Ok I worded that wrong, I was wondering if somebody had used both and wondering what was better about Pro than Home
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
You can't be a member of a domain using XP home, but you can in PRO. This is the reason MS bill Pro as a professional OS.
|
|
|
|