You are here

Just Cos I Love This Devt Project ... Some Scripts To Share

7 posts / 0 new
Last post
dtanPApps
Offline
Last seen: 13 years 9 months ago
Joined: 2008-05-12 17:39
Just Cos I Love This Devt Project ... Some Scripts To Share

Just Cos I Love This Devt Project ...

I keep these THREE (3) scripts in the same installation folder as my PortableApps (ie. E:\PortableApps). This allows me to do quick, consistent, repeatable application installs on the various PCs around the house, at work or otherwise (just in the slim chance I do not have my USB drive with me).

===== Make.bat
@echo off

SET CPATH="c:\AddProg\PortableApps"
SET DPATH="d:\Downloads"

SET XPATH=%CPATH%
SET DESKTOP="c:\Documents and Settings\All Users\Desktop\PortableApps"

REM del all old directories
rmdir /s /q %XPATH%

REM mkdir
mkdir %XPATH%

REM xcopy
FOR %%a IN (7-ZipPortable ClamWinPortable Notepad++Portable SumatraPDFPortable PuTTYPortable WinSCPPortable InfraRecorderPortable VLCPortable) DO xcopy %%a %XPATH%\%%a /s /e /z /v /i

REM assoc
REM ASSOC .txt=txtfile
REM ASSOC .out=txtfile
REM FTYPE txtfile=%XPATH%\Notepad++Portable\Notepad++Portable.exe %%1

REM del
del /f /q %XPATH%\PuTTYPortable\Data\settings\*
del /f /q %XPATH%\WinSCPPortable\Data\settings\*
REM del /f %XPATH%\putty\*.zip
REM del /f %XPATH%\WinSCP\*.ini

REM open new directory
start explorer.exe %XPATH%

REM run commands
%XPATH%\7-ZipPortable\7-ZipPortable.exe &
%XPATH%\SumatraPDFPortable\SumatraPDFPortable.exe &

echo.
echo All done!
REM pause > nul

@echo on

===== Make Shortcuts.bat
@echo off

echo Running .vbs
cscript Shortcuts.vbs

@echo on

===== Shortcuts.vbs
Set oWS = WScript.CreateObject("WScript.Shell")
sLinkFile = "c:\Documents and Settings\All Users\Desktop\PortableApps.lnk"
Set oLink = oWS.CreateShortcut(sLinkFile)

oLink.TargetPath = "c:\AddProg\PortableApps"
oLink.Description = "PortableApps"
' oLink.Arguments = ""
' oLink.HotKey = "ALT+CTRL+F"
' oLink.IconLocation = "C:\Program Files\MyApp\MyProgram.EXE, 2"
' oLink.WindowStyle = "1"
' oLink.WorkingDirectory = "C:\Program Files\MyApp"
oLink.Save
' =====
Set oWS = WScript.CreateObject("WScript.Shell")
sLinkFile = "c:\AddProg\PortableApps\7-ZipPortable.lnk"
Set oLink = oWS.CreateShortcut(sLinkFile)

oLink.TargetPath = "c:\AddProg\PortableApps\7-ZipPortable\7-ZipPortable.exe"
oLink.Description = "7-ZipPortable"
oLink.Save
' =====
' if you want auto-startup of apps, add the shortcut .lnk file to the path below
' c:\Documents and Settings\All Users\Start Menu\Programs\Startup

nJoy!

Stevoisiak
Stevoisiak's picture
Offline
Last seen: 4 years 8 months ago
Joined: 2008-02-05 11:22
???

What does this do exactly again?

Simplifying daily life through technology

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 3 months ago
Developer
Joined: 2006-12-06 18:07
This allows me to do quick,

This allows me to do quick, consistent, repeatable application installs on the various PCs around the house, at work or otherwise

The developer formerly known as ZGitRDun8705

consul
consul's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2007-05-02 13:47
i read that part too but ...

I guess I am wondering the why.

The original poster says that it's for when they don't have the usb key with them. I don't read code too well, so does this automatically redownload the apps to a new computer? Or does it update the apps on a computer?
I guess it seems to download all those apps listed midway and installs them onto the computer.
Sort of like a desktop portableapps updater?

Don't be an uberPr∅. They are stinky.

dtanPApps
Offline
Last seen: 13 years 9 months ago
Joined: 2008-05-12 17:39
Exactly ...

A Desktop PortableApps Updater Wink
Deletes c:\AddProg\PortableApps from the Desktop, recopies it from USB drive.

Additionally, the .vbs creates a shortcut on the "All Users" Desktop pointing to c:\AddProg\PortableApps.

Stevoisiak
Stevoisiak's picture
Offline
Last seen: 4 years 8 months ago
Joined: 2008-02-05 11:22
There's already an Updater.

Simplifying daily life through technology

consul
consul's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2007-05-02 13:47
but for those w/ the menu ...

on their desktop, like me, this would work. Though I do have a usb key at the office which I use for this type of multi computer installation process. Smile

Don't be an uberPr∅. They are stinky.

Log in or register to post comments