Solved

"Restore Project State" software, for files/bookmarks/folders etc?

Posted on 2011-09-07
10
289 Views
Last Modified: 2012-05-12
I'm wondering if this software exists, for Windows (XP/7).

When we work on projects, we often have a bunch of stuff open, to relevant things. For example, 5 Word files, 2 Excel files, 8 browser tabs, a record in a database, 5 JPGs, 2 PDFs, 4 open folders,  and 3 Outlook emails. Lots of unrelated software.

When I want to set aside the project a few days, it takes me a long time to open up all these things again - especially when receiving a phone call, the need to have it all "opened up" quickly can be useful.

However, I don't know if this type of software exists. Anyone know if it does?

Thanks!

-Soy
0
Comment
Question by:soyproduct
  • 7
  • 3
10 Comments
 
LVL 38

Expert Comment

by:BillDL
ID: 36557168
Hi Soy.

I'm just monitoring this out of curiosity more than anything else, because my gut feeling is that it would not really be possible for a utility to leave applications open but "suspended".

On a laptop you obviously have a "Suspend-to-RAM" or "Suspend-To-Disk" setting for when the battery power dies or if it goes into hibernation.  Saving to RAM is only good for while the particular PC is powered on or in hibernation with power still being supplied to RAM memory while everything else is powered off, but this has me wondering about how the "Suspend To Disk" option actually works and whether such a feature could be used in a Desktop PC.
http://en.wikipedia.org/wiki/Hibernation_(computing)

I am aware that (on Windows XP anyway), that the file "C:\hiberfil.sys" is used to store the applications that are open when the system goes into hibernation, but understanding exactly how it works and visualising whether it is feasible to implement multiple "simulated hibernations" in an application running on a Desktop PC is something beyond my level of knowledge, but I would be interested in seeing if other experts with more knowledge in this field know of any methods.

If quickly locating all files related to specific projects was an important factor to me, I would probably write a batch file and associate it with a Folder's Right-Click menu or use a "Send To" shortcut to the batch file.  The batch file would do a couple of Directory Listings of the files in that project folder and, dependent on the file extensions, create a new batch file in that folder containing the commands to open all the files for editing when double-clicked.  It would just be a case of knowing the command line switches for each application to create a batch file on the fly.  That would be my very clunky method, and I'm quite glad that I have never had to consider this issue.

Let's see if there is an application that can simulate the wake-up state after a "suspend to disk" state.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 36557196
0
 

Author Comment

by:soyproduct
ID: 36570360
Hi BillDL. The virtualization is a good idea, although possibly not feasible, not granular enough.

I was actually looking for software to record what files/emails/URLS are OPEN at a given point in time. It would just have pointers to the files, even if all apps were closed. For example, the app might have this snapshot:

RUN Project name: "email policies"
-open documents "ex1.doc, ex5.doc, ex2.xls, ex6.jpg, and ex7.gif, and ex9.pdf" (echo errors if any file is missing)
-open URL www.tinyurl.com/wu834 and www.google.com" in default browser
-open email "5/7/09 4:01PM, and "1/14/11 2:02 AM" in defautl PST file
-open windows explorer folder c:\project1\ and d:\policies\2011\
-run "\\server1234\folder\utility.exe"
-run macro to simulate mouseclicks to open these 3 records in database


It seems like a relatively simple software to write, but I'm not a coder so maybe I'm wrong. But it would be extremely useful, no?

-Soy
0
 
LVL 38

Expert Comment

by:BillDL
ID: 36572405
It would be EXTREMELY useful if such software was available to the masses, and I would be surprised if somebody hadn't already created something as a private project but never realised the potential.

I'll do some searches later, and possibly see if I can think of a way that I would try to do something like this if I needed to.  I am not a coder in the "software" sense of the word, but I can usually get things to work using a combination of plain old batch files and some VBScripting.
0
 

Author Comment

by:soyproduct
ID: 36718461
bump
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 38

Accepted Solution

by:
BillDL earned 400 total points
ID: 36891208
Hi soyproduct

Just so you are aware, I have searched extensively for programs that might (even only using some of the functionality) capture the "state" of your system so that you can return to it at a later date.

I'm not a programmer as I have previously said, so I gave up trying to understand how System Sleep Mode or Hibernation does a "Suspend to File", or of more relevance how the saved data is resurrected again.

