Using a .bat file to use Values in Registry from another Registry

I recently starting working in an IT Department and for years my superiors/co-workers have always had a piece of software called "cyt.exe".
When ever I logged in someones computer as Admin, this software allowed me to log out with their username still in the log in text box. We recently upgraded a large quantity of systems to Wins7 and WinEmbedded7 and that program no longer works due to the
registry change.
Currently the best I could to for replicating that software function as .bat file is:
call reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnSAMUser /t REG_SZ /d "domain/username" /f
call reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnUser /t REG_SZ /d "doamain/username" /f
pause
When I log out, it leaves the user name and password blank which is OK but I need to take it one step further. I need the values of:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI
"LastLoggedOnSAMUser"="domain\username"
"LastLoggedOnUser"="domain\username"
to match the values that are in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData\1
"LoggedOnSAMUser"="domain\username"
"LoggedOnUser"="domain\username"
Any suggestions on what I need to change in my code to manipulate the registry to match those values without having to manually input them?

- Vegan Fanatic
"can you fix the cyt.exe program, that would be the best option long term"
Well the cyt.exe program hasn't been updated since 2000 (version 2.3 and 2.5 were the latest versions) so I can only assume the developer has abandoned the project. The reason why it doesn't work anymore is because of the registry change going from XP to
Vista/Win7/Win8.
Once I have my own batch file, it will be easier to tweak it as needed when an operating system changes then it is to rely/wait on someone else to update a very specific piece of software that only has one small purpose that has most likely been forgotten.
As much as I would like to modify the existing program, I don't have any software I can use to re-program it and I doubt I have enough knowledge or experience to tweak it correctly.
- Frederik Long
"You need to experiment either with reg query / reg add or reg export / reg import. Each of these commands has inbuilt help, e.g. reg import /?."
From what I tested, the export/import copies the file and its values and placed them where I asked it too. That is not what I need. I need the values ONLY and placed within the file I need which has a different name from the file I exported from.

