Starting exe as another user

Hi,
Perhaps someone else dealt with this. I tried a lot of things, but haven't
succeeded jet.
I need to start a (LabVIEW) application, running as another user. From the
command line, runas works perfectly. But from LabVIEW, runas doesn't work.
This is documented, runas checks if it's called from the command line, and
doesn't start if it's not called from the command line. For start, there is
no commandline option for the password.
I did try to open pipes to runas, so I can pipe the password to runas, but
this doesn't work either. Runas seems to check from where it's called...
There is a tool called Sanur.exe, that can be used to pipe a password to
runas, so you can enter the password on the command line (like runas
/user:user "program.exe" | sanur password). This also doesn't work with
LabVIEW, since runas is still checking from where it is started...
So I tried some API's... CreateProcessWithTokenW with LogonUserA,
CreateProcessWithUserA with LogonUserA and CreateProcessWithLogonW... It
doesn't help that some of them are Unicode, but with MultiByteToWideChar,
that is easy to solve.
CreateProcessWithTokenW and CreateProcessWithUserA only work when the
client applications has few rights, so I got some errors about that. I
haven't tried to obtain those rights, since that is rather difficult.
The last one (CreateProcessWithLogonW) works on my PC, but gives error 6
(Invalid token) on the real environment. The API doesn't have a token input,
so something must be wrong. Nothing on internet about this either...
Anybody done this before?
Regards,
Wiebe.

Wiebe wrote: But runas can't be runned by an application...
Not directly but as part of a command file. I have an app named Drive Snapshot which requires admin rights and checks this during startup. As a restricted user I created a command file named DriveSnapshot.cmd with the following line:
runas /user:admin /savcred F:\Programme\SnapShot\snapshot.exe
Double clicking in Windows Explorer  requires the password entered. The next time time it will simply start without a prompt.
Next I created the following VI:
Running the VI will start the commandfile and therefore start DriveSnapShot.
Next I logout and  login as admin and changed the password. Then I login as the previous restricted user. Running the VI DriveSnapShot will not start. You need to provide the password again.
For the permanent change of passwords this is not a solution for Wiebe.
Talking to system administrators they maybe make the following solution possible:
Creating a special user in the domain with admin rights. This user wil never change his password and is only known to the application programmer and the admins.
Message Edited by waldemar.hersacher on 02-03-2009 08:12 PM
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Attachments:
cmdFromLabview.png ‏2 KB

