Nsis shortcuts for different users - unicode

Advice Nsis – windows7
I have two users on the same computer (Admin and standard), I will be running my nsis installer when logged in to the standard user. My problem is that I need to create shortcuts on both desktops!!
Example
Standard User - Desktop
- Shortcut 1
- Shortcut 2
- Shortcut 3
Admin User - Desktop
- Shortcut 2
- Shortcut 4
I’m new to nsis- I have managed to create the Shortcut on the standard user account - If it helps I know the admin username and password.
NSIS - Desktop Shortcut For All Users
I saw this link but it does not seem to be working
When I try
CreateShortCut "${ProfilePathAllUsers}\Desktop\simpleApp.lnk" "$INSTDIR\ApplicationsLocation\ Applications.simpleApp.Host.exe"
I fear I may be going in the wrong direction-
Im also using Unicode Nsis
Any Advice will be welcome - Thank you

You cannot write to another users profile without administrator rights so make sure you are elevated.
Creating a shortcut for another user is wrong IMHO. If you want to create a shortcut for all users you can do:
; This code assumes you are elevated...
SetShellVarContext all
CreateShortcut "$desktop\myapp.lnk" "$instdir\myapp.exe"
Knowing the username/password would indeed help if you really wanted to do it for a single user; you would have to call LogonUser + SHGetFolderPath with the system plugin to get the path (Or the code you linked to but that uses undocumented stuff).

Related

VBS: Word.Documents.Open fails unattended [duplicate]

I have an Access VBA macro that generates a report, saves it in .pdf and then sends it by e-mail using CDO. Everything works fine if I run it manually or if I set it to be run on Task Scheduler with the security option "Run only when user is logged on". However, if I set the option to "Run whether user is logged on or not" (even with the option "Run with highest privileges") the program crashes on the second line of:
strFileFullPath = CurrentProject.Path & "\Test Report.pdf"
DoCmd.OutputTo acOutputReport, strReportName, acFormatPDF, strFileFullPath
with the error
Microsoft Access can't save the output data to the file you've
selected.
I am pretty sure that this happens because the macro runs with other user in the background. I have been searching for a solution but all I have found is that it is not possible and that I should change for other printing methods, such as PDF Creator (which brings a lot of other issues).
I am using Access 2016 in Windows Server 2012 R2 Standard.
It sounds crazy, but after a few days with no results, I managed to solve my problem just by creating these two empty folders:
C:\Windows\System32\config\systemprofile\Desktop
C:\Windows\SysWOW64\config\systemprofile\Desktop
All the credits to Faye's comment on the bottom of this page: https://blogs.technet.microsoft.com/askperf/2015/02/18/help-my-scheduled-task-does-not-run/
Although the comment regards Excel, it solved my issue on Access. It seems that is related with Office having trouble with running some processes (in my case, a pdf generation) in non-interactive mode (which is the mode that Task Scheduler runs when "Run whether user is logged on or not" is checked).

Get identity of logged in Visual Studio user from extension

I'm developing a visual studio 2015 extension and I'm looking to get the identity of the user who's logged into the IDE (different to the user logged in to windows, or running devenv).
I can't figure out where (or if) I can get that information. It doesn't appear to be in the DTE object anywhere and googling around hasn't helped.
Just the username
string username = System.Environment.UserName;
or
string adName = System.Environment.UserDomainName;
Full UserPrinciple
System.DirectoryServices.AccountManagement.UserPrincipal.Current
Most the normal .net methods for getting users from system or globals should work. All the AD namespaces (System.DirectoryServices) will also work as usual.
Also this regkey gets set at vs startup with the interactive user.
Code:
C#
General:
in header / above namespace
MVC: Not sure about earlier version but 3 - 5 not required
using System.Security.Principal
function, property etc
string userid= User.Identity.Name.toString()

how to associate the launch of a program with a specific device connection to PC

My first question, so be gentle.. :)
I would like to get a certain PC located program to run (instead of iTunes) every time I connect my iPhone to my PC.
specifically - iTools, which is kind of a substitute for iTunes.
From my research i got that it involves adding/manipulating some registry values (something like "ServicesAutoStartOnConnect") at this location: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows CE Services. When i look there, under Microsoft, there is no Windows CE Services sub folder.
I'm using win7 prof. and as mentioned, the device is my iPhone4 (with iOS6.0.1 on it).
Can anybody give me some organized steps to be taken in order to accomplish this?
Not sure if you are aware of SuperUser.com. It is a site, much like this one, but caters more for the type of question you have asked here. For example, I did a search on 'iphone' + 'connect' + 'itunes' and found some possible helpers - SuperUser Search

