Mask password with asterisk with install4j in console mode - install4j

I am using the latest version(9.0.4) of install4j. We have built an installer using install4j. Now there is a requirement where in console mode when the user enters password , it should be shown by asterisk or some other character.
Currently if the user enters something for password field, nothing is shown on console. In GUI mode dots are shown for each user key input.
I could not find out any setting in install4j to enable this for console mode.

Unfortunately, there is no way to do that in Java. The method java.io.Console.readPassword() disables echoing, but it is not possible to configure an echo character like an asterisk.

Related

AssignedAccess Windows 10 Powershell

I am currently working on a Kiosk for my company, the point for me is to create a powershell script that will create a user and directly assign it as a Kiosk user with Microsoft Edge Chromium. It works fine with the windows settings but thats not how we need to make it. But when I want to make the command with powershell
Set-AssignedAccess -AUMID "MSEdge" -UserSID "USERSID"
When i do it this way I get this error :
New-CimInstance : One or multiple parameter values passed to the method are not valid.
So I managed to get another AUMID which is : Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe!App
The command is a success after that but in the end when I connect to the Kiosk user it keeps on blinking loading blue screen and never pops out Microsoft Edge.
Does someone knows about this ?
Thank you.
Try using this AUMID Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge.
This works for Windows Versions below 21H2.
I cannot help you at this time with the version above 21H2.

How to set default printer for new users using powershell

Have a question on how to set the default printer for NEW users via powershell.
I have seen many posts about setting the default printer via the wmi method. This seems to work only for the currently logged in user that is running it. This will not work for other users that may have already logged in. I can set the default printer for user sid already in the profile list in the registry via HKU:\<SID>\Software\Microsoft\Windows NT\CurrentVersion\Windows key. I set the device string to the printer name and port, isMRUEstablished i set to 0 and legacydefaultprintermode i set to 1 to prevent windows from setting the last used printer as default. This seems to work for any users that have already logged on. Issue is i cant seem to find a way to set it system wide. If install the printer and set it up before the user gets the machine and logs in for the first time it wont be set for them. I have tried making the above mentioned registry changes to the .defualt user registry hive but when a new person logs into that machine they have something like webex document print set to the default or onenote printer or something else. Is there any other way to set via powershell so it will apply to a new user that logs on?
You have to load the hive from the default profile found in c:\users\default and called ntuser.dat.
After loading this hive make the reg setting as needed. Then unload the hive. Now anyone who logs in to the system for the first time will get those settings, whatever they are, by default. The .Default in the registry is what runs when the system is at login but not yet logged in so no effect for printer settings.

Print text with clickable link in console or terminal in Perl [duplicate]

How do I display a hyperlink (weblink) in hudson/jenkins build output console?
What I'm trying to achieve is, during a hudson/jenkins build based on certain condition, I would like to display a hyperlink.
When a user click on that link, it should open a new browser window and show the page.
Is there a plugin to do this? Any suggestions please?
When using a (system) groovy script or Jenkins job pipeline (without sandbox) you may want to try e.g.:
import hudson.console.ModelHyperlinkNote
println hudson.console.ModelHyperlinkNote.encodeTo('http://example.com', 'example')
Please find the full API of hudson.console.ModelHyperlinkNote here:
http://javadoc.jenkins-ci.org/hudson/console/ModelHyperlinkNote.html
If you enter, for example:
echo 'http://example.com'
in a Build step Execute shell → Command the address will be hyperlinked in the Console Output, though not with target="_blank". But middle-clicking on it opens it in a new tab or window – depending on your browser preferences.

Is this possible using perl?

As soon as I login to my system (basically linux) I get the below screen
Now I use arrow button and goto "GET_TESTROOT" and then press enter and takes me to this screen
![second image][2]
Here I confirm and say "yes" and it will bring me to another screen
Now I need to get the "serial number" and "testroot ID" into a variable.
Is this even possivble in perl ?
If these "screens" appear immediately after login (ie. executed from .profile or set directly as user shell) then the short answer is no!
The long answer is, of cause you can. You would have to create an expect script which connects to the server, sends some phony key presses and parses the output (which looks like some variant of curses to me). When that script is done, you can invoke it from Perl and extract the wanted values.
You can get most of the tools you need for this from cygwin.

How to suppress display of password in Selenium RC window

I am writing some Selenium RC tests using the perl library WWW::Selenium. At the beginning of the test I need to login to a web form using my username and password.
I noticed that my password is displayed in the Selenium Remote Control "Command History" window as type(password, secret).
Is there any way to suppress the display of the password? Maybe there is a command other than type I can use?
Unfortunately no. You could go into the Selenium core and change it to show ******* when it finds a field named password.
Beware though that this could make life difficult when debugging
I guess we can do this using native methods support.
Think logically every native methods in selenium will be sent to the operating system not to the browser.
So if you use any of the native methods, the flow is like this:
Client Program ----> Selenium RC server ----> to the operating system (in Java this is done using Robot Class)
But all the other non-native methods flow is like this:
Client Program ----> Selenium RC server ----> to the Browser
So, the Command History window operates at the Browser level and the native methods will not reach there.
Here is the code:
selenium.focus("locator");
selenium.keyPressNative("key code"); // this will not be shown in command history
Here the key code is only for one character and if you want string (more than one character), we should rely on our client program to implement the logic.
I have given that code in my previous answers to other posts. If you need it personalised post our exact requirement so that I can give that code tailored to your need.