Similar Messages

  • Yes another user with problem with Apple Mobile Device Support, I am getting the error message: Service 'Apple Mobile Device'(Apple Mobile Device) failed to start. Vertify that you have sufficient privileges to start system service....

    Yes another user with problem with Apple Mobile Device Support, I am getting the error message: Service 'Apple Mobile Device'(Apple Mobile Device) failed to start. Vertify that you have sufficient privileges to start system service....I hit retry and it came up again. I hit ignore and it prompted me to hit finish so Itunes can open.   I looked thru alot of these posts on here to try and resolve this problem myself but it's not working too well...I downloaded Itunes to my desktop so I can right click it with the program i downloaded called WinRAR. I extracted it and then went into the folder called Itunes64setup. I saw the file called AppleMobileDeviceSupport64 in there so I began to try and download it on it's own. Well that didn't work as I planned and got this error message:
    Apple Mobile Device Support wasn't installed on your computer. The installer encountered errors before Apple Mobile Device Support could be configured. Your system has not been modified. To retry these operations at a later time,please run the installer again.
    Well I tried to run it again and came up with the same message...I see that some people got great support to help them so I am hoping someone can help me as well. I know "b nor" is very qualfied and hopefully can help me! Please advise what I can do. Thank you

    Hi Iss9243,
    Welcome to the Support Communities!
    You've already tried some great troubleshooting steps, but the article below gives you quite a few more for this issue.  Hope it helps ....
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Cheers,
    - Judy

  • Firefox crashes on start up for one user but not another

    Crash ID: bp-df3a48d7-363c-4d2f-87d3-f73902140723
    Version: 31
    Crashes on start up for one user but not another. Both are administrators.
    I have uninstalled and re-installed. No change with each user.
    Crashes in safe mode as well (holding down shift)
    No addons present in other user.
    Have ran Malwarebytes and cleaned
    Have ran CCCleaner and cleane all including registry entries with Firefox uninstalled.

    Create a new profile as a test to check if your current profile is causing the problems. <br>
    See '''Creating a profile''':
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over the problem <br>
    '''Profile Backup and Restore'''
    *http://kb.mozillazine.org/Profile_backup
    *https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Unable to start weblogic server using another user of same machine

    Hi,
    I have installed weblogic using my credentials.I am able to start it properly with my credentials.
    I am getting error while starting weblogic server from another user of same machine having same admin rights.
    It shows following details while starting server and process stops:
    <22-Dec-2011 06:15:02 o'clock GMT> <Info> <Security> <BEA-090905> <Disabling C
    ptoJ JCE Provider self-integrity check for better startup performance. To enable
    this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true
    >
    <22-Dec-2011 06:15:02 o'clock GMT> <Info> <Security> <BEA-090906> <Changing th
    default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To
    enable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    Please advice.
    Thanks and Regards:
    Priya

    Can you check the server log file for more details. The server log file is located in the <domain-home>/servers/<server-name>/logs directory.
    There probably something wrong with the log rotation or something similar. Usually when certain files that are created during runtime belong
    to a certain user, other users do not have rights or they must belong to the same group.
    Also note that the messages are only info messages and are not really the cause.

  • Application won`t start - starts when logged in as another user

    An application created by Unity doesn`t start. When I double click (or right mouse click and choose `open`) nothing happens. However, when I log in as another user, or when I try to run the same program from a flash drive, it works. I tried a lot, including repairing permissions, but nothing helped.
    Thanks in advance !

    Try logging into your user while holding down the shift key on your keyboard, to supress any startup items that may be interfering with your program.
    If that does not do it, look for a preference file in you user folder by choosing the Go menu from the Finder and selecting Go to Folder and enter ~/Library/Preferences and checking for files having to do with your application. If there are any, move them to your desktop and try again.
    If that does not fix it, move them back, replacing the new ones that will be built. Also, if your program uses any data files or libraries when started up, try removing those. Again, if not fixed, put them back.

  • Start Database Service with another user

    Hi Everyone ,
    i've a little problem with the Oracle 10 Console Service on a W2K3 server.
    I want to start that Service with another user as "Local System"
    I created a local user that is member in the "ORA_DBA" group and in the local Admin Group. But the Service won't start. When i start the service with the "local system" account it starts.
    Is there another possibility to start the service this way or where is my error ?
    Greetz Byte

    Hi
    I searched metalink and came across a note that mentioned following actions. I hope it works in your situation.
    1. Launch locally on the windows host the Local Security Policy tool
    2. For the domain user or local user starting the Management Agent service
    Give the following Advanced Privileges
    - Log on as a batch job
    - Act as part of the operating system.
    - Adjust memory quotas for a process
    or (for windows 2000 and Windows NT)
    - Increase memory quotas"
    - Replace a process level token.
    3. Ensure that the same local user or domain user starts all the other Oracle Windows services monitored by the Management Agent
    The same fix must be applied for the standalone dbconsole service on windows.
    Rgds
    Adnan

  • HT4759 I tried to download icloud for pc windows vista with 2.1.2. and when download was almost complete it said it belonged to another user unknown to me so I stopped the process how do I start over?

    I tried to download icloud for pc windows vista with 2.1.2 and when it was downloading almost finished it said it belonged to an unknown to me user?

    You need to explain that, before you finished downloading something said that it belonged to another user ?
    What said that, can you post a screenshot?

  • I cant open my itunes because "another user as it open"

    Hellow, I have itunes for two years now and recently when I am trying to open my itune it just open a window saying "you cannot open the application itubes because another user as it open" but I dont have another user on my windows 7 computer so I dont understant what I should do?

    1. First check if this file APSDaemon.exe is the problem here.
    Close your iTunes.
    Press Ctrl-Alt-Del key and choose Task Manager. In the "Processes" Tab, select the file APSDaemon.exe and click End Prosses button, then close the task manager window.
    Now open itunes and see if it is working?
    If that works, to prevent having to do the same process everytime you restart Windows, go to. START button, type in
    MSCONFIG
    Hit ENTER
    Click STARTUP Tab, Uncheck "Apple Push", click OK.
    Restart Windows.
    2. If that fails, refer to following article to remove SC Info.lib file:
    http://support.apple.com/kb/TS2363
    3. If that fails, repair or reinstall your Quicktime. START / CONTROL PANEL / PROGRAMS N FEATURES / hightlight QUICKTIME and click REPAIR.

  • Permission to end process of another user in task manager

    Hi there,
    I have Software Restriction Policy enabled, UAC is on computers and current user is not a local admin.
    Is there a way to grant a user security right to terminate process started by another user? Using GPO.
    Currently when user tries to terminate a task using cmd command: taskkill /F /IM "process", gets "Access Denied" if that process has been started by another user.
    I tried Computer Configuration->Policies->Windows Settings->Security Settings->File System, gave domain users full access to the file that is being launched by another user but that did not do anything.
    Thanks

    I am not a VB expert but this code may give a view:
    Const strComputer = "."
    Set WshShell = CreateObject("WScript.Shell")
    Dim objWMIService, colProcessList
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'Process.exe'")
    For Each objProcess in colProcessList
    WshShell.Exec "PSKill " & objProcess.ProcessId
    Next
    Taking a look at following links might be helpful:
    VBScript Kill Process
    How to terminate process using VBScript
    Have a visit on the first example of page 133 in this book. For specific user you must handle it with
    GetOwner attribute.
    End
    process for specific user
    Regards.
    Mahdi Tehrani Loves Powershell
    Please kindly click on Propose As Answer or to mark this post as
    and helpfull to other poeple.

  • JBO,EJB: Cannot execute AM from another user.

    Hi,
    I have standalone DACF application with Application Modules deployed
    as session EJB to O8i.
    My environment is: JDev 3.2.2 (915) and O9I AS version 1.0.2 for NT.
    Deployment was done with jdbc-connect as the Application Owner,
    suppose AAA.
    Deployment was done from JDeveloper, so loadjava was running with
    -grant "PUBLIC".
    When I start the application and connect as AAA, everything works fine.
    Next, I've created new user BBB, granted him all java-required permissions
    like I did for AAA.
    From JDev, I can open iiop-connection with BBB-user and see all loaded
    AMs - so they are accessible for BBB.
    Thinking that all loaded classes are "PUBLIC"ly available, I start the
    application and try to connect as BBB-user.
    I get JBO-25222 'Unable to create application module'.
    Trace on Application Server applied.
    Then, I deploy all Business Components (and BC4J Runtime) under jdbc-
    connection as BBB.
    Now application works ok for BBB-connect as well.
    (but each deployment takes about 60 minutes - for 22 AMs - and 5M in
    SYSTEM tablespace)
    Is it possible to avoid such extra BC-deployment for every new user ?
    I thought that loadjava with -grant "PUBLIC" allows to execute loaded
    classes for every user, is it so ?
    What's wrong in my thinking ?
    Thanks,
    Arkadi
    shared_pool_size=50M
    java_pool_size=70M
    java_soft_sessionspace_limit=10M
    Dump file D:\Oracle\admin\O9IAS\udump\o9iasS000.TRC
    Tue Jun 12 11:50:44 2001
    ORACLE V8.1.7.0.0 - Production vsnsta=0
    vsnsql=e vsnxtr=3
    Windows NT Version 4.0 Service Pack 4, CPU type 586
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - Production
    Windows NT Version 4.0 Service Pack 4, CPU type 586
    Instance name: o9ias
    Redo thread mounted by this instance: 1
    Oracle process number: 12
    Windows thread id: 148, image: ORACLE.EXE
    *** 2001-06-12 11:50:44.349
    *** SESSION ID:(12.1553) 2001-06-12 11:50:44.239
    org.omg.CORBA.MARSHAL: serialized object is corrupted minor code: 0 completed: No
    at com.visigenic.vbroker.orb.CaffeineInputStream.read_estruct(CaffeineInputStream.java)
    at a05_bc.common.ejb._A0HomeImplBase._execute(_A0HomeImplBase.java:122)
    at a05_bc.common.ejb._A0HomeImplBase._execute(_A0HomeImplBase.java:81)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java)
    at oracle.aurora.server.GiopServer._service(GiopServer.java)
    at oracle.aurora.server.GiopServer.service(GiopServer.java)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java)
    null

    Does anybody know about successful implementation of deploying ApplicationModule as EJB by one user and executing this AM by another user (IIOP client) ?
    If so, would you please to guide me with deployment details ?
    Thanks
    null

  • Says another user logged on? HELP!!

    Since the day I got my ipod it doesn't always show up on itunes.but I finally got that to work and down loaded songs. and now again it doesnt show up once I plug it in and ALSO now it says "Another user on this computer is using the iPod sowftware,so iTunes is unable to communicate with this iPod.Please ask the other user to log out." but the main thing about that is i am the only user on this computer that is using iPod on here and only have the iTunes window open...what is suggested i do?

    1. Close iTunes.
    2. Open Task Manager by pressing CTRL-SHIFT-ESC.
    3. Click the Processes tab.
    4. Find iPodService.exe. Click it.
    5. Click End Process.
    6. Select Yes to the "are you sure?" dialog.
    7. Close Task Manager.
    8. Start iTunes.
    Problem gone.
    This problem occurs from using Fast User Switching in Windows XP. Avoid using Fast User Switching and it shouldn't happen again. But the above procedure will fix it every time.

  • Another user of your computer is currently using this connection. This user must disconnect before you can log on.

    Hello
    I have a single computer that is going to be shared between 5 people. In an effort to save time. I wanted the users to have a single shared LOCAL login to the computer.
    Then each user could pull up an RDS session through RDWEB on our 2012 r2 RDS farm.
    However, when I attempt to log in more than one user through RDWEB I receive:
    Another user of your computer is currently using this connection. This user must disconnect before you can log on.
    I have done some research on this, and followed this advice, and did the following steps on all my RDS session host and broker servers
    Enable Multiple RDP Sessions
       -  Log into the server using Remote Desktop.
       - Open the start screen (press the Windows key) and type gpedit.msc and open it
       - Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
       - Set Restrict Remote Desktop Services user to a single Remote Desktop Services session to Disabled.
       - Double click Limit number of connections and set the RD Maximum Connections allowed to 999999.
    However, it did not solve the problem. Anyone have suggestions?

    Hi Michael,
    In addition you can try below registry setting for multiple remote session.
    HKEY_Local_Machine\SYSTEM\CurrentControlSet\Control\Terminal Server
    fSingleSessionPerUser     REG_DWORD     0x00000000
    Note: By default the registry value is set to 1, but you need to change to 0.
    Also if you are making connection through gateway then recheck whether the setting is enabled on gateway side for multiple session.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Iphoto on my macbook pro has stopped working. It comes up with a message saying that the library is either being used by another user or it is unreadable. Any ideas why I should be receiving this message?

    MacBook Pro 2009
    Model Identifier: MacBookPro5,1
    Processor  2.4 GHz Intel Core 2 Duo
    Memory  4 GB 1067 MHz DDR3
    Software  OS X 10.8.5 (12F45)
    Iphoto '11
    Iphoto on my macbook pro has stopped working. It comes up with a message saying that the library is either being used by another user or it is unreadable. Any ideas why I should be receiving this message?
    "Your photo library is either in use by another application or has become unreadable"
    Offered solution doesn't work:
    Shut down and restart your computer, and then open iPhoto again. If the problem persists, try rebuilding your photo library. To do this, quit iPhoto, and then reopen it while keeping the Option and Command keys pressed. You can also try restoring your photo library from a backup.
    I have already copied my photographs to the a library manager but when I tried to reuse iphoto and import the photos back into iphoto, it would not let me.
    I can't download photographs from my iphone or my digital camera.
    Any ideas on how I can solve this problem?
    There is a possibility that when I went to update applications that I started to install Mavericks which I then interrupted and cancelled. I am not definite that this caused this problem but it was at about the same time as when this problem started.
    Many thanks,
    Ed

    I have already copied my photographs to the a library manager but when I tried to reuse iphoto and import the photos back into iphoto, it would not let me.
    You can't "copy" your photos to the "library manager", there is just no way to any such thing.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • ITunes keeps restarting by itself on another user account

    Problem began since I started using a new computer running Vista Ultimate, 64 bit. Even though a second account on the computer that WAS using iTunes closes it, when I go to MY account WITHOUT EVEN TRYING TO OPEN iTunes, window upon window opens telling me I can't run iTunes because another user is running it.
    Then, when I go to the other account, I see iTunes OPEN! I'll close it, go to my account, and the windows keep opening again, telling me I can't run iTunes, even though I don't want to!
    I wind up going to the Task Manager and closing iTunes helper and anything else I see with iTunes as the name.

    I am running Windows XP and I've been experiencing this problem for a little while, not sure exactly when it started happening. Everyone once in awhile when I try to launch iTunes on my main user account, it won't run because it is running on another account (which I never want it to run on). I was just coming here to see if I can stop that from happening, I only ever want to run it on my main account.
    I do notice that iTunesHelper is running on both user accounts, and that is probably directly related to my issue. I just plugged in my iPod and got the message than iTunes is running on another account - my guess is, with that iTunesHelper running on both accounts, it is luck which account sees it first and launches iTunes. However I have also received this message when I manually run iTunes as opposed to just plugging it in with the auto-detection.
    That iTunesHelper is pretty inconsistent - I have seen it running on one account only, both accounts, and no accounts if I look in the task list. I think that is the main problem but I don't know how to prevent it from running on secondary user accounts.
    In any event this problem is not isolated to Vista, and that is the main reason why I am posting in this thread.

  • How can I replicate table from a user to another user?

    I want replicate a table from a user to another user, I use DBMS_STREAMS_ADM.RENAME_SCHEMA, but it didn't work.
    who can tell this reason?
    scripts as following:
    create user strmadmin IDENTIFIED BY strmadmin;
    grant dba to strmadmin;
    BEGIN
    DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE(
    grantee => 'STRMADMIN',
    grant_privileges => TRUE);
    END;
    connect strmadmin/strmadmin
    --queue
    BEGIN
    DBMS_STREAMS_ADM.SET_UP_QUEUE(
    queue_table => 'STREAMS_QUEUE_TABLE',
    queue_name => 'STREAMS_QUEUE');
    END;
    --capture
    BEGIN
    DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
    schema_name => 'SCOTT',
    streams_type => 'CAPTURE',
    streams_name => 'S_CAPTURE',
    queue_name => 'STREAMS_QUEUE',
    include_dml => true,
    include_ddl => true,
    include_tagged_lcr => false,
    source_database => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
    inclusion_rule => true);
    END;
    --instantiation
    DECLARE
    iscn NUMBER;
    BEGIN
    iscn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();
    DBMS_APPLY_ADM.SET_SCHEMA_INSTANTIATION_SCN(
    source_schema_name=>'SCOTT',
    source_database_name => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
    instantiation_scn=>iscn);
    DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(
    source_object_name=>'SCOTT.DEPT',
    source_database_name => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
    instantiation_scn=>iscn);
    END;
    --apply
    --transformation
    DECLARE
    s_dml VARCHAR2(30);
    s_ddl VARCHAR2(30);
    BEGIN
    DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
              schema_name => 'SCOTT',
    streams_type => 'APPLY',
    streams_name => 'S_APPLY',
    queue_name => 'STREAMS_QUEUE',
    include_dml => true,
    include_ddl => true,
    source_database => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
    dml_rule_name => s_dml,
    ddl_rule_name => s_ddl);
    DBMS_STREAMS_ADM.RENAME_SCHEMA(
              rule_name => s_dml,
              from_schema_name => 'SCOTT',
              to_schema_name => 'TEST',
              step_number => 0,
              operation => 'ADD');     
    END;
    --start
    BEGIN
    DBMS_APPLY_ADM.SET_PARAMETER(
    apply_name => 'S_APPLY',
    parameter => 'DISABLE_ON_ERROR',
    value => 'N');
    END;
    BEGIN
    DBMS_APPLY_ADM.START_APPLY(
    apply_name => 'S_APPLY');
    END;
    BEGIN
    DBMS_CAPTURE_ADM.START_CAPTURE(
    capture_name => 'S_CAPTURE');
    END;
    /

    select * from dba_streams_rename_schemaWhat do you have there?

Maybe you are looking for