Lost Microstrategy Administrator Password?

In researching this scenario, all I could find was a suggestion that you contact Microstrategy, send them your metadata DB and ask them for the password.
This CAN'T be the only way.
Is there no way to simply reset the password in some fashion? Looking at the DSSMDUSRACCT table in the metadata DB, this appears to hold (at first glance anyway) a hashed/encrypted password, but I don't believe this is correct, as every entry for every account is the same in the PASSWD field.
Can someone suggest an alternative beyond sending a database to Microstrategy?
There isn't any alternative. We ended up in similar scenario and had Microstrategy reset the password. Password is not easily recoverable from Medadata since it is secured.
I'm not sure how many projects you have in your metadata or if you have access to another user that may have all privileges; but another option would be to create a new database, use MSTR configuration wizard to populate metadata tables, then duplicate the project across project sources into the new metadata that was just created. The Administrator user in this new metadata will have a blank password. If this is not an option then I recommend to open a support ticket (as others have suggested).
One of the things which one can try is to see any command manager script or system manager workflow. Every MicroStrategy environment may have atleast one of the above two things running in their environment. If you check the file, you may see the password for the administrator user. But in case if there is none of these being used then contacting MicroStrategy support would be the right thing to do.
Thanks,
Nikhil.
Benedict's right, there's no way they would keep passwords in plaintext in the metadata. You'll have to send it to them in a support ticket. It can take quite a few days, but they get the job done.
as soon as you get it reset use object manager, create a configuration object package for the administrator account and anytime you forget it, just redeploy the package to reset it.
You could try using the MicroStrategy Object Manager to copy the Administrator user from another project source/server to this environment.
This should do the trick if you have at least one other user with the right administrative privileges.
The other day I wanted to login to one of our applications. However, I forgot my username and password. I tried using the forgot password wizard but had no luck.
The steps I am about to walkthrough will work with most web applications with average logon security measures. It may not work with MicroStrategy, but should work if the input password is not externally verified.
So this is how I got access:
First I logged into my database manager -If you don't have access to
this... run a scan for 'password' on your server root. For Linux I
write sudo grep 'password' -roni or try: db_pass, dbpass,
database_password, etc as other search terms... The -roni will apply various filtering and
options to the search... aka line number, file name and etc. After
getting some results... find a likely file and open it to see if you
have your database details in there.
Login to your database manager. Find the table associated with your account. (This will usually have the name X_users If the password isn't hashed, just take it and login with it... if it is hashed... copy the hashed value to your clipboard.
Change the directory to your chosen applications root.
Run the scan with the search term 'password' or 'md5(' ...this will hopefully bring up a login controller file.
Edit the line within the function that takes your login input. Change the value 'md5($#####)' with '$#####', (aka removing the md5hashing of your input).
Reload the login page. Now, enter your username and hashed password copied from the database and login.
If done correctly you should now be logged into your web app.
Change the password of the account. Now go back to the login controller file and undo the chnages.
This might not be applicable with your app in question, but it's worth a shot! ....and if it isn't appropriate for your scenario... it could still be very helpful for someone else with a similar problem and different application. I just thought there's a small chance it may help someone who's locked out of one of their web applications. Rather than having to reinstall and lose data.
I'd be happy for you to improve on this or give some feedback.

Unlocking Locked Out accounts using PowerShell (not with Quest AD cmdlets)

I'm writing a GUI tool using PowerShell that is able to do most AD related tasks with just a user name and button click. I've done all the usual ones (Create / Remove Users, Create / Remove Security & Distribution Groups, Resetting Passwords, etc) but can't find away of unlocking a "Locked Out" account.
I'm trying to do this without using Quest AD cmdlets as I want a more stand alone solution. So I'm wondering whether is possible with plain PowerShell (1.0 or 2.0) in a Windows 2003 Domain.
Many thanks.
Set the lockoutTime property of the DirectoryEntry to 0.
Sample:
$x = [ADSI]'LDAP://SomeDN'
$x.lockoutTime = 0
$x.CommitChanges()
$x.Close()
Been out of the AD world for a few years. I haven't worked with PowerShell at all but does the link below offer what you're looking for?
http://dmitrysotnikov.wordpress.com/2007/08/14/enable-disable-unlock-user-accounts/