How to reset the computer to ask for user account control prompt after msi installation - powershell-2.0

I have to install SQL Server Native client using PowerShell.
When i use the below command to install the same it comes up with a user account control prompt :
$arguments = "/i C:\Users\Subhayan\Desktop\sqlncli_32.msi ADDLOCAL=ALL /passive IACCEPTSQLNCLILICENSETERMS=YES"
start-process -FilePath msiexec -ArgumentList $arguments
So i searched some blogs and came up with a solution that i have to enable the registry key value : AlwaysInstallElevated in the path : HKLM:\SOFTWARE\Policies\Microsoft\Windows\Installer
This key was not present so i created that and set the value to 1 .The installation went through properly.
But since this is a production system i have to toggle it back to what it was original . So i again made the registry key value to 0 :
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Inst
aller
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
PSChildName : Installer
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
AlwaysInstallElevated : 0
But when i try to install again to test whether the value has been reset or not , the user account control prompt does not come back. The installation goes on silently.
Can someone please help me how to bring this back ?

Open the Local Security Policy editor.
In the left pane, expand Local Policies, and click/tap on Security Options. (see screenshot below)
In the right pane of Security Options, double click/tap on User Account Control: Behavior of the elevation prompt for standard users. (see screenshot above)
Select the behavior you want for the UAC elevation prompt for standard users, and click/tap on OK. (see screenshot below)
NOTE: The default setting is Prompt for credentials. See the blue note box at the top of the tutorial for a description of each setting.
Close the Local Security Policy editor.

Related

Control + F5 is giving 403 forbidden error for some images randomly

I have an application build in MVC and deployed on the IIS(6.2).
The page is load with all the images but when I press Ctrl + F5, some images randomly gives 403 Forbidden error and image stop showing. But when I copy image source and access it from the other browser tab, it shows the image.
I already check for permission on the image folder and it is as expected with all the required permission.
When I do only F5 to reload with the browser button, it loads all the images as expected.
Images should load properly with Ctrl + F5 as well.
What can be the possible reasons and its fixes?
**
Answer: I have resolved the issue. Please see my last comment for the
solution.
**
I had same issue on a windows plesk hosted website : 403 errors on images and js files when hard refreshing the web page (ctrl + f5)
Thanks to your last comment, I went to the Windows server to check the IIS settings. You can follow this steps to solve the problem :
Open Internet Information Services (IIS) Manager
Click on your connection in the left panel
Double click on "IP Address and Domain Restrictions" in the IIS central tab
Click on "Edit Dynamic Restriction Settings..." in the right panel (Actions)
Uncheck the checkboxes or increase the value if needed.
Click on "ok"
That's it.
Hope it helps !

Branch does not open the App Store link

