• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

External Win32 Call

markjde

Active Member
I have created a business function to call a external application using the
Win32 bit cmd.exe. However, I believe that I am running into a security
violation due to the following.

I am logged into Windows 2000 as user X and I am in OneWorld as the user Y.
When I call the business function, I believe that it fails due to my
OneWorld user doesn't have access to the folders in Windows.

If I am logged into Windows and OneWorld as user X, the external call works
with no problems.

Does anyone know how in C I can retrieve the current user security
information to pass into the CreateProcess API? Or does anyone know how I
can get around this problem for the ideal solution would be to call cmd.exe
as the user that is signed into Windows 2000.

Any ideas would be greatly appreciated.


Mark
Xe, SP 15.1, AS/400, Windows 2000 (Workstations and WTS (Citrix))
markjde@hotmail.com
 

David Robertson

Reputable Poster
Hi Mark,

The cmd.exe should always be using the security at the windows level. Your "user Y" would mean nothing to windows, and would likely not even exist as a valid user at many sites. Given what you say about the CreateProcess API, this would probably cause you to run with Guest security, and probably matches your description pretty well.

The only two solutions I can think of if that is the case...
1) Create/modify user Y under Win 2k, with authoirty needed to perform the task.
2) Change the default security for that location such that anyone can perform the neccesary functions.

Can you give more details of your set up, and the actual error messages? I have mainly run into this sort of problems trying to deploy over to a TSE environment, where it often seems you're not who you think you are.

Regards,
David
 
Top