I instead decided to mess with what I know, and that is scripts and batch files that use native or 3rd party command line driven utilities.  In particular I have been trying to filter out extraneous processes from TASKLIST (and related) programs and include full paths to the running applications and files they have open at the time.

TASKLIST allows you to display only named EXE files, for example:
tasklist /v /fo csv /fi "status eq running" /fi "imagename eq winword.exe"
and you can use multiple filters with the different applications' program names, but it doesn't display full paths to executables and, apart from the likes of explorer.exe which shows the folder(s) it is opened at, listed items do not display the full paths to the target files opened by them.  OK, so in some cases the application displays the opened File Name in the Title Bar, but not the full path to it.  Tasklist displays the Window Title rather than a file name, which isn't much good.

PSLIST (from SysInternals) isn't much use as it isn't really intended for displaying details about what applications have which files open, and so I can't see a way with this to get target file paths.

With the exception of Temp files created and used by applications during a session, I don't think HANDLES (by SysInternals) will show files actually opened by them.

Perhaps SysInternals have other command line programs that do.  I have looked at Process Monitor, etc, but I couldn't see from the command line switches how to get the data needed.

OPENFILES
openfiles /query /v /fo csv>Files_Opened.txt
only works for files opened by network users.  I'm on a standalone home PC, and so can't see any output to work with.

I can get to some full paths to display using TLIST.EXE from the Windows 2000 Support Tools.  You can extract the downloaded file rather than installing, and use TLIST.EXE on its own.

Example use:
 
@echo off
set CurrDir=%~dp0
set CurrDir=%CurrDir:~0,-1%
set ProcessList=%CurrDir%\TListing_Report.txt

if not exist "%CurrDir%\tlist.exe" echo ERROR! TLIST.EXE not in current directory. & pause & goto :EOF

if exist "%ProcessList%" del "%ProcessList%" > nul

echo Listing running processes ...
echo.
for /f "tokens=1" %%A in ('tlist') do (call :GetCmdLine %%A)
echo Finished.
echo Report is:
echo "%ProcessList%"
echo.
echo Press any key to quit ...
pause > nul
goto :EOF

:GetCmdLine
tlist %1 | find /i "CmdLine:" | find /i /v "svchost">>"%ProcessList%

Open in new window

Example Output (actual paths replaced with generic paths on I:\ Drive):
 
CmdLine: \SystemRoot\System32\smss.exe
   CmdLine: C:\WINDOWS\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16
   CmdLine: winlogon.exe
   CmdLine: C:\WINDOWS\system32\services.exe
   CmdLine: C:\WINDOWS\system32\lsass.exe
   CmdLine: C:\WINDOWS\system32\Ati2evxx.exe
   CmdLine: "C:\Program Files\Microsoft Security Client\Antimalware\MsMpEng.exe"
   CmdLine: C:\WINDOWS\system32\spoolsv.exe
   CmdLine: C:\WINDOWS\system32\FsUsbExService.Exe
   CmdLine: "C:\Program Files\Java\jre6\bin\jqs.exe" -service -config "C:\Program Files\Java\jre6\lib\deploy\jqs\jqs.conf"
   CmdLine: "C:\Program Files\Photodex\ProShowProducer\ScsiAccess.exe"
   CmdLine: C:\WINDOWS\system32\tcpsvcs.exe
   CmdLine: C:\WINDOWS\system32\MsPMSPSv.exe
   CmdLine: C:\WINDOWS\System32\alg.exe
   CmdLine: Ati2evxx.exe -Client
   CmdLine: C:\WINDOWS\Explorer.EXE
   CmdLine: "C:\WINDOWS\system32\taskswitch.exe" 
   CmdLine: "C:\WINDOWS\system32\CTHELPER.EXE" 
   CmdLine: "C:\Program Files\Microsoft Security Client\msseces.exe" -hide -runkey
   CmdLine: "C:\Program Files\Common Files\InstallShield\UpdateService\ISUSPM.exe" -scheduler
   CmdLine: "C:\Program Files\Windows Media Player\WMPNSCFG.exe" 
   CmdLine: "C:\WINDOWS\explorer.exe" /n, /e,C:\
   CmdLine: "C:\Program Files\Microsoft Office\OFFICE11\powerpnt.exe"  "I:\FolderName\Sub-Folder\FileName.ppt"
   CmdLine: "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE"  /n /dde
   CmdLine: "C:\WINDOWS\system32\NOTEPAD.EXE" I:\FolderName\Sub-Folder\FileName.txt
   CmdLine: "C:\Program Files\outlook express\msimn.exe"  /eml:I:\FolderName\Sub-Folder\FileName.eml
   CmdLine: "C:\Program Files\Internet Explorer\IEXPLORE.EXE" -Embedding
   CmdLine: "C:\Program Files\Internet Explorer\IEXPLORE.EXE" SCODEF:364 CREDAT:79873
   CmdLine: "C:\Program Files\Billpad\billpad.exe"  I:\FolderName\Sub-Folder\FileName.txt
   CmdLine: "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe"  "I:\FolderName\Sub-Folder\FileName.pdf"
   CmdLine: "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" --channel=2340.0012FB7C.372824611 --type=renderer  "I:\FolderName\Sub-Folder\FileName.pdf"
   CmdLine: "C:\Program Files\Internet Explorer\IEXPLORE.EXE" SCODEF:364 CREDAT:14340
   CmdLine: cmd /c ""I:\EE\Q_27296217_Restore_Project_State\Get_TListing.cmd" "

