Cyprich.com

Occasionally Relevant Insights from a Software Builder

By

A Quick (Not Approved by Xerox) Way To Setup SSL On All uStores

When you have hundreds of stores in uStore, making updates on all of them takes a very long time. This doesn’t matter if your paid by the hour, but if your in a hurry and need everything updated quickly, the manual method is not the best solution. For your information, this method is described below. The procedure can take a few minutes to complete. Multiply that by hundreds of stores and you’ll see the problem.

Manual Method

In the uStore admin site,

  1. Take store offline.
  2. Open Store Setting -> Set Up Store
  3. In the Advanced tab, select the Security Option
  4. Press Save & Place Online

The change can easily be made by modifying a table in the uStore database. This method isn’t recommended by Xerox and I wouldn’t recommend it either to novice database administrators. For experienced users, make a backup of the database before you make any changes. MSSQL doesn’t ask “Are you sure you want to make this change?” when you run SQL queries.

SQL Method

In the uStore database, you will need to modify the Store table. Each store here has an SslOption field which defaults to 0 value (see table below):

SslOption Field
0 Not Secured
1 Secure All
2 Secure Critical Points

Select which SSL option that you want and run the following SQL command:

     UPDATE Store SET SslOption=@SslOption WHERE StatusID=1

Example:
     UPDATE Store SET SslOption=2 WHERE StatusID=1

This updates all active stores to SSL option: Secure Critical Points

After the SQL query is run, you need to force a cache refresh. The page for this is on your your uStore at (use the IP of your server):

     http://127.0.0.1/uStoreAdmin/Support.aspx

In Cache update, press the Refresh Localization Cache button, Refresh ACL Cache button, and Refresh General Cache button. Not sure if all of these are needed, but I’ve done this and the stores were fine afterwards. If you don’t do a manual cache refresh, this will eventually occur in uStore, but if someone opens a store in the admin site and makes a modification, you may lose the changes your SQL query made.

And that’s it. Again, if your not an experience database administrator, don’t attempt this.

By

How to Lock a Windows 10 Screen from a Console Command

I normally lock my computer when I step away from it to prevent other users from getting access to it which would give them full access to my web sites, databases, and other sensitive files. I do this as opposed to logging out of the computer. Locking the screen keeps you logged in but it requires you to enter your login password to open the desktop.

While working on a computer, you can press the Windows + L keys to lock the screen. If your logged in by VNC, closing your connection does not automatically lock your computer and it will remain in an unlocked state so that anyone can start using it. A simple way to lock your computer from a command prompt is to run:

rundll32.exe user32.dll,LockWorkStation

Opening a command prompt to do this is too much work, so create a batch file (Lock Workstation.bat), place that line in it, and keep the file on the Desktop for easy access. Then when you complete your remote session, lock the screen before you close the connection. 

By

Common Task Scheduler Event IDs

Here is a list of the most common Event IDs in the History tab for Windows Scheduled Tasks.

Event ID Description
100 Task Started
101 Task Start Failed
102 Task completed
103 Action start failed
106 Task registered
107 Task triggered on scheduler
108 Task triggered on event
110 Task triggered by user
111 Task terminated
118 Task triggered by computer startup
119 Task triggered on logon
129 Created Task Process
135 Launch condition not met, machine not idle
140 Task registration updated
141 Task registration deleted
142 Task disabled
200 Action started
201 Action completed
203 Action failed to start
301 Task engine properly shut down
310 Task Engine started
311 Task Engine failed to start
314 Task Engine idle
317 Task Engine started
318 Task engine properly shut down
319 Task Engine received message to start task
322 Launch request ignored, instance already running
329 Task stopping due to timeout reached
332 Launch condition not met, user not logged-on
400 Service started
411 Service signaled time change
700 Compatibility module started

By

Common Task Scheduler Operational Codes

Here are some hard to find Operational Codes that you find in the History tab in Windows Task Scheduler. Very useful for trying to figure out why your scheduled task isn’t working.

Op Codes Description
0 or 0x0 The operation completed successfully.
1 or 0x1 Incorrect function called or unknown function called.
2 or 0x2 File not found.
10 or 0xa The environment is incorrect.
0x41300 Task is ready to run at its next scheduled time.
0x41301 Task is currently running.
0x41302 Task is disabled.
0x41303 Task has not yet run.
0x41304 There are no more runs scheduled for this task.
0x41306 Task is terminated.
0x8004131F An instance of this task is already running.
0x800704DD The service is not available (is ‘Run only when a user is logged on’ checked?)
0xC000013A The application terminated as a result of a CTRL+C.
0xC06D007E Unknown software exception.

By

How To Add Apps to Windows Startup Folder

When a computer reboots, there may be certain applications that need to be started. This was easy to do in Windows XP. All that you need to do is drag a shortcut to the app into the Startup folder through the Start menu -> All Programs -> Startup. However, in later versions of Windows (i.e. 2012, Windows 10) this option isn’t available in the Start menus.

You can open the Startup folder and add programs to run with the following steps:

  • open the Run command with Windows Key + R
  • type shell:common startup
    This is for opening the Startup folder for all users. If you just want to open the folder for the logged in user, type shell:startup.
  • Add shortcuts to the applications you want to run in the open Startup folder.

Then the next time that you reboot the computer, the applications in the Startup folder will .