Here comes an expert task:

In Denmark all banks are beginning to implement NemID.
It's a card with small keys used to log in to different places for information regarding the person who has the card.
Watch this: www.nemid.nu (only in danish language as I know)

Since I am administrator in the company I want this:

1) User clicks on shortcut on desktop
2) Shortcut referred to a batch project
3) Batch project starts
4) User enter his/her number ("Tast nummer")
5) User gets directed to portal, where the field should be filled in with users login User-id (Bruger-id) and the user only needs to put in the password to continue

This is the Batchfile: (Some of the text are in Danish language)

@echo off
REM æøå skal skrive med ‘›† i stedet. brug copy - paste


Title DRS bankn›gle b‘rer for Kronjylland
echo.
echo VIGTIGT - Tastes kode forkert 2 gange kontaktes Support - VIGTIGT
echo.
echo Velkommen til DRS bankn›gle b‘rer Kronjylland
echo ... ... ... ... ... ... ... ...
:Kron1
set choice=

echo V‘lg bruger:
echo.
echo Bruger TYPE Bruger-id TAST
echo Allan Opretter 1 105278911 1
echo Jørgen Opretter 2 153996737 2
echo Gunilla Godkender 1 312175508 3
echo Birgit Godkender 2 900374537 4
echo.
echo Opdater ActiveX 9
echo.
echo.
set /p choice=Tast numer:

if not '%choice%'=='' set choice=%choice:~0,1%
for %%I in (1 2 3 4 9) do (if %%I==%choice% (goto Kron2))

echo Det tastede er ikke gyldigt. Starter forfra
pause
goto Kron1

:Kron2
echo Du valgte: %choice%

if '%choice%'=='1' (copy P:\"Banker vejledning m.m"\NemID\Reference\"Sparekassen Kronjylland"\AN.txt C:\".keystore.reference" /Y)
start P:\"Banker vejledning m.m"\NemID\Genveje\"KrontestAN".url
REM (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)&osname=Windows XP&NEMID=105278911

if '%choice%'=='2' (copy P:\"Banker vejledning m.m"\NemID\Reference\"Sparekassen Kronjylland"\JC.txt C:\".keystore.reference" /Y)
start P:\"Banker vejledning m.m"\NemID\Genveje\"KrontestJC".url
REM (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)&osname=Windows XP

if '%choice%'=='3' (copy P:\"Banker vejledning m.m"\NemID\Reference\"Sparekassen Kronjylland"\GM.txt C:\".keystore.reference" /Y)
start P:\"Banker vejledning m.m"\NemID\Genveje\"KrontestGM".url
REM (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)&osname=Windows XP

if '%choice%'=='4' (copy P:\"Banker vejledning m.m"\NemID\Reference\"Sparekassen Kronjylland"\BL.txt C:\".keystore.reference" /Y)
start P:\"Banker vejledning m.m"\NemID\Genveje\"KrontestBL".url
REM (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)&osname=Windows XP

if '%choice%'=='9' (echo Tester ActiveX version
wmic product where "Name='ActiveX sikkerhedssoftware'" get Version /Value
pause
exit)
exit

pause
@echo on

Does anyone know what to do or how to do it???

Here is a link to the internetbank:
Portal Website

Dani AI

Generated

Short summary and practical direction

’s goal — a desktop launcher where a user picks their number and the portal opens with the user-id already set so only the password must be entered — is understandable. is correct that a plain .bat offers no secrecy: batch files and any plain-text copies of credentials or key files are trivially readable and therefore inappropriate for protecting authentication material.

Safer options (conceptual)

  • Use per-user browser shortcuts or bookmarks if the bank supports a URL parameter to prefill a non-secret user-id. Many banks deliberately avoid this for security, so verify server support first.
  • Use a reputable password manager (KeePass, commercial alternatives) with an auto-type or browser plugin to supply the password/token at login; this avoids storing secrets in scripts.
  • Replace the batch with a small signed launcher (PowerShell signed script or compiled helper) that reads an encrypted secret from Windows Credential Manager or the Windows Data Protection API (DPAPI). That keeps any sensitive value encrypted and bound to a user or machine account.

Secure implementation checklist

  • Never store plain-text passwords or private keys on shared drives. Use DPAPI/Windows Credential Manager or a password manager to store secrets.
  • Keep any keystore/reference files on disk with strict ACLs and only copy or activate them through a controlled, signed process.
  • Test the workflow on a non-production machine: confirm browser/ActiveX/Java compatibility, file permissions, and antivirus/EM policy.
  • Confirm the bank’s corporate/NemID guidance — some authentication systems prohibit automated pre-filling or local storage of token material; follow their recommended corporate/token solution where available.

These practices preserve the convenience of a launcher while greatly reducing the security risks that a batch file introduces.

Even if you did know how it would not help you since batch can not be encrypted. And it would be very easy indeed to see the passwords... I would suggest you use some password software or something like that.

Hope this helps,
Batch Devil

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.