Open in new window

It is immediately clear that:

- Adobe Acrobat Reader adds "--channel=2340.0012FB7C.372824611 --type=renderer" between the program name and the open *.pdf file
- Internet Explorer add variants of "SCODEF:364 CREDAT:14340" as the URL of the opened page.
- Microsoft Word and the other MS Office Apps don't show the file opened, presumably because the use of DDE confuses things.
- Windows Explorer doesn't show the opened folder using the batch file because the path to the opened folder isn't against the "CMD:" line, but somewhere above.  TLIST explorer.exe  would show it, but a separate find command for "explorer.exe" would be needed.

The Internet Explorer issue is discussed HERE.

You can get the Current Working Directory of Windows Explorer by adding a FIND filter to the batch file above that finds "CWD:", but it includes (repeatedly) the current logged on user's Desktop path in the results.

It should be clear by now from what I have messed around with that there are a few complications involved with trying to employ native and 3rd party command line tools.

I don't know about WMI/WMIC.  I haven't tried it, and I can't see any PowerShell "scriptlets" that get the data we would need.  Maybe VBScripting, but that takes me into a realm that I am less familiar with.

The idea was simply to capture what Application EXE files are running and what files each of their instances have open.  By knowing in advance all the usual applications used on projects the results could be filtered.  The output would then just be converted into actual commands.

For example, for all instances of Windows Explorer, run the command:
explorer  /n, /e,"C:\Full_Path"

For all instances of WINWORD.EXE execute the command:
start /b /wait winword <any switches> "C:\Full_Path_To\FileName.doc"

and so on.

If I had found a utility program that gave me the full paths to EXEs and File In Use by them at the material time, then creating a batch file on the fly from that data to save in the project folder for later use would be easy.

Bill
0
 

Author Comment

by:soyproduct
ID: 36931946
Bill - THANK YOU for all this great info! You rock. Sorry about the delay in replying.

We would also need Outlook PST access - select emails would open up (related to the project), with "graceful" error messages if the email(s) have been deleted etc. So VBScripting would work for that.

In any case, thanks for all the info. If I hear about this type of software in the future, I'll make sure to let you know!

-Soy
0
 
LVL 38

Expert Comment

by:BillDL
ID: 36934472
Thank you Soy.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 36934691
Just another couple of ideas that occurred to me that you might wish to look into.

On my WinXP system I have a lot of custom settings designed to eliminate clutter.  I don't show the "My Recent Documents" on the Start Menu because I don't allow Windows to save my document history.  The relevant registry settings are, on a per-user basis:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoRecentDocsHistory"=hex:10,00,00,00
"NoRecentDocsMenu"=hex:01,00,00,00
"ClearRecentDocsOnExit"=hex:01,00,00,00

With the "NoRecentDocsHistory" set to 1 it doesn't save shortcuts to the recently opened documents, the value of 1 for "NoRecentDocsMenu" means don't show the item on the start menu, and the last one is pretty apparent. These are "Policies", and so shouldn't normally exist on a default standard Windows, however if they have been created you can force the document history to be maintained by changing the value of "NoRecentDocsHistory" to a Zero (hex:00,00,00,00).

Standard Windows shortcuts (*.LNK files) are created in the current user's folder, eg.
"C:\Documents and Settings\Bill\Recent"