I use Branch to create deep links. I added a new control parameter ios_has_app_url and ios_url. Clicking on the deep link when the application is installed then everything works correctly, but if you click on the deep link when the application is not installed on the device then during startup, I see that the browser instead of opening ios_url (App Store link), it tries to open ios_has_app_url. How can I fix it?
private func createDeepLink(_ card: CardModel) -> (branchUniversalObject: BranchUniversalObject, branchLinkProperties: BranchLinkProperties) {
let branchUniversalObject = BranchUniversalObject(canonicalIdentifier: ("cardId/\(card.id)"))
branchUniversalObject.title = card.title
branchUniversalObject.contentDescription = ""
branchUniversalObject.imageUrl = card.photoURLsProperties.originalURL
branchUniversalObject.addMetadataKey(CardKeys.cardID.rawValue, value: card.id)
branchUniversalObject.addMetadataKey("placeAvatarURLString", value: card.photoURLsProperties.originalURL)
branchUniversalObject.addMetadataKey("title", value: card.title)
branchUniversalObject.addMetadataKey("isAutoGeneratedCard", value: "false")
let fullLocationName = card.location.fullLocationName
branchUniversalObject.addMetadataKey("fullLocationName", value: fullLocationName)
branchUniversalObject.addMetadataKey(CardKeys.ownerID.rawValue, value: card.ownerID)
branchUniversalObject.addMetadataKey(ParametersKeywords.type.rawValue, value: ModeKeywords.shareCard.rawValue)
branchUniversalObject.addMetadataKey("availableSeats", value: card.peopleProperties.availableSeats.description)
let coordinate = card.location.coordinate
branchUniversalObject.addMetadataKey("latitude", value: coordinate.latitude.description)
branchUniversalObject.addMetadataKey("longitude",value: coordinate.longitude.description)
let linkProperties = BranchLinkProperties()
linkProperties.feature = "sharing"
linkProperties.addControlParam("$desktop_url", withValue: "http://www.appname.com")
linkProperties.addControlParam("$ios_has_app_url", withValue: "appname://")
linkProperties.addControlParam("$ios_url", withValue: "https://itunes.apple.com/app/idXXXXXXXXXXXXXXX")
return (branchUniversalObject: branchUniversalObject, branchLinkProperties: linkProperties)
}
Update: My goal is that when the deep link is clicked, if the application is installed, then the application is opened, if not, then the app store link.
Update 1: I changed my code like this and it opens the App Store if I just click on the link, and if I use 3D Touch then I can choose where to open this link. Is it possible to do that if the application is installed and clicking on the link immediately opened the application (or at least a link in the browser, but that there was an option to open the application) and if the application is not installed, then clicking on the link, go to the App Store app page .
let linkProperties = BranchLinkProperties()
linkProperties.feature = "sharing"
linkProperties.addControlParam("$desktop_url", withValue: "http://www.appname.com")
linkProperties.addControlParam("$ios_has_app_url", withValue: "https://appname.app.link/")
linkProperties.addControlParam("$ios_url", withValue: "itms-apps://itunes.apple.com/app/idXXXXXX")
Alex from Branch.io here:
The good news is this is much easier than you're expecting. However, since you made such a complete report, I'll go through all the details so you know exactly what happens behind the scenes.
Short Explanation
To handle launching your app when it is installed, you don't need to manually set your custom URI scheme as the value of $ios_has_app_url — Branch and iOS implement this behavior for you by design.
If your links are not launching your app, you may have a problem with your Universal Links configuration. I recommend reviewing this troubleshooting guide.
Long Explanation
Our $ios_has_app_url control parameter relies on a boolean has_app value tracked by our servers. The has_app value fairly accurate in typical real-world use (plenty good enough for switching a button between displaying an Open or an Install label on a smart app banner, for example), but it's not 100% accurate in all situations.
This is a limitation of iOS: Apple doesn't allow web pages to query for which apps are installed on a device (for obvious privacy reasons), so Branch has to rely on cookie matching. This means if we can't match the cookie, or haven't seen the user recently, or the user clears their device cache, or the user has uninstalled the app since the last time Branch saw them, the value of has_app will be incorrect. When the has_app value is incorrect, then the $ios_has_app_url behavior will also be wrong.
HOWEVER, even though Apple doesn't allow web pages to query access this data, iOS itself can still act on it. Universal Links do exactly this — when the user opens a Universal Link (which includes Branch links, assuming you got all the configuration done), the app will open if it is installed. If it is not installed, the user will be sent to the URL of the link.
Intended use of $ios_has_app_url
The Branch $ios_has_app_url parameter is intended for a very specific usecase in advanced implementations; the vast majority of our partners never use it. Here's the potential situation where you might want it:
You have an edge case where Universal Links are not supported, and you want to send your users to a different web page if Branch knows they have your app installed rather than giving them the option to open it. Obviously this is a rare situation, typically relevant only to enterprise-level apps.
Debugging has_app
If you're stuck trying to debug a situation where has_app is returning the wrong value, you have a couple of options:
If you're getting true and you want false, use Private Browsing mode in Safari. This prevents Branch from making a cookie match, meaning you will always get false.
Alternatively, follow these steps:
Ensure the app that is being tested has setDebug enabled.
Paste a link to a page with the smart banner code into Notes.
Uninstall the app.
Settings > General > Safari > Clear History and Website Data.
Settings > General > Safari > Advanced > Website Data > Swipe left and delete every entry.
Settings > General > Privacy > Advertising > Reset Advertising Identifier...
Click on the link in Notes (from step 1).
The banner should always show "Download" (when it does not, it is because clearing the Website Data was unsuccessful).
Tap on Download.
Run the app via Xcode (serves to install it).
Stop the app in Xcode, then launch it from the phone.
Click on the link in Notes again - the button should now show "Open" and open the app.
I see that the browser instead of opening ios_url (App Store link), it
tries to open ios_has_app_url. How can I fix it?
By letting the link to be:
"itms-apps://itunes.apple.com/app/idxxxxxxxxxx"

