A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tutorial for setting up a well-organized consistent efficient Windows menu system



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old July 16th 18, 07:00 PM posted to alt.comp.os.windows-10,microsoft.public.windowsxp.general
Arlen Holder
external usenet poster
 
Posts: 466
Default Tutorial for setting up a well-organized consistent efficient Windows menu system

As an aside, there are issues with the taskbar that I haven't resolved yet.
http://img4.imagetitan.com/img.php?image=18_taskbar01.jpg

That is:
- Some batch-file shortcuts won't properly pin to the taskbar
- While others will pin to the taskbar
Where the ones that won't, can be made to pin to the taskbar ... but ...
- They won't have the icon that is assigned to them when on the taskbar

These easily pin to the taskbar with the correct icon
- shutdown.lnk & cmd-as-admin.bat
These only pin to the tasbar sans the correct icon
- curlme.bat & kill-gateway.bat

Taskbar-pinning methods attempted a
a. Rightclick "Pin to taskbar"
b. Leftclick slide onto taskbar (with taskbar unlocked, of course)
c. Pin to heterodox Start Menu & then rightclick More Pin to taskbar
d. Pin to heterodox Start Menu & Pin to rightclick More Pin to taskbar
e. Cortana {name of batch file} Pin to taskbar
f. Populate %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\
g. Run the given command (which puts a cmd-window icon in the taskbar)
and then rightclick on the taskbar running icon Pin to taskbar

For two of the four homebrew commands, only that last method (g)
works, but it results in a command-window icon instead of the given icon.
http://img4.imagetitan.com/img.php?image=18_taskbar01.jpg
Ads
  #2  
Old July 16th 18, 07:59 PM posted to alt.comp.os.windows-10,microsoft.public.windowsxp.general
Arlen Holder
external usenet poster
 
Posts: 466
Default Tutorial for setting up a well-organized consistent efficient Windows menu system

On 16 Jul 2018 18:00:03 GMT, Arlen Holder wrote:

These easily pin to the taskbar with the correct icon
- shutdown.lnk & cmd-as-admin.bat
These only pin to the tasbar sans the correct icon
- curlme.bat & kill-gateway.bat


For the tribal record, these are the above commands
with the location of the associated icons.
===============================================
shutdown.lnk
Target=%windir%\System32\SlideToShutDown.exe
ICONFROM: %SystemRoot%\System32\SHELL32.dll
KEYBOARD: Shortcut Properties Shortcut key (just press "s")
which will make the keyboard key Ctrl + Alt + S
NOTE: There are lots of ways to shut down; this is only one.
===============================================
reboot.lnk
Target=C:\Windows\System32\shutdown.exe /r /f /t 5 /c "Reboot in 5 seconds!"
ICON: %SystemRoot%\System32\cmmon32.exe
KEYBOARD: Shortcut Properties Shortcut key (just press "r")
which will make the keyboard key Ctrl + Alt + R
===============================================
abortshutdown.lnk
Target=%Windir%\System32\shutdown.exe -a
ICON: C:\Windows\System32\Dxpserver.exe
KEYBOARD: Shortcut Properties Shortcut key (just press "a")
which will make the keyboard key Ctrl + Alt + Del
NOTE: There are lots of ways to abort; this is only one.
===============================================
cmd-as-admin.bat
ICONFROM: %SystemRoot%\System32\SHELL32.dll
KEYBOARD: Shortcut Properties Shortcut key (just press "c")
which will make the keyboard key Ctrl + Alt + C
- file below -
@ECHO OFF

REM Open a new shell "Run As Administrator"
REM Based on script by foxidrive on alt.msdos.batch

SETLOCAL ENABLEEXTENSIONS

IF NOT "%~1"=="" goto :START

SET LogFile=%TEMP%\cmda.vbs"
Echo Set UAC = CreateObject("Shell.Application") "%LogFile%"
Echo UAC.ShellExecute "%~f0", "%cd%", "", "runas", 1 "%LogFile%"
Start "" /MIN "%LogFile%"
goto :EOF