You can get a Shortcut's "Properties", including the target path, using VBScript as in this example:
http://www.robvanderwoude.com/vbstech_shortcuts.php
You could have a "DOS" batch file that runs FORFILES with the /D (date) switch  (http://ss64.com/nt/forfiles.html), or other similar method, to find *.LNK files created that day in the user's "Recent" folder, and then pass the path for each *.LNK  separately to a VBS file that gets the target path from it.

I suppose you could also use the XCOPY command with the /D switch to physically copy that day's shortcuts from the "Recent" folder to the same folder as your batch file. (http://ss64.com/nt/xcopy.html)

If this idea might be useful to you, then I'm sure that there are either utilities or batch file commands (using the %DATE% and %TIME% variables and the files' "last modified" date/time) that would allow you to thin out the *.LNK files to say the last hour's worth.

Example VBScript that accepts the path to a *.LNK file as the argument:

set WshShell = WScript.CreateObject("WScript.Shell")
set Lnk = WshShell.CreateShortcut(WScript.Arguments.Unnamed(0))
WScript.Echo Lnk.TargetPath
Set wshShell = Nothing

You can call this VBS file like this, assuming the batch file is in the same folder as the VBS file which has been named "GetTargetFromLnk.vbs":
call cscript //NoLogo "GetTargetFromLnk.vbs" "C:\Path_To\FileName.lnk"
and it will return the path to the target file set in the named shortcut.

Here is an example of a batch file that lists all the *.LNK files in the current user's "Recent" folder, gets the targets from the *.LNK files, and then creates a basic batch file (Current_State.cmd) comprising commands for a handful of file types matched with their default programs.  It DOESN'T filter the shortcuts by time or date, and so will be extensive.  Perhaps the shortcuts for ONLY that day could be copied out to a neutral folder and then the shortcuts in THAT folder processed to get the targets.  
 
@echo off
set CurrDir=%~dp0
set CurrDir=%CurrDir:~0,-1%
set SaveStateBatch=%CurrDir%\Current_State.cmd
set TmpList=%CurrDir%\_tmpLnkList.txt
set TargetList=%CurrDir%\TargetList.txt
set SCRIPT=cscript //NoLogo "%CurrDir%\PathFromShortcut.vbs"

set RECENT=C:\Documents and Settings\Bill\Recent

dir /a-d /on /b /s "%RECENT%\*.lnk">"%TmpList%"

echo.>>"%SaveStateBatch%"

echo %DATE% %TIME%>"%TargetList%"
echo List of Targets in Current User Recent folder>>"%TargetList%"
echo.>>"%TargetList%"

echo Saving Target Paths of Shortcuts in 'Recent' folder ...
echo.

for /f "tokens=* delims=" %%A in ('type %TmpList% ^| find /i ".lnk" ^| find /i /v "_tmpLnkList" ^| find /i /v "TargetList" ^| find /i /v "PathFromShortcut" ^| find /i /v "Current_State" ^| find /i /v "SYSTEM (C).lnk"') do (
    for /f "tokens=* delims=" %%B in ('%SCRIPT% "%%A"') do (
        if /i %%~xB equ .csv echo Excel.exe "%%B">>"%SaveStateBatch%"
        if /i %%~xB equ .xls echo Excel.exe "%%B">>"%SaveStateBatch%"
        if /i %%~xB equ .doc echo Winword.exe "%%B">>"%SaveStateBatch%"
        if /i %%~xB equ .txt echo Notepad.exe "%%B">>"%SaveStateBatch%"
        echo %%B>>"%TargetList%"
    )
)
echo.>>"%TargetList%"
echo ================================================>>"%TargetList%"

echo.
echo Finished.
echo.
echo Commands saved in batch file: "%SaveStateBatch%"
echo List of targets saved in file: "%TargetList%"
echo Targets with no extension will probably be for Windows Explorer.
echo.
echo.
echo Press any key to finish ...
pause>nul
if exist "%TmpList%" del "%TmpList%" > nul

Open in new window


 PathFromShortcuts.cmd
 PathFromShortcut.vbs
Anyway, this is just an example of things that might be possible.

Bill
0
 
LVL 38

Expert Comment

by:BillDL
ID: 36934695
... and Sorry, but I really don't know much about scripting for MS Outlook.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
When the confidentiality and security of your data is a must, trust the highly encrypted cloud fax portfolio used by 12 million businesses worldwide, including nearly half of the Fortune 500.
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now