Similar Messages

  • Setting Oracle environment variable using batch (.bat) file in windows

    Hi,
    Oracle 9i db
    Windows OS
    I am in process to create the database (Considered that Oracle9i software is already installed) by running one batch file which consist of all the scripts for the database creation.
    But i also want to set the environment variables at MyComputer(right click)>properties>advance>environment, permenently by running the batch (.bat) file
    ORACLE_HOME
    ORACLE_BASE
    ORACLE_SID
    So, how can it be done ?
    With Regards

    Hi,
    *@echo off*
    set ORACLE_SID=iprsdb
    set ORACLE_BASE=C:\oracle
    set ORACLE_HOME=C:\oracle\ora92     
    call C:\install_bkp\test_env_var.bat
    echo Test Successfull.
    Above mentioned is the code written in the batch (.bat) file
    In that i have also called another .bat file which test the env. variable values which is as below:
    c:\>test_env.bat
    ===================
    Testing oracle sid
    ===================
    iprsdb
    =====================
    Testing oracle base
    ===================
    C:\oracle
    =====================
    Testing oracle home
    =====================
    C:\oracle\ora92
    Test Successfull.
    But when i checked at MyComputer(right click)>properties>advance>environment variables
    there, I saw none of the entries from the above, why so ?
    how to set env. variables permanently using the DOS commands. ?
    With Regards

  • Executing bat file without using Runtime.exec()??

    Hi all
    From my java App ,I am running a bat file. This is what I did:
    When I press 'execute' button inside my App, it runs a bat file through Runtime.exec() method. Since exec() runs it through cmd.exe, get a DOS window when I press Execute button. If I manually runs my app from command promt , I dont get it. But I have to create a short cut of my main class in the desktop. This is happening when I run my app from desktop icon.
    Now I want to eleminate DOS popup everytime I press execute button. Would anyone pls give an idea how to run bat file without using Runtime.exec()? Any suggestion will be helpful.
    Thanks

    jscell
    Thanks for taking time to answer to my problem .
    Here is what my problem: I create a shortcut of my main class in the desktop. Through this shortcut ,I run my java App. My App has a execute button, When I press this button , It run another bat file through Runtime.exec() method, and show some result in the result PAnel. NOw what happen , I get a DOS command window , everytime I press execute button. , Which is very annoying . But If I run my App thorugh command promt by executing: "java myApp", then I dont get this DOS popup. But I have to create a shortcut in the desktop, so other can use it conveniently.
    NOw I am not sure why I am getting this DOS window in the middle of my Application. IS it for using Runtime.exec() method? or for running bat file through my application? Can anyone pls tell me? I am kind of new to java, and I am learning lot of stuff from this forum .
    Would u pls suggest me about how to eleminate this DOS popup when I press execute button.
    Regrds

  • How to use a bat file to change plug-in control panel settings?

    Hi,
    The company I work at has old applications that rely on the MS JVM shipped with IE so we cannot activate the Sun Java plug-in for all users.
    The applet we are developing has to write to disk and thus has to be signed. We do therefore need to run a modern Java version for our users. We have about 5000-7000 users so we would need to create a bat file that would automatically be run for our users. That bat would set that the Sun Java plug-in will be used for Intenet Explorer.
    Does anyone know which (registry-?) setting it is that is changed when the Internet Explorer box is checked in the Java plug-in control panel?
    All help is greatly apprechiated.
    Best regards,
    Helena

    Try this one:
    HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.5.0_06
    Where the 1.5.0_06 might be a different version.
    There is a value named UseJava2IExplorer. 1 is enabled (Sun's), 0 is disabled.

  • Opening FTP connection using a bat file by Runtime class

    Hi
    I'm trying to run the following file from Runtime.getRuntime().exec(XXX) command and getting an error saying that login failed.
    I have set the user id and password in the ftpcommand.bat file as below
    User nkamar
    pass narendra
    and when I run this bat file from command prompt it doesn't work why???.It says Login failed.
    C:\>ftp -s:ftpcommand.bat 134.133.210.24
    Connected to 134.133.210.24.
    220 sdqa33 FTP server (SunOS 5.6) ready.
    User (134.133.210.24:(none)):
    331 Password required for User nkamar.
    530 Login incorrect.
    Login failed.
    ftp> opsnet1
    Invalid command.
    ftp> Invalid command.
    can you please help me in resolving this.
    A sample example file for setting the username,pwd and opening the ftp connection would be very helpful.
    Thanks in advance.
    Regards,
    Narendra.

    Rewrite your script as follow:
    open 134.133.210.24
    nkamar narendra
    Save it as ftpcommand.scr then call it.
    C:\>ftp -s:ftpcommand.scr
    If this still does not work try rewritting the script as follow:
    open 134.133.210.24
    user nkamar
    password narendra
    Save it and try again.
    Hope this works.
    ER

  • Use of BAT file - How do you completely delete 150 phones and their associate DNs?

    How do you completely delete 150 phones and their associate DNs? All the phones are in the same device pool. I prefer BAT way.
    Version of the CUCM: 8.6.2
    Type of phones: 7962 phones - associated with the same device pool.
    Additinal questions: Is there a way to delete elegantly all the phones and their associated DNs when all the phones are associated to the same device pool? I rather not work with specific extensions and MAC addresses.
    Thank you,
    Calin Lupas

    Hi Calin,
    Using BAT this will require 2 - passes. 1 for the phones and 1 for "unassigned DN's". this is nicely shown in the attached doc;
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/bat/8_0_1/bat-801-cm/t03delph.html#wp1342774
    Of course for the DN's you could delete them via the Route Plan report>Unassigned DN>select all>Delete
    Cheers!
    Rob

  • How can I use a sound file on one slide, which fades to another sound file on the next?

    I am trying to make a slide show that begins with a certain sound file, which then I hope to fade out to the second slide which uses a different sound file, I've followed Apple's online tutorials, but what happens is I get two sound files playing simultaneously. Also, I'd like to add sounds files to different individual slides throughout the presentation, which I want to play independently from the entire slide show's sound track. I have programmed the slides to change automatically. Is there any way I can have multiple sound files on multiple slides all playing independently, without playing over the top of the previous sound file? I imagine this is a simply task, so my apologies if this is the case. Thanks in advance for any help!
    kind regards,

    Getting sound to work right in Keynote requires a basic understanding that:
    1. Sound played during slide transitions (from one slide to the next) must be placed in the Document Inspector > Audio > Soundtrack Well - there can only be one audio file and it plays across all slides
    2. Additional sounds files can be placed on individual slides as sound objects - each object can have build-in and build-out assignments, but sound files need at least a Build-In > Start Audio (done in the Build Inspector) - each object, wether a shape, image, sound or movie can have discrete start timing such that the start of one sound object can be delayed X seconds after the previous event. This can be used to avoid overlapping starts or playing. If you know the length of each sound file object, you can adjust the start to occur after the end of a previous sound using the Build Inspector. Click on the More Options Button to display the event build-order list and click on the event to reveal how the build starts and add any delays to start there.
    3. Keynote does not have a Fade Feature - any fade-in or fade-out (sound up/sound down) of audio files must be done to the sound file using third party applications and then brought into Keynote. If you'd like to join the crowd wishing Apple might add this feature in the future, you can provide feedback to Apple here:
    http://www.apple.com/feedback/
    4. If you need an audio file to play across a few slides and another audio file to play across another few slides, break the presentation into seperate documents, place the audio in the soundtrack well for each document and then add a hyperlink object to connect to the next Keynote document in the series. Note: all files must be "opened" in the background and ready to play or else the next file will attempt to start but stall just when you don't need it to.
    Hope this helps.

  • When I open iTunes on my new computer using the .itl file, and using the same external drive holding the songs, all of the songs I added to iTunes up to a certain date have broken links, while none of the songs have broken links on the old computer.

    I want to open the  iTunes library on my new laptop with all the playlists and stuff I built on the old computer. I have all my music on an external drive. I have copied the .itl file from the old computer and opened it on the laptop, and it has all the playlists, but all of the songs that were added to iTunes up to a certain date have broken links. What am I doing wrong?

    Moving library files around while leaving the data in the same place usually presents no problems. Moving the data around independently from the library usually breaks things. With Windows machines all you should need to do is make sure that the same drive letter is being used on the new system as with the old. If that is not possible you need to get your library into a portable layout before moving it between systems.
    Typical layout of iTunes folders:
    When the media folder is inside the main iTunes folder as shown above then the library is portable. Typically with a split library the iTunes Music or iTunes Media folder (everything inside the red outline) is moved to a different drive by choosing a new locaton for it and then consolidating.
    To make the library portable again you need to copy the library files and album artwork folder into the parent folder of the media folder so that the nested relationship is recreated. (BTW If your media isn't already inside your designated media folder then you will also need to consolidate the files that are outside of it, before you copy the library files.) You can then use the hold-down-shift-when-starting-iTunes method to open the library file in that parent folder. Once the library has been opened, tested and closed you are most of the way there.
    The iTunes window inherits its title from the folder holding the library files so, unless you created a folder called iTunes to hold the media folder, iTunes may now have an unexpected title when you run it. The parent folder can be renamed as iTunes, and the library opened again. Alternatively, if the parent folder is at the root of the drive, or has other data which you wish to leave in place, you can create a new top level folder called iTunes and move the library files, album artwork and media folders into it before opening and testing the library again.
    If the library doesn't work after any step simply reverse it by undoing a move or rename or opening the previous set iTunes Library.itl file.
    If all has gone well then the library is now portable. Once you've migrated the data to a new system you can copy the library files back to their usual internal location if you find that having them on the external drive affects performance...
    tt2

  • How to use expressions to check if a value is containted in another table.

    Hello,
    I have a flat Material table ("Material_table" with a Mat_ID) and a main table that stores MAT_ID and (e.g) Manufacturer. I DO NOT want to use a lookup table (since I don`t want to use the drop-down boxes), but I want to create a (simple) validation that checks, if the MAT_ID that is entered into field MAT_ID in the main table is contained in the Material table.
    This serves as a simple "foreign key" check, checking if a value into a table can be found in another table.
    Can anyone post the code that has to be written into the validations-Editor.
    The expression in the main table could look something like:
    Logically:
    Check IF (MAT_ID IS_CONTAINED_IN(Material_table[MAT_ID]) then return true
    or something like:
    HAS_ANY_VALUES(MAT_ID,Material_table[MAT_ID])
    Thanks a lot!
    (I couldnt find any solution for that in the forums - We are using MDM 5.5. SP6)

    See thread: "How to create a validation that access another MDM-Table?" in this forum.

  • How to use identity column in table which value always start from one?

    Hi all,
    Hope doing well,
    sir i created one table which has id with number datatype
    for which i created sequence and stored procedure so suppose
    i inserted two row there it's inserting and id is showing 1, 2
    again i truncate that table and again i inserted value there now the id is starting from 3 , 4
    so my question is that after truncating table can't it insert from 1 in id column?
    thanks,

    >
    sir i created one table which has id with number datatype
    for which i created sequence and stored procedure so suppose
    i inserted two row there it's inserting and id is showing 1, 2
    again i truncate that table and again i inserted value there now the id is starting from 3 , 4
    so my question is that after truncating table can't it insert from 1 in id column?
    >
    Oracle does not have 'identity' columns.
    Oracle sequences are NOT gap free.
    Oracle sequences are independent objects and not associated with any other table or object.
    If you are wanting a gap-free sequnece of numbers, which is not recommended, you will have to create your own functionality. And that functionality will not be scalable or perform well.

  • Can I use an iCloud email address that's been deleted from another account?

    There was one house account, mine, which is an old @mac.com address from way back in the iTools days.
    I made a couple email aliases for my daughter when she was younger to use for school.
    Now, she has her own iPhone.  I gave her another email address (hername @ att . net) so we could register her own Apple ID, and get the confirmation/activation email.
    With me so far?
    So now, in order to use the Apple bells & whistles, you need an iCloud email.  When I try to create one, it says that both the @icloud.com addresses I tried are already in use.  (Trust me, they're unique to us.)
    I made sure to delete the aliases from my main account, but I still can't use them.
    My question is:  How long will it take to release those deleted aliases for use again?  If at all.
    Off topic:  What happened to our old Support Communities login ID?  I had to use my Apple ID and now I look like a first-timer.  Is there a way to merge the old account into this one?

    I don't think that's possible.  As mentioned here: http://help.apple.com/icloud/#/mm6b1a490a, "Aliases are not transferable. Only the iCloud account that created the alias can use it.  Once you create an alias it cannot be made into its own account."
    Not sure about your second question.  You might want to post it over in the Using Apple Support Communities forum: https://discussions.apple.com/community/using_apple_support_communities?view=dis cussions.

  • Inserting a db row from a form with a value passed in from another page

    We have a report (P1) on a table (T1). P1 has a link column (C), and C is the PK on T1. Clicking on a link (i.e., a row) in report P1, takes us to form (P2). P2 is used to allow the user to insert a new row into T1, with the constraint that one of the columns (X) in T1 must have the same value as X had in the linked row on P1. Also, X is a NOT NULL attribute.
    What we are doing is:
    First, passing C to P2 by setting the link name=P2_X_C and the link value=#C#
    Second, in P2, we are setting form element P2_C via a SQL statement:
    SELECT X
    FROM T1
    WHERE C = :P2_X_C
    P2 displays nicely. We set P2_C to display only, and allow the user to enter values for the other columns. The value displayed for X is not NULL and correctly matches the value from P1. However, when we hit the CREATE button on P2, we get error: ORA-01400: cannot insert NULL into "T1"."X". Unable to process row of table T1.
    APEX seems to have an "issue" with having a value in a form "set" and transmitted to the DB on INSERT.
    Any help would be greatly appreciated.

    Hi,
    1 For "Display Only" items that you are not populating directly from a database column, if you want to save the value, you have to ensure that Save Session State is set to Yes and these items are not actually submitted with the page. The same sort of thing would apply to Disabled or Read-Only items as browsers do not submit these items - though these are more tricky to deal.
    2 Passing the PK value is the most common way of identifying which record contains the values you need. Passing other values is also typical - eg, for applying filters for calendars or searches or for setting flags.
    3 For database columns, which should be based on the underlying table's data, you can use the Default Value settings - though be aware that these values do not exist in session state until the page is submitted. That's ok if you don't need to use the value anywhere else on your page
    Andy

  • View criteria condition needs to check value in column from another VO

    Hi All,
    My Jdev version - 11.1.1.6
    My use case is as follows-
    2 view objects say EmpVO and DeptVO which have view link with deptId as the foreign key attribute. I need to show the distinct list of departments along with a column which contains the employee names separated by comma for the particular department in the corresponding row. Hence, for DeptVO I use the query as follows -
    -          SELECT deptId,
    -                 deptName,
    -                 (SELECT listagg (empName, ',') WITHIN GROUP (ORDER BY empName)
    -                            emp_names
    -                    FROM EMP_TABLE emp
    -                   WHERE emp.deptId = dept.deptId)
    -                    emp_names
    -            FROM DEPT_TABLE
    This gives me the result on screen as follows -
    DeptId          DeptName          EmpNames
    101               HR                    emp1,emp2
    102               Finance             emp3,emp4,emp5
    Now, my requirement is that there should be a search on department which should also contain an LOV (with search icon) for the employee names i.e. if user selects emp4 from the LOV, department table should list the record for 102.
    For this , I added an LOV on the EmpNames attribute of DeptVO (to map the values from EmpVO) and added a view criteria based on which I added a query panel on screen and the relevant partialTrigger attribute so that the department table should reflect the search results. I tried 2 options in the View Criteria of DeptVO i.e.
    1. Added an Item 'EmpNames = '. WIth this, EmpNames attribute appear with Searh icon in the query panel(which is required) but it does not display the right department record bcz it tries to match exactly with values like 'emp3,emp4,emp5'
    2. If I add Item 'EmpNames CONTAINS ' , EmpNames search will work from query panel i.e. if I enter the value as emp4, department 102 will be shown in the results table but there is no Search icon on the EmpNames field in query panel. The component actually becomes an inputText.
    It would be of great help if you can guide on a better way to achieve this use case. Please let me know if there needs to a change in the approach or if any other details are needed.
    Regards,
    Ansh

    Hi Timo,
    Thanks for this. I have already implemented this part. Here, in the example there's an LOV on department id and form is on employee entity. However, my use case is a different one. I need to search for department which should contain a search criteria for employee in the form of LOV.
    Could you suggest some possible solution?
    Regards,
    Ansh

  • Set value of zzidarea from another context node

    Hi is it possible to set the value of the zzidarea field of the context node header from the method  get_employeename of the context node employeename?
    Thanks!!

    Hi,
            Your question should be framed better. I suppose that you are trying to set the value of a header attribute from one of the child relations. Assuming that the relations are buffered, it is possible to reach the header entity by using the get_parent or get_root and using relations again. However it is not a good practice trying to set values in a getter method. You should find another proper approach to your problem.
    Regards,
    Arun Prakash

  • Set value in ViewObject from another ViewObject

    Hello,
    I am creating a program and have the following problem: I Have three view Objects say like: A, B and C. A is the master class and has a view link to B an C. But now I am facing the following problem. When I create a new A and then B, in B a value is automatically retrieved from A (something like a before insert trigger but then programmatically from the (specific) entity object). (There isn't a commit yet!) Then when I create a new C. I want to show the value that was calculated in B shown in C. But there can be multiples rows in B so I want only the value from B from the row that is currently selected.
    Has anybody an idea/solution to solve this?
    Thanks in advance!

    Hello,
    I have a some like problem in adf bc.
    Let me explain you what I want to do.
    I have two tables. Message and MessageProperties. Message table is connected with itself as same as Employee table of HR. Means a Message can have various child message. MessageProperties contains the message properties. A message can have various properties. I want to show the message only if it has a particular value in MessageProperties,then its properties,its child message. If its child message have the same value in MessageProperties,then it shows that. Likewise it should give me a tree structure with its all properties
    Let me explain you step by step what I have done for this.
    1> I have created a view MessageView with two entities i.e Message and MessageProp and include the value attribute of MessageProp in it.
    2> I have created the default MessagePropView from MessageProp Entity.
    3> In MessageView I have modified the query which you have given.
    4> I have created the Bind variables.
    5> I have created a view criteria and in that view criteria I have included Message_Id=:Bind_MessageId and Value=:Bind_Value.
    6> I have created an association connecting Message.Message_Id and Message.Parent_Id(1 to * cardinality) because a message can be a parent of many messages.
    7> I have created a viewlink between Message and MessageProp using Message_Id.
    8> I have created a view link between Message and Message using the association which I have created in step 6.
    9> I have created the Application Module. In that,my Data Model looks like
    ---MessagePropView2
    ---MessageView1
    ---------MessagePropView1
    ---------MessageView2
    10> Then I have created the service interface. In service interface view instances,I include these two view and select the GetByKey operation from basic operations.
    11> From View Criteria find operations I have included the view criteria which I have created in message view in step 5.
    12> Then I run the AppModuleServiceImpl.java and select the view criteria operation which I have created in step 11.
    13> There I find two bind variables i.e. Bind_MessageId and Bind_Value. I give the values there.
    But it checks whether that message Id(Bind_MessageId) which I have given have that value(Bind_Value) or not. If it has then it shows only that message along with its properties but it is not showing me its childs and their properties.
    I want to show only those child message who have the MessageProp.value as (Bind_Value).
    I hope you understand with the scenario.
    I'll be very thankful to you if any help me to do this.
    Thanks in advance.

Maybe you are looking for

  • Invite to video chat, invitation received, responded to, but can't connect

    I invite a friend to video phone on iChat, she accepts the invitation, but then we can't chat. If I invite her, she clicks Accept, then on her end it says that she failed to respond and on my end it just keeps waiting endlessly. If she invites, me, I

  • Sending payslip as a PDF attachment with an email

    Hi Experts, I need to send an email with payslip as a PDF attachment. I wonder how this can be done for country China. The payroll driver program seems doesn't helps to send an email. Can any one tell me, if this can be achieved directly, else will h

  • Idoc at status 51, however outbound delivery created

    Hi Gurus, We have peculiar issue , where in outbound delivery is getting created through IDoc. The inbound idoc has status 51 however delivery got created.  Any idea how is it possible?. Thanks in advance.

  • XML insert from forms

    Hi Guys, I have an xml file that I want to insert into a table using the database stored objects in Forms6i on Windows2000 server. I am using Oracle 8i DB with XSU package. My insert script is written in PL/SQL and saved as a stored procedure in the

  • ENHANCED INTERFACE AND RECEIVER DETERMINATION

    1)what is the use of enhanced interface determination and enhanced receiver determination and in scenarios we will use them and in what conditions ,and what differentiates it from standard interface/reciever determination?