:START
Cmd /k "CD /D "%*" & Echo Administrator: & color 4F"
:EOF
===============================================
curlme.bat
ICONFROM: %SystemRoot%\System32\SHELL32.dll
- file below -
@echo off
set pingit=www.google.com
:curlme
REM: C:\app\browser\cmd\curl\bin\curl.exe icanhazip.com
C:\Windows\System32\curl.exe icanhazip.com
timeout 1 /nobreaknul
ping %pingit%
pause
goto curlme
:stop
exit
===============================================
killgw.bat
ICONFROM: %SystemRoot%\System32\SHELL32.dll
- file below -
@echo off
REM From https://www.liquidvpn.com/vpn-kill-switches/
REM Specifically: https://www.liquidvpn.com/billing/dl.php?type=d&id=49
:: GetAdmin
:-------------------------------------
:: Verify permissions
nul 2&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"


:: On Error No Admin
if '%errorlevel%' NEQ '0' (
echo Getting administrative privileges...
goto DoUAC
) else ( goto getAdmin )

oUAC
echo Set UAC = CreateObject^("Shell.Application"^)
"%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1
"%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B

:getAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------


@echo off
:: CHANGE DEFAULT GW IP BELOW
set defgw=192.168.0.1


@For /f "tokens=3" %%1 in (
'route.exe print 0.0.0.0 ^|findstr "\0.0.0.0.*0.0.0.0\"') Do set
defgw=%%1
cls
:start
cls
echo.
color 0C
echo LiquidVPN's killswitch, ver. 0.1 - by LiquidVPN
echo This disables your LAN gateway to minimize IP leaks when vpn drops out
echo.
echo.
echo Your router gateway is probably "%defgw%"
echo -If nothing appears or it's incorrect, add it manually (Press '3')
echo.
echo USAGE:
echo -Press "1" to enable the killswitch (which blocks IP "%defgw%")
echo -Press "2" to disable the killswitch (which unblocks IP "%defgw%")
echo.
echo -Press "3" to manually set the default gateway (if it's not detected).
echo -Press "x" to exit (without setting or resetting the gateway).
echo.
echo -Press "h" for help
echo.
set /p option=Your option:
if '%option%'=='1' goto ption1
if '%option%'=='2' goto ption2
if '%option%'=='3' goto ption3
if '%option%'=='x' goto :exit
if '%option%'=='h' goto :help
echo Insert 1, 2, x or h
timeout 3
goto start
ption1
route delete 0.0.0.0 %defgw%
echo Default gateway "%defgw%" removed
timeout 3
goto start
ption2
route add 0.0.0.0 mask 0.0.0.0 %defgw%
echo Defaulte gateway "%defgw%" restored
timeout 3
goto start
ption3
echo
set /p defgw=your gw IP (e.g. 192.168.0.1):
goto start
:help
cls
echo.
echo.
echo ======================
echo This simple killswitch removes your default gateway
echo and hence blocks traffic from reaching the internet when
echo your VPN gets disconnected.
echo.
echo Here is how you use it.
echo.
echo Step 1: Connect to any OpenVPN service
echo Step 2: Enable this killswitch (option "1")
echo.
echo Now Any internet traffic will pass through your VPN only.
echo.
echo - If your VPN gets disconnected so will your internet.
echo - Disable the this killswitch and reconnect to your ISP.
echo.
echo.
echo When you disconnect from your VPN follow these steps
echo to reconnect or to browse the internet normally.
echo.
echo Step 1: Close any software that may leak your real IP
echo Step 2: Disable this killswitch (Option "2")
echo Step 3: Reconnect to your VPN and enable the killswitch (Option "1")
echo.
timeout /T -1
goto start
:exit
exit
===============================================
===============================================
  #3  
Old July 16th 18, 08:38 PM posted to alt.comp.os.windows-10,microsoft.public.windowsxp.general
Arlen Holder
external usenet poster
 
Posts: 466
Default Tutorial for setting up a well-organized consistent efficient Windows menu system

For the tribal record, these are the above commands
with the location of the associated icons.


I'll solve the enigma eventually, but I put the *exact same* icons from one
machine to another, and the same problem occurred (I copied the shortcuts
verbatim, since all my machines are set up the same, hence shortcuts copy
over easily).
http://img4.imagetitan.com/img.php?image=18_taskbar02.jpg

These easily pin to the taskbar with their associated icon:
- slideshut.lnk
- reboot.lnk
- abourtshut.lnk
- cmda.lnk

These do not easily pin to the taskbar with their associated icon:
- killgw.lnk
- curlme.lnk

Anyone on Usenet who *understands* why that would be the case, would be
someone I would say understands Windows well.
http://img4.imagetitan.com/img.php?image=18_taskbar02.jpg
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 03:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.