This thread comes up when you search for information about this problem
: "how to make my service start before logon screen appears". That's why
I post this information here (this is not 4 years lag).
I had found a solution for XP which was to add the service in a
servicegroup called "Network
Sorry, I thought it was related to python but actually not :
http://msdn.microsoft.com/en-us/library/aa384187%28v=vs.85%29.aspx
On 03/02/2012 11:38, le dahut wrote :
Hi.
On a Windows Seven 64bits host with 32bits version of python installed.
In a MSDOS prompt I run :
nbtstat -R
command runs
Hi.
On a Windows Seven 64bits host with 32bits version of python installed.
In a MSDOS prompt I run :
nbtstat -R
command runs well.
In a python prompt I run :
import os
os.system('nbtstat -R')
I get :
"nbtstat is not recognized as an internal or external command"
Using explorer I've f
20/04/2010 17:05, Tim Golden wrote :
On 20/04/2010 15:39, le dahut wrote:
Hello,
I'm trying to use "win32security.DuplicateTokenEx" but I encounter an
error.
My code looks like this :
"""
def getusertoken():
# process.get_pids(procname) returns a list of
Hello,
I'm trying to use "win32security.DuplicateTokenEx" but I encounter an error.
My code looks like this :
"""
def getusertoken():
# process.get_pids(procname) returns a list of the pids of running
copies of ""
# for "winlogon" I suppose there is only one copy
p = win32api.Open
"le dahut" (French) is an imaginary beast that has 2 legs shorter than
the other 2. But the difference is between the right and the left legs,
it's because this animal lives on mountainsides. This makes its
movements easier but it would, however, always moving in the same
direct
soft\Windows NT\CurrentVersion\Winlogon\UserInit
Tim, maybe you want to copy/paste those files and comments on your website ?
Ron, I hope this will help you.
Cheers,
Klaas
le dahut wrote :
Hello,
I've made some development around Windows services and logon events
detection (using SC
Hello,
I've made some development around Windows services and logon events
detection (using SCM and using SENS). I've spend a lot of time
discovering how things work and trying to write them (with great help
from people on this list !)
I think that people may be interested by some examples a
Tim Roberts wrote :
le dahut wrote:
Roger Upole wrote :
le dahut wrote:
Hello,
On Windows 2000 SP4, since pywin32-213 I get an error :
"CreateURLMonikerEx could not be located"
on a program that ran fine with pywin32-212.
What's happening ?
On machines with older versi
Roger Upole wrote :
le dahut wrote:
Hello,
On Windows 2000 SP4, since pywin32-213 I get an error :
"CreateURLMonikerEx could not be located"
on a program that ran fine with pywin32-212.
What's happening ?
K.
On machines with older versions of IE, this function may no
Hello,
On Windows 2000 SP4, since pywin32-213 I get an error :
"CreateURLMonikerEx could not be located"
on a program that ran fine with pywin32-212.
What's happening ?
K.
___
python-win32 mailing list
python-win32@python.org
http://mail.python.or
Hello,
I saw on http://sourceforge.net/projects/pywin32/ that the current
version is "pywin32 build 213".
The "Download" link points to "pywin32 build 212".
When browsing files it is possible to get "213" version.
Is it a mistake ?
K.
___
python-
Hi,
I tried it with "SHCNE_ALLEVENTS" as argument with no success :
shell.SHChangeNotify(shellcon.SHCNE_ALLEVENTS, shellcon.SHCNF_IDLIST
,None)
Any other idea ?
Tim Golden wrote :
le dahut wrote:
Hello,
"gpedit.msc" can change several parameters in system for exa
Hello,
"gpedit.msc" can change several parameters in system for example items
in start menu or hidden drives in explorer. The changes made in "gpedit"
are immediately applied, if you have "My computer" opened you can see
selected letters disappear.
I know that "gpedit" modifies
HKCU\Software\
ntlm compatible proxy which is able to do
transparent win32 authentication.
Any ideas ?
Mark Hammond wrote :
On 21/01/2009 3:35 AM, le dahut wrote:
I thought using some sort of NTLM like in squid. Your example deals with
NTLM but reading "Lib/site-packages/win32/lib/sspi.py" I do
ybe this for search engine :
wait service start logon screen login screen
wait NT service
le dahut wrote :
Hello,
Is it possible to tell windows to wait a python service has started
before the login prompt is displayed ?
___
python-win32 mailing
gainst the PDC.
I thought using some sort of NTLM like in squid. Your example deals with
NTLM but reading "Lib/site-packages/win32/lib/sspi.py" I don't
understand everything.
Can you enlight me ?
Mark Hammond wrote :
On 20/01/2009 1:35 AM, le dahut wrote:
Hello,
I've w
Hello,
I've written a python network app in which the server runs on a
Samba-PDC (NT Domain controler) and the client on the windows NTdomain
clients.
I want to authenticate the connexions to the python server using a
transparent method.
Is there a way to get a user NTdomain authentication
I've put a loop that wait for the service to be up with
win32serviceutil.WaitForServiceStatus.
Tim Golden a écrit :
le dahut wrote:
Yes, I was trying to intercept user's logon. I've done it using
userinit registry key, a python NT service and a python service
running o
Tim Golden wrote :
Larry Bates wrote:
le dahut wrote:
Hello,
Is it possible to tell windows to wait a python service has started
before the login prompt is displayed ?
Probably not, but why would you want to implement something that
does? Share your use case with us and perhaps we can be
Hello,
Is it possible to tell windows to wait a python service has started
before the login prompt is displayed ?
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
Hello,
I'm looking for APIs to do some stuff like 'nbtstat' does.
Does have any starting point ?
Actually it is to force the resolving of the PDC name via his IP address
to avoid messages like :
"Domain is unavailable"
if user logs on to fast after computer boot.
It seems that windows need so
wrote:
le dahut wrote:
Hello,
I'm looking for an API that can do netstat calls to return a list of
listenign ports and maybe a process attached to it.
You need the IP Helpers API
http://msdn.microsoft.com/en-us/library/ms886687.aspx
I'm afraid I've never used it, though, so
Hello,
I'm looking for an API that can do netstat calls to return a list of
listenign ports and maybe a process attached to it.
Any idea ?
K.
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win
Mark Hammond wrote :
#2 : the .exe must have a manifest that contains :
"""
... (I use the "python.exe.manifest" in which I add the following)
"""
I've put the manifest directly in the .exe using py2exe and :
'other_resources': [(24, 1, mymanifest)],
"24" is where the mani
I suppose that you use "runas" in order to get run in real administrator
mode.
There are several ways to get an installer run automatically in real
admin mode :
#1 : the name of the .exe must contain "setup" or "install" keyword.
This make the UAC detect it as an installer and asks the user
I suppose that the user's program throws an exception if the service
isn't started yet.
I propose this :
while True:
try:
do_what_fails_if_service_isn_t_started
break
except:
time.sleep(0.5)
I've this problem when using wipfw and twisted's reactor.
stephane.poirot w
Actually it works with XP SP2 but not with XP without SP.
le dahut a écrit :
I encounter a problem when trying to install it. I get prompted by a
secure window (a window with some keys icons) asking me if I want to run
it with my account with(out) security against virus or with another
I encounter a problem when trying to install it. I get prompted by a
secure window (a window with some keys icons) asking me if I want to run
it with my account with(out) security against virus or with another account.
None of the 3 possibilities works for me. Any idea ?
Mark Hammond a écrit
(hToken, 18) returns
>>> win32security.GetTokenInformation(hToken, 18)
Traceback (most recent call last):
File "", line 1, in
pywintypes.error: (87, 'GetTokenInformation - size call', 'The parameter
is incorrect')
Is it possible to do this using ctypes ?
Hello,
I've passed some time reading the MS coding guide for Vista
http://msdn.microsoft.com/en-us/library/bb756973.aspx
It explains that an app requiring administrator rights (modify HKLM,
write in C:\Windows\, etc.) will always return "Access denied" or ask
the user for UAC if it's launched
Hello
With Vista (XP works fine), when using SetValueEx in a script ran by an
administrator I get "Access Denied". I know that's it's due to UAC so
does someone know how to do a 'sudo' when using something else than
CreateProcess ?
___
python-win32
Hello,
Still with Vista, when using CreateProcess(...'regedit'...) to
save/restore some registry keys I get and error 740 "The requested
operation requires elevation".
According to msdn ShellExecuteEx should be used instead of CreateProcess.
Where Can I find ShellExecuteEx ?
Are there other m
Hello,
When launching an app that opens a socket, windows Vista complains that
I have to accept it before it is launched and then that the firewall
accepts the opening of the port.
Is there a way to register my app to be launched by users without UAC
warning ?
Is there a way to open the po
Hello,
I want to detect the version of windows (2K, XP, Vista). Therefore I
used platform.release() but it doesn't work on Vista. Has anyone noticed
this before ?
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/li
Actually it seems that this is a behavior corrected in XP Service pack 2.
No exception, win32api.InitiateSystemShutdown does correctly his job, fine.
le dahut wrote :
> With "InitiateSystemShutdown" I get :
> 21, "Device is not ready."
>
> with "WTSShutdown
is extremely slow and has a strange
behavior
"ExitWindowsEx" does its job correctly excepted that the workstation is
extremly slow and need a manual reboot to work fine...
Klaas
Tim Golden wrote :
> le dahut wrote:
>> To reboot the computer I've tried this d
Hello,
I use a service tu update another. It download an InnoSetup file, launch
it with /silent and restart the computer at the end of the process.
To reboot the computer I've tried this different functions :
win32api.ExitWindowsEx(EWX_REBOOT | EWX_FORCE)
win32api.InitiateSystemShutdown(None, ''
Hello,
I've noticed that when using win32 api in a try/except statement, if the
error doesn't appear on the line just after try, I get a
.exe.log file.
Example :
* This genreates .exe.log :
try:
logging.info('mounting printer')
w32print.AddPrinterConnection(printer)
except Exception,
a
sort of handler to the frame and modify the content of a text box ?
I don't know if the second way is possible.
Paul Moore a écrit :
> On 17/03/2008, le dahut <[EMAIL PROTECTED]> wrote:
>> I'm writting a Wx app and I want to skip Alt+F4. I've used somehting
>>
Hello,
I'm writting a Wx app and I want to skip Alt+F4. I've used somehting
like that :
def OnKeyDown(self, event):
print event.AltDown(), event.GetKeyCode()
if event.AltDown() and event.GetKeyCode() == wx.WXK_F4:
print 'try to close'
Everything gets printed b
Tim Golden wrote :
> le dahut wrote:
>> What strange is is that:
>>
>> try:
>> wsec.LookupAccountName(...)
>> except:
>> print 'Error'
>>
>> shows :
>> - a traceback, as if I didn't put LookupAccountName in a try/excep
rectly interpreted
So we can say that I get the two behaviours in one. At the exception
that the traceback is not complete, it only talks about the line
containing LookupAccountName, not entire traceback (the caller function
and its parents).
Tim Golden a écrit :
> [.. snipped ..]
>
ec.LookupAccountName('fakeserver','DomainUsers') # this not
Traceback (most recent call last):
File "", line 1, in
pywintypes.error: (5, 'LookupAccountName', 'Access denied.')
>>> try:wsec.LookupAccountName('fakeserver','
Hello,
I'm using this code :
mypdc = 'mypdc'
dusers = 'DomName\DomainUsers'
obj = 'C:\\Mylogfile.log'
try:
domainusers_sid = wsec.LookupAccountName(mypdc, dusers)[0]
info = wsec.DACL_SECURITY_INFORMATION
sd = wsec.GetFileSecurity(obj, info)
a
Hello,
How can I get python's installation directory ?
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
Hello,
While trying to use RegisterServiceCtrlHandler function, it appears that
this function acts like RegisterServiceCtrlHandlerEx if it is run on
W2000 or higher.
According to msdn, a HandlerEx function has to be used to get callbacks.
This function should take 4 arguments :
DWORD WINAPI
Sorry but where can I find "RegisterServiceCtrlHandlerEx" ? I could only
find "servicemanager.RegisterServiceCtrlHandler" which is different and
do not catch logon/logoff events.
Thanks.
Mark Hammond a écrit :
>> Hello,
>> I'm trying to use RegisterServiceCtrlHandlerEx. Since it isn't
>> availa
Hello,
I'm trying to use RegisterServiceCtrlHandlerEx. Since it isn't available
in pywin32, I have to call it from advapi32.dll using ctypes.
RegisterServiceCtrlHandlerEx is useful to replace winlogon notification
package to get informations about login/logoff events. I could use SENS
in a com s
events. Maybe I could use SCM...?
Tim Roberts a écrit :
> le dahut wrote:
>> I've seen several examples in C, Delphi and VB, but I still don't know
>> how to call "ISensLogon" in python :
>> win32com.client.Dispatch("ISens.Logon") doesn
how to start with this ?
Tim Roberts a écrit :
> le dahut wrote:
>> After crawling this mailing list and googling for this I can't find how
>> to use it in python. I'm a COM object newbe, I've read some examples but
>> don't understand it really yet.
>&g
After crawling this mailing list and googling for this I can't find how
to use it in python. I'm a COM object newbe, I've read some examples but
don't understand it really yet.
Does a guru have a magic answer ?
___
python-win32 mailing list
python-wi
cond or two of delay or use a directory that you know
> is writeable by the user.
>
> On Jan 8, 2008 12:32 AM, le dahut <[EMAIL PROTECTED]> wrote:
>
>> No it is not, it is a fresh installed XP, and the same problem occurs on
>> undreds of machines running XP and 2k. But I
ange behaviour occurs only at logon. If someone has any ideas or
addresses where I can find some ideas ?
Tim Roberts a écrit :
> le dahut wrote:
>> I've a strange behavior with windows XP, %TEMP% points to %WINDIR%\TEMP
>> instead of "C:\Documents and Settings\\Local Settings\T
Hello,
I've a strange behavior with windows XP, %TEMP% points to %WINDIR%\TEMP
instead of "C:\Documents and Settings\\Local Settings\Temp" at
logon time. Since I have a program that uses temp files it can write
there when a non-admin user logs on so it failed with traceback etc.
Why ? Is there
stry. And I've
noticed that some application gets AppdData path from something like
"os.environ['APPDATA']".
What can I do to solve this ?
Tim Roberts wrote :
> le dahut wrote:
>> A python program launched at user logon rewrites some registry keys such
>> a
Hello,
A python program launched at user logon rewrites some registry keys such
as "HKCU\Software\Microsoft\Windows\Current Version\Explorer\User Shell
Folders\AppData" but explorer keeps using the old value.
How can I make windows reload the registry since the users have a
mandatory profile a
Tim Golden wrote :
> le dahut wrote:
>> Hi,
>>
>> I'm using win32pdhutil.FindPerformanceAttributesByName in order to know
>> if 'explorer.exe' is running or not. Sometimes I get this error :
>> """
>>File "wi
Hi,
I'm using win32pdhutil.FindPerformanceAttributesByName in order to know
if 'explorer.exe' is running or not. Sometimes I get this error :
"""
File "win32pdhutil.pyc", line 97, in FindPerformanceAttributesByName
File "win32pdhutil.pyc", line 60, in GetPerformanceAttributes
pywintypes.e
Thanks, but finally I use subprocess.Popen(cmd, shell=True) which sets
SW_HIDE in startupinfo properties and with which you can wait for
process' exit code using subprocess.Popen(cmd, shell=True).wait()
Gabriel Genellina wrote :
> At Wednesday 24/1/2007 05:40, le dahut wrote:
>
&g
Hello,
What's the best way to launch a process and waiting for its exit code ?
I'm looking for something that can take win32con.SW_HIDE as argument
(os.spawnv don't).
K.
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mail
Hello,
I've build a .dll with Dev-Cpp and a python app (compiled with py2exe).
When I run the python app, everything works fine. But when I run it via
the dll (Createprocess() or system("app.exe") have the same result) I
get an "app.exe.log" file which indicates an "ImportError: No module
name
Hello,
What is the best way to copy files from a windows/samba share without
connecting a network drive using python ?
K.
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
Hello,
Does someone any information about how to use gina stubs and python
together -;) ?
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
Hello,
Tim Roberts a écrit :
> On Fri, 10 Mar 2006 09:29:07 +0100, le dahut <[EMAIL PROTECTED]> wrote:
>
>> I was thinking about win32api.RegSaveKey or _winreg.SaveKey but on XP it
>> must be preceded by a privilege modification and they don't save regular
>>
must be done with python and/or
internal windows commands.
Someone has an idea ? (otherwise I'll use "reg export" under XP and
regedit /E with 98 but it seems very barbarian isn't it ;-) )
K.
Tim Roberts a écrit :
> On Thu, 09 Mar 2006 17:56:08 +0100, le dah
Hello,
What is the best way to export/import a part of windows registry into
original .reg files (according to the os type). Code must run on both 98
and XP ?
K.
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/lis
Hi,
I'm trying to update a self-build installed NT service on win XP. What
is the best way to do that. Do I have to stop the service, replace and
restart it or is there a better method ?
Thanks.
___
Python-win32 mailing list
Python-win32@python.org
ht
7;s "Run after extraction" option it
doesn't.
Le vendredi 21 octobre 2005 à 14:42 +0100, Tim Golden a écrit :
> [le dahut]
>
> > I try to get the program's directory, the one where the .exe (or .py)
> is.
>
> >From within Python, sys.argv[0] usually gives y
hi
I try to get the program's directory, the one where the .exe (or .py)
is.
With os.getcwd() I get the directory from where the program is launched
not his directory. The program has to copy some files and thus I get an
error like "XX no such file or directory" (the DOS box closed to
quickly
Hi,
How can I get the name of a user currently connected on a windows
workstation ? I mean a sort of "whoami".
Thanks
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
Here, it's not really an answer but it may help many people.
The ping module by Lars Strand :
http://www.gnist.org/~lars/code/ping/ping.html
Must be run as root on unix stations ...
K.
Le vendredi 23 septembre 2005 à 11:55 +0200, Thomas Heller a écrit :
> le dahut <[EMAIL PROTECT
I've crawled google and its search results in broad, length and through
but I didn't find a real explanation concerning the use of wmi with
py2exe under win 9x/Me.
My program works fine on the 98 machine where python pygtk gtk runtime
and wmi are installed. I want to run it on fresh installed mach
Hi everyone,
How can the subshell be hidden when executing code such as :
os.system('ping host') ?
The program uses GTK and it's very annoying to see a black window when
using a graphical program ...
Thanks,
K.
___
Python-win32 mailing list
Python-w
win98 so a
os.popen('ipconfig /all') can be parsed to get infos.
K.
Le vendredi 09 septembre 2005 à 10:44 -0700, Tim Roberts a écrit :
> On Fri, 09 Sep 2005 09:42:18 +0200, le dahut <[EMAIL PROTECTED]> wrote:
>
> >Maybe I can parse the output of a 'ipfonfig' com
Maybe I can parse the output of a 'ipfonfig' command, but
commands.getoutput only work with unix, not with windows. Is there
another way to get the output of a command line program under windows ?
K.
Le jeudi 08 septembre 2005 à 17:24 +0200, Peter Jessop a écrit :
>
>
>
Hello,
How is it possible to detect which kind of windows a python script is
running on ? (9x, Me, 2k, XP, 2k3)
An other question:
I've a script using
win32com.client.Dispatch("WbemScripting.SWbemLocator") but it doesn't
seem to function on win 9x. This script is intended to detect the
computer's
77 matches
Mail list logo