New
#1
Requesting help on Batch script and Batchscript to powershell
Hi All
Greetings
I am having a below batch file code to create a desktop shortcut . The below code has Admin and trader related scripts I could not understand the flow here . Can anyone please help me with what this code is speaking. And i need the below code to change to PowerShell. Need help on this please.
------------------------------------------------------------------------------------
@echo off
if[%Adminmode%] NEQ[1] goto :tradershortcut
set SHORTCUTFILE = "%USERPROFILE%\Desktop\ADMIN MMI %USERGROUP% %ENVIRON%.url"
echo [InternetShortcut] > %SHORTCUTFILE%
echoURL="file.///%REMOTEDIR%\environs\%ENVIRON%\scripts\admin_scripts\admin_MMI_%USERGROUP%_%ENVIRON%.bat" >> %SHORTCUTFILE%
echo IconFile="%LOCALWKSDIR%\environs\%ENVIRON%\scripts\helperapps\icon\mmi_admin.ico" >> %SHORTCUTFILE%
echo IconIndex=0 >> %SHORTCUTFILE%
goto:EOF
:traderShortCut
set SHORTCUTFILE = "%USERPROFILE%\Desktop\ADMIN MMI %USERGROUP% %ENVIRON%.url"
echo [InternetShortcut] > %SHORTCUTFILE%
echoURL="file.///%REMOTEDIR%\environs\%ENVIRON%\scripts\trader_scripts\start_MMI_%USERGROUP%_%ENVIRON%.bat" >> %SHORTCUTFILE%
echo IconFile="%LOCALWKSDIR%\environs\%ENVIRON%\scripts\helperapps\icon\mmi.ico" >> %SHORTCUTFILE%
echo IconIndex=0 >> %SHORTCUTFILE%