Direct Update with custom URL not working after IP change on iOS

I'm having some issues with direct update on iOS.
Following scenario describes my problem.
Add the code snippet below to main.js
Enabled worklightSettings in application-descriptor.xml
Run on Worklight Development Server
Open project in Xcode via eclipse
Run
Make a change and re-deploy
Verify Direct Update is received
Uninstall app
Obtain new IP (in my case by restarting my macbook the next day)
Open project in Xcode via eclipse
Run
Open myapp settings via Settings.app and enable Custom Server URL. The URL is pointing to the old IP.
Enable Custom Server URL and enter the correct IP
Open app
Direct Update is not received
Code snippet:
function wlCommonInit(){
WL.Client.connect({
onSuccess: onConnectSuccess,
onFailure: onConnectFailure
});
}
function onConnectSuccess() {
WL.Logger.debug("Connect success.");
}
function onConnectFailure() {
WL.Logger.debug("Connect failed.");
}
EDIT
Try following scenario:
create a new app from scratch and deploy it on your iPad
verify the custom server URL and test direct update: all is working fine (OK)
update the ip on your development machine
remove the app from the device and reinstall it
verify the custom server URL: the old IP is present (NOK)
start the app with the use custom server url unchecked => 'connect success'
start the app with the use custom server url checked (don't change ip) => 'connect success'
try to access the app in your browser with this ip => doesn't work
change the ip and remove the last front slash from the custom server url
start the app with the new correct IP (which works in the browser) => 'connect success'
change the ip back to the incorrect IP, add the slash and retry => NO 'connect success'
The exact same custom server URL which worked before fails now. When I try a random IP address I also don't get the 'connect success'.
EDIT
result of ifconfig:
When you add a project in Worklight Studio, the following warning message is outputted:
FWLPL0010W: The current server configuration is set to "localhost".
Therefore the Worklight build uses the primary IP address of this
computer (192.168.1.100) instead. It is recommended to set the server
configuration to use the fully qualified hostname or IP address of
this computer. To configure the setting, in the "Servers" view
double-click the Worklight Development Server entry and edit the "Host
name" field.
In the comments you say the wrong IP address is used, so try and change the default IP address that Worklight Studio selects by following the above instructions. The address you will set will be used as the server address, as well as be used in the application (the address that you see in the app settings page).
To make sure the settings page is fully 'refreshed':
Delete the app from the device/simulator
When opening the project in Xcode, first select Clean and then Run (because Xcode tends to keep the Settings.bundle file cached)

"Login cancelled by player" callback in facebook api for Unity IOS (only if you have facebook app in device)

I am using unity facebook api 4.3.6 for ios. Its working perfectly fine if I don't have #facebookapp in my device. Once I download it and try login, it takes me to #facebookapp and redirect again to my game with callback
FB Login callback : {"is_logged_in":false, "user_id":"", "access_token":""}
Login cancelled by player
This happens only if I have facebook app downloaded! I think its some how cache issue but not sure exactly what is it. Any luck?
I believe this is not connected with Unity.
Here is few reasons I faced
You need to ask read and write permissions separately. Wait until you get read permissions than send request for write permission.
Make sure your app is allowed to login ( if you have FB app installed on your device )
Make sure you have your app bundle identifier added to developer.facebook.com
Here is what helped me fixed that problem with Unity Facebook-Android.
setting the sandbox mode ON:
Go to https://developers.facebook.com/apps
Select the respective app from the drop down.
Go to 'Status & Review' from the table in the left side of the page.
Do you want to make this app and all its live features available to the general public? - Select switch to set YES/NO value.
if the ON/OFF button is disable, please go back to Settings and enter a valid email address.
I understood why when the device is installed a facebook app, my app can't login facebook.
First : software OpenSSL create keyhass wrong. I have downloaded OpenSSL from here : http://code.google.com/p/openssl-for-windows/downloads/list , and it creates keyhash wrong.
I have used other OpenSSL sofware, you can download it here : https://www.dropbox.com/sh/t6tt44dc2nm6vza/6mp1W74GiZ , it is create keshash right.
Second: In class FacebookAndroidUtil.cs , line 62, you add System.Environment.GetEnvironmentVariable("HOMEDRIVE") before System.Environment.GetEnvironmentVariable("HOMEPATH"). Facebook SDK requires a file debug.keystore in : C:\Users\UserName.android\debug.keystore.
If the Unity Editor, Edit Setting Facebook has yet to create android debug hash key. Then use the Eclipse Software, create and run onr any project. Eclipse will generate a debug.keystore. If it is't create in folfer : C:\Users\UserName.android\debug.keystore , then find it, coppy and paste into C:\Users\UserName.android\debug.keystore
Third: publish your app in Facebook, so be sure it is:"This app is public and available to all users".

Convert blackerry program/app into an installable form

I need to send a completed BlackBerry app, for OS 5, to my client in an installable form. What are the ways to achieve this?
I am using the BlackBerry Eclipse plugin and I have a BlackBerry Bold 9000.
Follow this steps:
1) To get Signing Keys you will need to go to the BlackBerry Developer’s web site:
https://www.blackberry.com/SignedKeys/
2) As you finished your registration successfully you will get the confirmation mail with the order number.
3) You will get three different mail(Within 48 hours or within 2 working days) from the devsupport#rim.com which contains
client-RBB-XXXXXXXXX.csi
client-RCR-XXXXXXXXX.csi
client-RRT-XXXXXXXXX.csi
Where “XXXXXXXXX” may be any number.
4) You can configure these .csi files in this ways.
Configure using Eclipse IDE
i. Go to windows > preferences > BlackBerry Java Plug-in > Signature Tool > Install New Key
ii. Please select client-RBB-XXXXXXXXX.csi file which you get from RIM.
iii. You will get the pop up window which ask for password and configure password. Please enter eight digit number which you what to set as you password. And remember it for future use.
iv. After clicking ok button you will get a screen which generates the random information. Please drag your mouse over that screen(Continuously until whole process will be finished) to proceed further.
v. After finishing random info. Generation you will be asked to enter the registration PIN. Please enter same Registration PIN as you applied for Registration.
vi. You will get the success message.
vii. Follows steps (ii) to (v) for client-RCR-XXXXXXXXX.csi & client-RRT-XXXXXXXXX.csi files (Those files that you received from BB server).
5) After finishing the registration process, you are able to sign you BB app. Open the Eclipse, select project that you want to sign, goto “Project-> Blackberry -> Sign With Signature Tool…” Enter the 8 digit password which you entered in step (iii) when following popup screen appears and click on ok.
Note:
Please take back up of “sigtool.csk” & “sigtool.db” from “eclipse\plugins\net.rim.ejde\vmTools” to use the key in case of reinstallation of Eclipse/Blackberry SDK.
after that sign the application using key.
and you can find the ".cod" & ".alx" file in deliverable folder , you can send it to the client..

Resources